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

@ -5,8 +5,9 @@
#endif
#include "Python.h"
#include "internal/pycore_interp.h"
#include "internal/pycore_typevarobject.h"
#include "pycore_interp.h"
#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "pycore_typevarobject.h"
#include "clinic/_typingmodule.c.h"
/*[clinic input]
@ -44,7 +45,7 @@ PyDoc_STRVAR(typing_doc,
static int
_typing_exec(PyObject *m)
{
PyInterpreterState *interp = PyInterpreterState_Get();
PyInterpreterState *interp = _PyInterpreterState_GET();
#define EXPORT_TYPE(name, typename) \
if (PyModule_AddObjectRef(m, name, \