summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_hashopenssl.c9
-rw-r--r--Modules/_ssl.c7
2 files changed, 2 insertions, 14 deletions
diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c
index 56d2a77..7e176cf 100644
--- a/Modules/_hashopenssl.c
+++ b/Modules/_hashopenssl.c
@@ -2038,21 +2038,14 @@ hashlib_init_evpxoftype(PyObject *module)
{
#ifdef PY_OPENSSL_HAS_SHAKE
_hashlibstate *state = get_hashlib_state(module);
- PyObject *bases;
if (state->EVPtype == NULL) {
return -1;
}
- bases = PyTuple_Pack(1, state->EVPtype);
- if (bases == NULL) {
- return -1;
- }
-
state->EVPXOFtype = (PyTypeObject *)PyType_FromSpecWithBases(
- &EVPXOFtype_spec, bases
+ &EVPXOFtype_spec, (PyObject *)state->EVPtype
);
- Py_DECREF(bases);
if (state->EVPXOFtype == NULL) {
return -1;
}
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 130dce4..6f799ee 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -5955,12 +5955,7 @@ do { \
if (PyModule_AddObjectRef(module, name, exc) < 0) goto error; \
} while(0)
- bases = PyTuple_Pack(1, PyExc_OSError);
- if (bases == NULL) {
- goto error;
- }
- PySSLErrorObject = PyType_FromSpecWithBases(&sslerror_type_spec, bases);
- Py_CLEAR(bases);
+ PySSLErrorObject = PyType_FromSpecWithBases(&sslerror_type_spec, PyExc_OSError);
if (PySSLErrorObject == NULL) {
goto error;
}