diff options
| author | Nikita Sobolev <mail@sobolevn.me> | 2023-01-20 18:01:30 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-20 18:01:30 (GMT) |
| commit | 8be6992620db18bea31c7f75a33c7dcc3782e95a (patch) | |
| tree | 305df9d3431fe48323cffa198eda057e62c58fb8 /Python | |
| parent | 3847a6c64b96bb2cb93be394a590d4df2c35e876 (diff) | |
| download | cpython-8be6992620db18bea31c7f75a33c7dcc3782e95a.zip cpython-8be6992620db18bea31c7f75a33c7dcc3782e95a.tar.gz cpython-8be6992620db18bea31c7f75a33c7dcc3782e95a.tar.bz2 | |
gh-101181: Fix `unused-variable` warning in `pystate.c` (#101188)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Diffstat (limited to 'Python')
| -rw-r--r-- | Python/pystate.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index 464e5d6..5c1636a 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -1878,11 +1878,14 @@ _PyGILState_SetTstate(PyThreadState *tstate) * interpreter is responsible to initialize it. */ return _PyStatus_OK(); } + +#ifndef NDEBUG _PyRuntimeState *runtime = tstate->interp->runtime; assert(runtime->gilstate.autoInterpreterState == tstate->interp); assert(current_tss_get(runtime) == tstate); assert(tstate->gilstate_counter == 1); +#endif return _PyStatus_OK(); } |
