Add missing Py_DECREF in fast_cfunction. Partial fix for SF bug

#127699.
This commit is contained in:
Charles G. Waldman 2001-01-10 22:11:59 +00:00
parent 2a78cf2288
commit eec72a7fd9
1 changed files with 6 additions and 3 deletions

View File

@ -2769,9 +2769,12 @@ fast_cfunction(PyObject *func, PyObject ***pp_stack, int na)
if (na == 0)
return (*meth)(self, NULL);
else if (na == 1)
return (*meth)(self, EXT_POP(*pp_stack));
else {
else if (na == 1) {
PyObject *arg = EXT_POP(*pp_stack);
PyObject *result = (*meth)(self, arg);
Py_DECREF(arg);
return result;
} else {
PyObject *args = load_args(pp_stack, na);
PyObject *result = (*meth)(self, args);
Py_DECREF(args);