cpython: 8e085070ab28 (original) (raw)

--- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -1424,7 +1424,7 @@ static PyObject * call_method(PyObject *o, _Py_Identifier *nameid, const char *format, ...) { va_list va;

func = lookup_maybe(o, nameid); if (func == NULL) { @@ -1434,22 +1434,25 @@ call_method(PyObject *o, _Py_Identifier } if (format && *format) {

+ va_start(va, format); args = Py_VaBuildValue(format, va); va_end(va); +

+

-

-

+ Py_DECREF(func); return retval; @@ -1461,7 +1464,7 @@ static PyObject * call_maybe(PyObject *o, _Py_Identifier *nameid, const char *format, ...) { va_list va;

func = lookup_maybe(o, nameid); if (func == NULL) { @@ -1471,22 +1474,25 @@ call_maybe(PyObject *o, _Py_Identifier * } if (format && *format) {

+ va_start(va, format); args = Py_VaBuildValue(format, va); va_end(va); +

+

-

-

+ Py_DECREF(func); return retval;