c2v
c2v copied to clipboard
A `wrapper` commands adds `C.` prefix for method that is not actually a C method in that case
Test file (for which wrapper was generated; The Machinery header api_registry,h) -> https://pastebin.com/NF6RjVaN
Error message
api_registry.v:94:2: error: struct embedding must be declared at the beginning of the struct body
92 | api_registry_version fn () Tm_version_t
93 | set fn (&i8, Tm_version_t, voidptr, u32)
94 | C.remove fn (voidptr)
| ~~~~~~~~
95 | get fn (&i8, Tm_version_t) voidptr
96 | get_optional fn (&voidptr, &i8, Tm_version_t)
Internal vfmt error while formatting file: ./api_registry.v.
Encountered a total of: 1 errors.
it's because remove is registered as a builtin function in c2v
i'm surprised there's a C lib using remove as a function name
They also have a printf method in the log.h 😅