Skip to content

Commit 924193a

Browse files
make things more robust
1 parent 71c91ec commit 924193a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Python/ceval.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,9 +1149,6 @@ typedef struct {
11491149
PyObject* DONT_SLP_VECTORIZE
11501150
_PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int throwflag)
11511151
{
1152-
_Py_EnsureTstateNotNULL(tstate);
1153-
CALL_STAT_INC(pyeval_calls);
1154-
11551152
/* +1 because vectorcall might use -1 to write self */
11561153
/* gh-138115: This must not be in individual cases for
11571154
non-tail-call interpreters, as it results in excessive
@@ -1163,6 +1160,10 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
11631160
PyObject *STACKREF_SCRATCH[MAX_STACKREF_SCRATCH+1];
11641161
#endif
11651162

1163+
_Py_EnsureTstateNotNULL(tstate);
1164+
CALL_STAT_INC(pyeval_calls);
1165+
1166+
11661167
#if USE_COMPUTED_GOTOS && !Py_TAIL_CALL_INTERP
11671168
/* Import the static jump table */
11681169
#include "opcode_targets.h"

0 commit comments

Comments
 (0)