mirror of
https://github.com/python/cpython.git
synced 2025-08-23 02:04:56 +00:00
gh-106320: Remove _PyInterpreterState_Get() alias (#106321)
Replace calls to the (removed) slow _PyInterpreterState_Get() with fast inlined _PyInterpreterState_GET() function.
This commit is contained in:
parent
0530f4f646
commit
18b1fdebe0
11 changed files with 29 additions and 22 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue