summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Python/ceval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index b320f61..e233099 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -3484,8 +3484,9 @@ call_function(PyObject ***pp_stack, int oparg
*/
if (PyCFunction_Check(func) && nk == 0) {
int flags = PyCFunction_GET_FLAGS(func);
- PCALL(PCALL_CFUNCTION);
PyThreadState *tstate = PyThreadState_GET();
+
+ PCALL(PCALL_CFUNCTION);
if (flags & (METH_NOARGS | METH_O)) {
PyCFunction meth = PyCFunction_GET_FUNCTION(func);
PyObject *self = PyCFunction_GET_SELF(func);