Skip to content

Commit

Permalink
fixed ansi c compatibility in pythoncapi_compact
Browse files Browse the repository at this point in the history
  • Loading branch information
shailist committed Jan 29, 2023
1 parent 4f2da68 commit 45800cd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pythoncapi_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,11 @@ static inline void PyThreadState_EnterTracing(PyThreadState *tstate)
#if PY_VERSION_HEX < 0x030B00A2 && !defined(PYPY_VERSION)
static inline void PyThreadState_LeaveTracing(PyThreadState *tstate)
{
int use_tracing;

tstate->tracing--;
int use_tracing = (tstate->c_tracefunc != NULL
|| tstate->c_profilefunc != NULL);
use_tracing = (tstate->c_tracefunc != NULL
|| tstate->c_profilefunc != NULL);
#if PY_VERSION_HEX >= 0x030A00A1
tstate->cframe->use_tracing = use_tracing;
#else
Expand Down

0 comments on commit 45800cd

Please sign in to comment.