like the code below:
t.go
//export testFunc
func testFunc() (a interface{}) {
a = 100
return
}
t.h
typedef struct { void *t; void *v; } GoInterface;
// ...
extern GoInterface testFunc();
we export a function through CGO like extern GoInterface testFunc();, how to call this from C or Lua or others? how to initialization and using a GoInterface in C, or in the Luajit FFI context?
like the code below:
we export a function through CGO like
extern GoInterface testFunc();, how to call this from C or Lua or others? how to initialization and using aGoInterfacein C, or in the Luajit FFI context?