Issue 12173: PyImport_ImportModuleLevel doesn't have 'const' on its argument (original) (raw)
An anomaly in the argument types of similar functions: PyImport_ImportModuleLevel takes char , while the related functions PyImport_AddModule, PyImport_ImportModule, and PyImport_ImportModuleNoBlock all take const char . This made a nuisance of itself for me when I tried to compile my code against Python.h (embedding Python). Attached is a relatively trivial patch to add const. Should not impact existing code, as the compiler will happily pass a char to a const char (just not the other way).