From 1a21451b1d73b65af949193208372e86bf308411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Wed, 11 Jun 2008 05:26:20 +0000 Subject: Implement PEP 3121: new module initialization and finalization API. --- Modules/cryptmodule.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'Modules/cryptmodule.c') diff --git a/Modules/cryptmodule.c b/Modules/cryptmodule.c index 6377f8430b..d3d9271ab5 100644 --- a/Modules/cryptmodule.c +++ b/Modules/cryptmodule.c @@ -42,8 +42,21 @@ static PyMethodDef crypt_methods[] = { {NULL, NULL} /* sentinel */ }; + +static struct PyModuleDef cryptmodule = { + PyModuleDef_HEAD_INIT, + "crypt", + NULL, + -1, + crypt_methods, + NULL, + NULL, + NULL, + NULL +}; + PyMODINIT_FUNC -initcrypt(void) +PyInit_crypt(void) { - Py_InitModule("crypt", crypt_methods); + return PyModule_Create(&cryptmodule); } -- cgit v1.2.1