summaryrefslogtreecommitdiffstats
path: root/Doc/extending
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/extending')
-rw-r--r--Doc/extending/extending.rst15
1 files changed, 10 insertions, 5 deletions
diff --git a/Doc/extending/extending.rst b/Doc/extending/extending.rst
index c4ced1a..7fd9f72 100644
--- a/Doc/extending/extending.rst
+++ b/Doc/extending/extending.rst
@@ -735,13 +735,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);
}