Skip to content

Commit a6f772e

Browse files
committed
make Py_hash_type a typedef
1 parent d19bf2f commit a6f772e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Modules/_hashopenssl.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@
8181
* py_alias as keys.
8282
*/
8383

84-
enum Py_hash_type {
84+
typedef enum Py_hash_type {
8585
Py_ht_evp, // usedforsecurity=True / default
8686
Py_ht_evp_nosecurity, // usedforsecurity=False
8787
Py_ht_mac, // HMAC
8888
Py_ht_pbkdf2, // PKBDF2
89-
};
89+
} Py_hash_type;
9090

9191
typedef struct {
9292
const char *py_name;
@@ -398,7 +398,7 @@ py_digest_name(const EVP_MD *md)
398398

399399
/* Get EVP_MD by HID and purpose */
400400
static PY_EVP_MD*
401-
py_digest_by_name(PyObject *module, const char *name, enum Py_hash_type py_ht)
401+
py_digest_by_name(PyObject *module, const char *name, Py_hash_type py_ht)
402402
{
403403
PY_EVP_MD *digest = NULL;
404404
PY_EVP_MD *other_digest = NULL;
@@ -472,7 +472,7 @@ py_digest_by_name(PyObject *module, const char *name, enum Py_hash_type py_ht)
472472
* on error returns NULL with exception set.
473473
*/
474474
static PY_EVP_MD*
475-
py_digest_by_digestmod(PyObject *module, PyObject *digestmod, enum Py_hash_type py_ht) {
475+
py_digest_by_digestmod(PyObject *module, PyObject *digestmod, Py_hash_type py_ht) {
476476
PyObject *name_obj = NULL;
477477
const char *name;
478478

0 commit comments

Comments
 (0)