From 758b74e71eb22e1e83a9eb937d1c015e461745a1 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Tue, 7 Dec 2021 18:56:06 -0700 Subject: bpo-46008: Add _PyInterpreterState_Main(). (gh-29978) PyInterpreterState_Main() is a plain function exposed in the public C-API. For internal usage we can take the more efficient approach in this PR. https://bugs.python.org/issue46008 --- Python/pystate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/pystate.c') diff --git a/Python/pystate.c b/Python/pystate.c index f94019d029..f21673e9c3 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -1204,7 +1204,7 @@ PyInterpreterState_Head(void) PyInterpreterState * PyInterpreterState_Main(void) { - return _PyRuntime.interpreters.main; + return _PyInterpreterState_Main(); } PyInterpreterState * -- cgit v1.2.1