Closed WorldofJARcraft closed 2 years ago
why would you compile this with c++?
I have a mixed code base with both C and C++. I included opaque.h from a C++ source file (as a meta-dependency), and it broke my build since C++ did not understand the two method declarations that followed the schema above.
i think there is a way to use the cpp to distinguish between c and c++ compiler maybe use
#ifdef c++
.... just pointer
#else
... original array with size
#endif
i think there is a way to use the cpp to distinguish between c and c++ compiler maybe use
#ifdef c++ .... just pointer #else ... original array with size #endif
The latest change should do that, currently testing it in my CI.
The respective commit works in my test environment.
awesome! :)
The expression
in opaque.h is valid in C, but does not compile in C++ since the compiler does not know what
pwdU_len
will be at run time. I have changed the type to pointer and left the expected size as a comment.