◐ Shell
reader mode source ↗
Skip to content
Merged
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
14 changes: 9 additions & 5 deletions Modules/_hashopenssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2093,23 +2093,27 @@ hashlib_init_constructors(PyObject *module)
}
func = PyObject_GetAttrString(module, fdef->ml_name);
if (func == NULL) {
return -1;
}
if (PyDict_SetItem(state->constructs, func, name_obj) < 0) {
return -1;
}
Py_DECREF(func);
Py_DECREF(name_obj);
}

proxy = PyDictProxy_New(state->constructs);
if (proxy == NULL) {
return -1;
}
if (PyModule_AddObjectRef(module, "_constructors", proxy) < 0) {
return -1;
}
Py_DECREF(proxy);
return 0;
}

Expand Down
Toggle all file notes Toggle all file annotations