Skip to content

Commit 7dc8149

Browse files
committed
do not distinguish HASHXOF from HASH at struct level
1 parent 4f79248 commit 7dc8149

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

Modules/_hashopenssl.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ typedef struct {
285285
PyMutex mutex; /* OpenSSL context lock */
286286
} HASHobject;
287287

288-
#define HASHXOFobject HASHobject
289288
#define HASHobject_CAST(op) ((HASHobject *)(op))
290289

291290
typedef struct {
@@ -302,10 +301,10 @@ typedef struct {
302301
/*[clinic input]
303302
module _hashlib
304303
class _hashlib.HASH "HASHobject *" "((_hashlibstate *)PyModule_GetState(module))->EVPtype"
305-
class _hashlib.HASHXOF "HASHXOFobject *" "((_hashlibstate *)PyModule_GetState(module))->EVPXOFtype"
304+
class _hashlib.HASHXOF "HASHobject *" "((_hashlibstate *)PyModule_GetState(module))->EVPXOFtype"
306305
class _hashlib.HMAC "HMACobject *" "((_hashlibstate *)PyModule_GetState(module))->HMACtype"
307306
[clinic start generated code]*/
308-
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=466d7751ac96b4b1]*/
307+
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=4f6b8873ed13d1ff]*/
309308

310309

311310
/* LCOV_EXCL_START */
@@ -821,8 +820,8 @@ Return the digest value as a bytes object.
821820
[clinic start generated code]*/
822821

823822
static PyObject *
824-
_hashlib_HASHXOF_digest_impl(HASHXOFobject *self, Py_ssize_t length)
825-
/*[clinic end generated code: output=a9ecbb885b3054a5 input=3eb034ce03c55b21]*/
823+
_hashlib_HASHXOF_digest_impl(HASHobject *self, Py_ssize_t length)
824+
/*[clinic end generated code: output=dcb09335dd2fe908 input=3eb034ce03c55b21]*/
826825
{
827826
EVP_MD_CTX *temp_ctx;
828827
PyObject *retval = PyBytes_FromStringAndSize(NULL, length);
@@ -867,8 +866,8 @@ Return the digest value as a string of hexadecimal digits.
867866
[clinic start generated code]*/
868867

869868
static PyObject *
870-
_hashlib_HASHXOF_hexdigest_impl(HASHXOFobject *self, Py_ssize_t length)
871-
/*[clinic end generated code: output=1fe78f301ff7e28f input=0e58f7238adb7ab8]*/
869+
_hashlib_HASHXOF_hexdigest_impl(HASHobject *self, Py_ssize_t length)
870+
/*[clinic end generated code: output=519431cafa014f39 input=0e58f7238adb7ab8]*/
872871
{
873872
unsigned char *digest;
874873
EVP_MD_CTX *temp_ctx;
@@ -954,7 +953,7 @@ static PyType_Slot HASHXOFobject_type_slots[] = {
954953

955954
static PyType_Spec HASHXOFobject_type_spec = {
956955
.name = "_hashlib.HASHXOF",
957-
.basicsize = sizeof(HASHXOFobject),
956+
.basicsize = sizeof(HASHobject),
958957
.flags = (
959958
Py_TPFLAGS_DEFAULT
960959
| Py_TPFLAGS_BASETYPE

Modules/clinic/_hashopenssl.c.h

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)