Created
July 17, 2017 21:30
-
-
Save pquerna/f890b37c54ab7a60dced5705ebd3589d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "issue133.h" | |
int Example_A(const SomeCallbacks *sc) { | |
return 0; | |
} | |
const SomeCallbacks kSomeCallbacks = {0}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef _ISSUE_133_ | |
#define _ISSUE_133_ | |
typedef const void (*VoidCallBack)(); | |
typedef struct { | |
VoidCallBack vcb; | |
} SomeCallbacks; | |
int Example_A(const SomeCallbacks *sc); | |
extern const SomeCallbacks kSomeCallbacks; | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// #include "issue133.h" | |
import "C" | |
func main() { | |
_ = C.Example_A(&C.kSomeCallbacks) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment