Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8f77349

Browse files
committed
Issue #15656: fixing code sample in extending doc
1 parent 2b209cd commit 8f77349

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

Doc/extending/extending.rst

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -735,13 +735,18 @@ Philbrick ([email protected])::
735735
{NULL, NULL, 0, NULL} /* sentinel */
736736
};
737737

738-
::
738+
static struct PyModuleDef keywdargmodule = {
739+
PyModuleDef_HEAD_INIT,
740+
"keywdarg",
741+
NULL,
742+
-1,
743+
keywdarg_methods
744+
};
739745

740-
void
741-
initkeywdarg(void)
746+
PyMODINIT_FUNC
747+
PyInit_keywdarg(void)
742748
{
743-
/* Create the module and add the functions */
744-
Py_InitModule("keywdarg", keywdarg_methods);
749+
return PyModule_Create(&keywdargmodule);
745750
}
746751

747752

0 commit comments

Comments
 (0)