From: Eli Bendersky Date: Wed, 15 Aug 2012 11:49:49 +0000 (+0300) Subject: Issue #15656: fixing code sample in extending doc X-Git-Tag: v3.3.0rc1~108^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8f773493b6c27a9b6bc3a1aceac107a0f3d669c8;p=thirdparty%2FPython%2Fcpython.git Issue #15656: fixing code sample in extending doc --- diff --git a/Doc/extending/extending.rst b/Doc/extending/extending.rst index c4ced1af8b79..7fd9f7237df5 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); }