Commit 71e30a04 authored by Benjamin Peterson's avatar Benjamin Peterson

return the module object from PyMODINIT_FUNC

parent 80072cb7
......@@ -326,7 +326,7 @@ only non-\ ``static`` item defined in the module file::
return PyModule_Create(&spammodule);
}
Note that PyMODINIT_FUNC declares the function as ``void`` return type,
Note that PyMODINIT_FUNC declares the function as ``PyObject *`` return type,
declares any special linkage declarations required by the platform, and for C++
declares the function as ``extern "C"``.
......
......@@ -52,4 +52,5 @@ PyInit_noddy(void)
Py_INCREF(&noddy_NoddyType);
PyModule_AddObject(m, "Noddy", (PyObject *)&noddy_NoddyType);
return m;
}
......@@ -186,4 +186,5 @@ PyInit_noddy2(void)
Py_INCREF(&NoddyType);
PyModule_AddObject(m, "Noddy", (PyObject *)&NoddyType);
return m;
}
......@@ -239,4 +239,5 @@ PyInit_noddy3(void)
Py_INCREF(&NoddyType);
PyModule_AddObject(m, "Noddy", (PyObject *)&NoddyType);
return m;
}
......@@ -221,4 +221,5 @@ PyInit_noddy4(void)
Py_INCREF(&NoddyType);
PyModule_AddObject(m, "Noddy", (PyObject *)&NoddyType);
return m;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment