mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
Issue #18742: Expose the internal hash type object for ABCs.
This commit is contained in:
parent
e53510726b
commit
327dd732ce
6 changed files with 55 additions and 8 deletions
|
|
@ -572,8 +572,17 @@ static struct PyModuleDef _md5module = {
|
|||
PyMODINIT_FUNC
|
||||
PyInit__md5(void)
|
||||
{
|
||||
PyObject *m;
|
||||
|
||||
Py_TYPE(&MD5type) = &PyType_Type;
|
||||
if (PyType_Ready(&MD5type) < 0)
|
||||
return NULL;
|
||||
return PyModule_Create(&_md5module);
|
||||
|
||||
m = PyModule_Create(&_md5module);
|
||||
if (m == NULL)
|
||||
return NULL;
|
||||
|
||||
Py_INCREF((PyObject *)&MD5type);
|
||||
PyModule_AddObject(m, "MD5Type", (PyObject *)&MD5type);
|
||||
return m;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue