Skip to content

v0.6.0

Choose a tag to compare

@luoliwoshang luoliwoshang released this 17 Jun 12:23
· 73 commits to main since this release
0ff435d

What's Changed

llcppsigfetch

llcppsymg

cl

docs

ci

deps

test

Full Changelog: v0.5.1...v0.6.0

Function pointer

C function pointer types are converted to Go function types with corresponding parameter and return type mappings,And llgo need to add llgo:type C tag to the function type.

typedef int (*CallBack)(void *L);
// llgo:type C
type CallBack func(c.Pointer) c.Int

For function pointer types referenced in function signatures & struct fields, the type is replaced with the converted Go function type.

void exec(void *L, CallBack cb);
// llgo:type C
func Exec(L c.Pointer, cb CallBack)
typedef struct Stream {
    CallBack cb;
} Stream;
type Stream struct {
	Cb CallBack
}