diff options
Diffstat (limited to 'Doc/extending/extending.rst')
-rw-r--r-- | Doc/extending/extending.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/extending/extending.rst b/Doc/extending/extending.rst index b035d94..d7f1357 100644 --- a/Doc/extending/extending.rst +++ b/Doc/extending/extending.rst @@ -1266,12 +1266,13 @@ All that a client module must do in order to have access to the function { PyObject *m; - m = Py_InitModule("client", ClientMethods); + m = PyModule_Create(&clientmodule); if (m == NULL) - return; + return NULL; if (import_spam() < 0) - return; + return NULL; /* additional initialization can happen here */ + return m; } The main disadvantage of this approach is that the file :file:`spammodule.h` is |