diff --git a/dtool/src/interrogate/interfaceMakerPythonSimple.cxx b/dtool/src/interrogate/interfaceMakerPythonSimple.cxx index c0f1be390a..8a160216e8 100644 --- a/dtool/src/interrogate/interfaceMakerPythonSimple.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonSimple.cxx @@ -98,7 +98,7 @@ write_module(ostream &out,ostream *out_h, InterrogateModuleDef *def) { << "#if PY_MAJOR_VERSION >= 3\n" << "static struct PyModuleDef python_simple_module = {\n" << " PyModuleDef_HEAD_INIT,\n" - << " \"" << def->library_name << "\",\n" + << " \"" << def->module_name << "\",\n" << " nullptr,\n" << " -1,\n" << " python_simple_funcs,\n" diff --git a/dtool/src/interrogate/interrogate_module.cxx b/dtool/src/interrogate/interrogate_module.cxx index 663e57762f..5b42d1db02 100644 --- a/dtool/src/interrogate/interrogate_module.cxx +++ b/dtool/src/interrogate/interrogate_module.cxx @@ -305,7 +305,7 @@ int write_python_table_native(std::ostream &out) { << "#if PY_MAJOR_VERSION >= 3\n" << "static struct PyModuleDef py_" << library_name << "_module = {\n" << " PyModuleDef_HEAD_INIT,\n" - << " \"" << library_name << "\",\n" + << " \"" << module_name << "\",\n" << " nullptr,\n" << " -1,\n" << " nullptr,\n"