diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-11-22 11:25:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-22 11:25:02 (GMT) |
commit | 686c203cd4355be5b7809a9d24b4aa3566d9371f (patch) | |
tree | 457b1a741d4f70e85d2bea686cd9ffb822cd8a85 /Modules/_hashopenssl.c | |
parent | c4d45ee670c09d4f6da709df072ec80cb7dfad22 (diff) | |
download | cpython-686c203cd4355be5b7809a9d24b4aa3566d9371f.zip cpython-686c203cd4355be5b7809a9d24b4aa3566d9371f.tar.gz cpython-686c203cd4355be5b7809a9d24b4aa3566d9371f.tar.bz2 |
bpo-42423: Accept single base class in PyType_FromModuleAndSpec() (GH-23441)
Diffstat (limited to 'Modules/_hashopenssl.c')
-rw-r--r-- | Modules/_hashopenssl.c | 9 |
1 files changed, 1 insertions, 8 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; } |