Skip to content

Commit 630c2b5

Browse files
committed
fix compilation?
1 parent 4a2ed1d commit 630c2b5

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Modules/_ssl.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -475,12 +475,7 @@ static PyType_Spec sslerror_type_spec = {
475475
*
476476
* We always assume that 'code' is non-negative.
477477
*/
478-
static inline const void *
479-
ssl_errcode_to_ht_key(ssize_t code)
480-
{
481-
assert(code >= 0); /* individual codes are int but always >= 0*/
482-
return ((const void *)((uintptr_t)(code)));
483-
}
478+
#define ssl_errcode_to_ht_key(code) ((const void *)((uintptr_t)(code)))
484479

485480
/*
486481
* Get the library and reason strings from a packed error code.
@@ -503,7 +498,7 @@ ssl_error_fetch_lib_and_reason(_sslmodulestate *state, py_ssl_errcode errcode,
503498
assert(val == NULL || PyUnicode_CheckExact(val));
504499
*lib = Py_XNewRef(val);
505500

506-
key = ssl_errcode_to_ht_key(ERR_PACK(libcode, 0UL, reacode));
501+
key = ssl_errcode_to_ht_key(ERR_PACK(libcode, 0, reacode));
507502
val = (PyObject *)_Py_hashtable_get(state->err_codes_to_names, key);
508503
assert(val == NULL || PyUnicode_CheckExact(val));
509504
*reason = Py_XNewRef(val);

0 commit comments

Comments
 (0)