summaryrefslogtreecommitdiffstats
path: root/Modules/sha1module.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/sha1module.c')
-rw-r--r--Modules/sha1module.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/Modules/sha1module.c b/Modules/sha1module.c
index 403194c..b44fe18 100644
--- a/Modules/sha1module.c
+++ b/Modules/sha1module.c
@@ -544,8 +544,17 @@ static struct PyModuleDef _sha1module = {
PyMODINIT_FUNC
PyInit__sha1(void)
{
+ PyObject *m;
+
Py_TYPE(&SHA1type) = &PyType_Type;
if (PyType_Ready(&SHA1type) < 0)
return NULL;
- return PyModule_Create(&_sha1module);
+
+ m = PyModule_Create(&_sha1module);
+ if (m == NULL)
+ return NULL;
+
+ Py_INCREF((PyObject *)&SHA1type);
+ PyModule_AddObject(m, "SHA1Type", (PyObject *)&SHA1type);
+ return m;
}