Skip to content

Commit

Permalink
ensure GIL state in Hyperscan error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
darvid committed May 2, 2019
1 parent d7e7572 commit 440fee2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hyperscan/hyperscanmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
#define HANDLE_HYPERSCAN_ERR(err, rv) if (err != HS_SUCCESS) { \
char serr[80]; \
sprintf(serr, "error code %i", err); \
PyGILState_STATE gstate = PyGILState_Ensure(); \
PyErr_SetString(HyperscanError, serr); \
PyGILState_Release(gstate); \
return rv; \
}

Expand Down

0 comments on commit 440fee2

Please sign in to comment.