Skip to content

Commit c048975

Browse files
committed
sync
1 parent 491b922 commit c048975

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Modules/hmacmodule.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,9 +390,11 @@ narrow_hmac_hash_kind(hmacmodule_state *state, HMAC_Hash_Kind kind)
390390
static int
391391
_hacl_convert_errno(hacl_errno_t code)
392392
{
393+
assert(PyGILState_GetThisThreadState() != NULL);
393394
if (code == Hacl_Streaming_Types_Success) {
394395
return 0;
395396
}
397+
396398
PyGILState_STATE gstate = PyGILState_Ensure();
397399
switch (code) {
398400
case Hacl_Streaming_Types_InvalidAlgorithm: {

0 commit comments

Comments
 (0)