Open adamski opened 4 years ago
The following config
language = "C" cpp_compat = true include_version = false namespace = "acme"
Results in no namespace being included in the generated header within the #ifdef __cplusplus sections.
#ifdef __cplusplus
I would expect something like this to be generated:
#ifdef __cplusplus namespace acme { extern "C" { #endif // __cplusplus void print_hello(void); #ifdef __cplusplus } // extern "C" } // namespace acme #endif // __cplusplus
I don't see related discussion in https://github.com/eqrion/cbindgen/pull/349, so thus no reason not to do this I guess. This is probably pretty easy to fix.
The following config
Results in no namespace being included in the generated header within the
#ifdef __cplusplus
sections.I would expect something like this to be generated: