gh-106320: Use _PyInterpreterState_GET() (#106336)

Replace PyInterpreterState_Get() with inlined
_PyInterpreterState_GET().
This commit is contained in:
Victor Stinner 2023-07-02 18:37:37 +02:00 committed by GitHub
parent 9a51a41961
commit bc7eb17084
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 34 additions and 35 deletions

View file

@ -36,6 +36,7 @@
#include "Python.h"
#include "pycore_moduleobject.h" // _PyModule_GetState()
#include "pycore_pystate.h" // _PyInterpreterState_GET
#include "structmember.h" // PyMemberDef
@ -133,7 +134,7 @@ overlapped_dealloc(OverlappedObject *self)
{
/* The operation is no longer pending -- nothing to do. */
}
else if (_Py_IsInterpreterFinalizing(PyInterpreterState_Get()))
else if (_Py_IsInterpreterFinalizing(_PyInterpreterState_GET()))
{
/* The operation is still pending -- give a warning. This
will probably only happen on Windows XP. */