summaryrefslogtreecommitdiffstats
path: root/Python/ceval_gil.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-07-01 23:44:07 (GMT)
committerGitHub <noreply@github.com>2023-07-01 23:44:07 (GMT)
commit18b1fdebe0cd5e601aa341227c13ec9d89bdf32c (patch)
tree701bc6f8ffcafff8eddc462192276a4d483f1a7b /Python/ceval_gil.c
parent0530f4f64629ff97f3feb7524da0833b9535e8b6 (diff)
downloadcpython-18b1fdebe0cd5e601aa341227c13ec9d89bdf32c.zip
cpython-18b1fdebe0cd5e601aa341227c13ec9d89bdf32c.tar.gz
cpython-18b1fdebe0cd5e601aa341227c13ec9d89bdf32c.tar.bz2
gh-106320: Remove _PyInterpreterState_Get() alias (#106321)
Replace calls to the (removed) slow _PyInterpreterState_Get() with fast inlined _PyInterpreterState_GET() function.
Diffstat (limited to 'Python/ceval_gil.c')
-rw-r--r--Python/ceval_gil.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/ceval_gil.c b/Python/ceval_gil.c
index bb1279f..c6b1f9e 100644
--- a/Python/ceval_gil.c
+++ b/Python/ceval_gil.c
@@ -491,7 +491,7 @@ _ready:
void _PyEval_SetSwitchInterval(unsigned long microseconds)
{
- PyInterpreterState *interp = _PyInterpreterState_Get();
+ PyInterpreterState *interp = _PyInterpreterState_GET();
struct _gil_runtime_state *gil = interp->ceval.gil;
assert(gil != NULL);
gil->interval = microseconds;
@@ -499,7 +499,7 @@ void _PyEval_SetSwitchInterval(unsigned long microseconds)
unsigned long _PyEval_GetSwitchInterval(void)
{
- PyInterpreterState *interp = _PyInterpreterState_Get();
+ PyInterpreterState *interp = _PyInterpreterState_GET();
struct _gil_runtime_state *gil = interp->ceval.gil;
assert(gil != NULL);
return gil->interval;