diff options
-rw-r--r-- | Doc/extending/extending.rst | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Doc/extending/extending.rst b/Doc/extending/extending.rst index 32615807dd..ef95ac95f7 100644 --- a/Doc/extending/extending.rst +++ b/Doc/extending/extending.rst @@ -732,13 +732,18 @@ Philbrick (philbrick@hks.com):: {NULL, NULL, 0, NULL} /* sentinel */ }; -:: + static struct PyModuleDef keywdargmodule = { + PyModuleDef_HEAD_INIT, + "keywdarg", + NULL, + -1, + keywdarg_methods + }; - void - initkeywdarg(void) + PyMODINIT_FUNC + PyInit_keywdarg(void) { - /* Create the module and add the functions */ - Py_InitModule("keywdarg", keywdarg_methods); + return PyModule_Create(&keywdargmodule); } |