Skip to content

Commit b787282

Browse files
[3.13] gh-132674: fix _hashopenssl.c compiler warnings on free-threaded build (GH-132675) (#132677)
gh-132674: fix `_hashopenssl.c` compiler warnings on free-threaded build (GH-132675) (cherry picked from commit 2df0f88) Co-authored-by: Bénédikt Tran <[email protected]>
1 parent bfba11a commit b787282

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/_hashopenssl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ py_digest_by_name(PyObject *module, const char *name, enum Py_hash_type py_ht)
410410
digest = PY_EVP_MD_fetch(entry->ossl_name, NULL);
411411
#ifdef Py_GIL_DISABLED
412412
// exchange just in case another thread did same thing at same time
413-
other_digest = _Py_atomic_exchange_ptr(&entry->evp, digest);
413+
other_digest = _Py_atomic_exchange_ptr(&entry->evp, (void *)digest);
414414
#else
415415
entry->evp = digest;
416416
#endif
@@ -422,7 +422,7 @@ py_digest_by_name(PyObject *module, const char *name, enum Py_hash_type py_ht)
422422
digest = PY_EVP_MD_fetch(entry->ossl_name, "-fips");
423423
#ifdef Py_GIL_DISABLED
424424
// exchange just in case another thread did same thing at same time
425-
other_digest = _Py_atomic_exchange_ptr(&entry->evp_nosecurity, digest);
425+
other_digest = _Py_atomic_exchange_ptr(&entry->evp_nosecurity, (void *)digest);
426426
#else
427427
entry->evp_nosecurity = digest;
428428
#endif

0 commit comments

Comments
 (0)