summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index beabfeb..5fa555e 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -3214,8 +3214,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
Py_INCREF(self);
func = PyMethod_GET_FUNCTION(func);
Py_INCREF(func);
- Py_DECREF(*pfunc);
- *pfunc = self;
+ Py_SETREF(*pfunc, self);
na++;
/* n++; */
} else
@@ -4670,8 +4669,7 @@ call_function(PyObject ***pp_stack, int oparg
Py_INCREF(self);
func = PyMethod_GET_FUNCTION(func);
Py_INCREF(func);
- Py_DECREF(*pfunc);
- *pfunc = self;
+ Py_SETREF(*pfunc, self);
na++;
n++;
} else