mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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
|
@ -576,10 +576,18 @@ static struct PyModuleDef _SHA3module = {
|
|||
PyMODINIT_FUNC
|
||||
PyInit__sha3(void)
|
||||
{
|
||||
PyObject *m;
|
||||
|
||||
Py_TYPE(&SHA3type) = &PyType_Type;
|
||||
if (PyType_Ready(&SHA3type) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return PyModule_Create(&_SHA3module);
|
||||
m = PyModule_Create(&_SHA3module);
|
||||
if (m == NULL)
|
||||
return NULL;
|
||||
|
||||
Py_INCREF((PyObject *)&SHA3type);
|
||||
PyModule_AddObject(m, "SHA3Type", (PyObject *)&SHA3type);
|
||||
return m;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue