summaryrefslogtreecommitdiffstats
path: root/Modules/_gestalt.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2008-06-11 05:26:20 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2008-06-11 05:26:20 (GMT)
commit1a21451b1d73b65af949193208372e86bf308411 (patch)
tree8e98d7be9e249b011ae9380479656e5284ec0234 /Modules/_gestalt.c
parentcdf94635d7e364f9ce1905bafa5b540f4d16147c (diff)
downloadcpython-1a21451b1d73b65af949193208372e86bf308411.zip
cpython-1a21451b1d73b65af949193208372e86bf308411.tar.gz
cpython-1a21451b1d73b65af949193208372e86bf308411.tar.bz2
Implement PEP 3121: new module initialization and finalization API.
Diffstat (limited to 'Modules/_gestalt.c')
-rw-r--r--Modules/_gestalt.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/Modules/_gestalt.c b/Modules/_gestalt.c
index d106068..7fb1bc9 100644
--- a/Modules/_gestalt.c
+++ b/Modules/_gestalt.c
@@ -65,8 +65,20 @@ static struct PyMethodDef gestalt_methods[] = {
{NULL, NULL} /* Sentinel */
};
+static struct PyModuleDef gestaltmodule = {
+ PyModuleDef_HEAD_INIT,
+ "_gestalt",
+ NULL,
+ -1,
+ gestalt_methods,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
void
-init_gestalt(void)
+PyInit__gestalt(void)
{
- Py_InitModule("_gestalt", gestalt_methods);
+ return PyModule_Create(&gestaltmodule);
}