@@ -4825,25 +4825,18 @@ _PyEval_GetAsyncGenFinalizer(void)
48254825 return tstate -> async_gen_finalizer ;
48264826}
48274827
4828- static PyFrameObject *
4829- _PyEval_GetFrame (PyThreadState * tstate )
4830- {
4831- _PyRuntimeState * runtime = tstate -> interp -> runtime ;
4832- return runtime -> gilstate .getframe (tstate );
4833- }
4834-
48354828PyFrameObject *
48364829PyEval_GetFrame (void )
48374830{
48384831 PyThreadState * tstate = _PyThreadState_GET ();
4839- return _PyEval_GetFrame ( tstate ) ;
4832+ return tstate -> frame ;
48404833}
48414834
48424835PyObject *
48434836PyEval_GetBuiltins (void )
48444837{
48454838 PyThreadState * tstate = _PyThreadState_GET ();
4846- PyFrameObject * current_frame = _PyEval_GetFrame ( tstate ) ;
4839+ PyFrameObject * current_frame = tstate -> frame ;
48474840 if (current_frame == NULL )
48484841 return tstate -> interp -> builtins ;
48494842 else
@@ -4869,7 +4862,7 @@ PyObject *
48694862PyEval_GetLocals (void )
48704863{
48714864 PyThreadState * tstate = _PyThreadState_GET ();
4872- PyFrameObject * current_frame = _PyEval_GetFrame ( tstate ) ;
4865+ PyFrameObject * current_frame = tstate -> frame ;
48734866 if (current_frame == NULL ) {
48744867 _PyErr_SetString (tstate , PyExc_SystemError , "frame does not exist" );
48754868 return NULL ;
@@ -4887,7 +4880,7 @@ PyObject *
48874880PyEval_GetGlobals (void )
48884881{
48894882 PyThreadState * tstate = _PyThreadState_GET ();
4890- PyFrameObject * current_frame = _PyEval_GetFrame ( tstate ) ;
4883+ PyFrameObject * current_frame = tstate -> frame ;
48914884 if (current_frame == NULL ) {
48924885 return NULL ;
48934886 }
@@ -4900,7 +4893,7 @@ int
49004893PyEval_MergeCompilerFlags (PyCompilerFlags * cf )
49014894{
49024895 PyThreadState * tstate = _PyThreadState_GET ();
4903- PyFrameObject * current_frame = _PyEval_GetFrame ( tstate ) ;
4896+ PyFrameObject * current_frame = tstate -> frame ;
49044897 int result = cf -> cf_flags != 0 ;
49054898
49064899 if (current_frame != NULL ) {
0 commit comments