Fix module initialization glitches.

This commit is contained in:
Martin v. Löwis 2008-06-11 05:37:58 +00:00
parent 1a21451b1d
commit 3447bee9cc
2 changed files with 1 additions and 3 deletions

View File

@ -566,5 +566,5 @@ PyInit__md5(void)
Py_TYPE(&MD5type) = &PyType_Type; Py_TYPE(&MD5type) = &PyType_Type;
if (PyType_Ready(&MD5type) < 0) if (PyType_Ready(&MD5type) < 0)
return NULL; return NULL;
return PyModule_Create("_md5", MD5_functions); return PyModule_Create(&_md5module);
} }

View File

@ -539,8 +539,6 @@ static struct PyModuleDef _sha1module = {
PyMODINIT_FUNC PyMODINIT_FUNC
PyInit__sha1(void) PyInit__sha1(void)
{ {
PyObject *m;
Py_TYPE(&SHA1type) = &PyType_Type; Py_TYPE(&SHA1type) = &PyType_Type;
if (PyType_Ready(&SHA1type) < 0) if (PyType_Ready(&SHA1type) < 0)
return NULL; return NULL;