Browse Source

Name of Python init function should match library filename.

enn0x 12 years ago
parent
commit
8deb2f40b1
1 changed files with 4 additions and 4 deletions
  1. 4 4
      dtool/metalibs/dtoolconfig/pydtool.cxx

+ 4 - 4
dtool/metalibs/dtoolconfig/pydtool.cxx

@@ -2405,16 +2405,16 @@ static PyMethodDef python_simple_funcs[] = {
 #if PY_MAJOR_VERSION >= 3
 #if PY_MAJOR_VERSION >= 3
 static struct PyModuleDef python_simple_module = {
 static struct PyModuleDef python_simple_module = {
   PyModuleDef_HEAD_INIT,
   PyModuleDef_HEAD_INIT,
-  "libdtoolconfig",
+  "libp3dtoolconfig",
   NULL,
   NULL,
   -1,
   -1,
   python_simple_funcs,
   python_simple_funcs,
   NULL, NULL, NULL, NULL
   NULL, NULL, NULL, NULL
 };
 };
 
 
-#define INIT_FUNC PyObject *PyInit_libdtoolconfig
+#define INIT_FUNC PyObject *PyInit_libp3dtoolconfig
 #else
 #else
-#define INIT_FUNC void initlibdtoolconfig
+#define INIT_FUNC void initlibp3dtoolconfig
 #endif
 #endif
 
 
 #ifdef _WIN32
 #ifdef _WIN32
@@ -2427,7 +2427,7 @@ INIT_FUNC() {
 #if PY_MAJOR_VERSION >= 3
 #if PY_MAJOR_VERSION >= 3
   return PyModule_Create(&python_simple_module);
   return PyModule_Create(&python_simple_module);
 #else
 #else
-  Py_InitModule("libdtoolconfig", python_simple_funcs);
+  Py_InitModule("libp3dtoolconfig", python_simple_funcs);
 #endif
 #endif
 }
 }