PyModule_Create in compat.h is declared as static but not marked as inline. As a consequence, for complex Python C bindings consisting of multiple compilation units, the compiler will emit a warning about the function being unused (except for the compilation unit that actually uses it). Adding the keyword inline will discard the function in compilation units that don't use it.
PyModule_Create
in compat.h is declared asstatic
but not marked asinline
. As a consequence, for complex Python C bindings consisting of multiple compilation units, the compiler will emit a warning about the function being unused (except for the compilation unit that actually uses it). Adding the keywordinline
will discard the function in compilation units that don't use it.