Skip to content

Instantly share code, notes, and snippets.

@pquerna
Created July 17, 2017 21:30
Show Gist options
  • Save pquerna/f890b37c54ab7a60dced5705ebd3589d to your computer and use it in GitHub Desktop.
Save pquerna/f890b37c54ab7a60dced5705ebd3589d to your computer and use it in GitHub Desktop.
#include "issue133.h"
int Example_A(const SomeCallbacks *sc) {
return 0;
}
const SomeCallbacks kSomeCallbacks = {0};
#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
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