Explicitly disabling the W1040 warning through the free function's wrapper doesn't work either; where f is the instance of pyplusplus.decl_wrappers.calldef_wrapper.free_function_t representing the free function, f..disable_warnings(pyplusplus.messages.W1040) has no effect.