v0.7.2
What's Changed
llcppsymg
- fix(llcppsymg): skip generating variadic function as a receiver method by @MeteorsLiu in #513
cl
- cl:avoid c function with valist to method by @luoliwoshang in #512
change
- refactor(pkghfileinfo): replace libclang with clang for pkghfile by @MeteorsLiu in #509
docs
- docs(design):function with va list should not have receiver by @luoliwoshang in #511
To Method
When a C function could be a Go method, llcppg automatically converts the function to a Go method, moving the first parameter to the receiver position, and using recv_ as the receiver name.
Since Go's //go:linkname directive doesn't support methods, llgo uses // llgo:link to mark the connection between methods and C symbols.And generated methods return zero values of their return types as placeholders.
And LLGo should not treat C functions with variable parameters as methods. Variadic functions (those using ... in their parameter list) will be generated as regular Go functions rather than methods, even if they otherwise meet the criteria for method conversion.
Full Changelog: v0.7.1...v0.7.2