summaryrefslogtreecommitdiffstats
path: root/Python/marshal.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/marshal.c')
-rw-r--r--Python/marshal.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/Python/marshal.c b/Python/marshal.c
index b1c8dd6..d4755c9 100644
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -1191,11 +1191,26 @@ static PyMethodDef marshal_methods[] = {
{NULL, NULL} /* sentinel */
};
+static struct PyModuleDef impmodule = {
+ PyModuleDef_HEAD_INIT,
+ "marshal",
+ NULL,
+ 0,
+ marshal_methods,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
+
+
PyMODINIT_FUNC
PyMarshal_Init(void)
{
- PyObject *mod = Py_InitModule("marshal", marshal_methods);
+ PyObject *mod = PyModule_Create(&impmodule);
if (mod == NULL)
- return;
+ return NULL;
PyModule_AddIntConstant(mod, "version", Py_MARSHAL_VERSION);
+ return mod;
}