changeset: 105458:d35fc6e58a70 user: Victor Stinner date: Sun Dec 04 22:59:09 2016 +0100 files: Modules/_asynciomodule.c Modules/_csv.c Modules/_elementtree.c Modules/_json.c Modules/_ssl.c Modules/_struct.c Modules/_testbuffer.c Modules/gcmodule.c Modules/itertoolsmodule.c Modules/mathmodule.c Modules/posixmodule.c Objects/abstract.c Objects/bytearrayobject.c Objects/bytesobject.c Objects/complexobject.c Objects/descrobject.c Objects/dictobject.c Objects/enumobject.c Objects/floatobject.c Objects/genobject.c Objects/listobject.c Objects/longobject.c Objects/memoryobject.c Objects/object.c Objects/odictobject.c Objects/typeobject.c Objects/unicodeobject.c Objects/weakrefobject.c Python/_warnings.c Python/bltinmodule.c Python/ceval.c Python/import.c Python/sysmodule.c description: Backed out changeset b9c9691c72c5 Issue #28858: The change b9c9691c72c5 introduced a regression. It seems like _PyObject_CallArg1() uses more stack memory than PyObject_CallFunctionObjArgs(). diff -r fd1bd563d2f3 -r d35fc6e58a70 Modules/_asynciomodule.c --- a/Modules/_asynciomodule.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Modules/_asynciomodule.c Sun Dec 04 22:59:09 2016 +0100 @@ -721,7 +721,8 @@ _asyncio_Future__repr_info_impl(FutureObj *self) /*[clinic end generated code: output=fa69e901bd176cfb input=f21504d8e2ae1ca2]*/ { - return _PyObject_CallArg1(asyncio_future_repr_info_func, self); + return PyObject_CallFunctionObjArgs( + asyncio_future_repr_info_func, self, NULL); } /*[clinic input] @@ -1536,7 +1537,8 @@ _asyncio_Task__repr_info_impl(TaskObj *self) /*[clinic end generated code: output=6a490eb66d5ba34b input=3c6d051ed3ddec8b]*/ { - return _PyObject_CallArg1(asyncio_task_repr_info_func, self); + return PyObject_CallFunctionObjArgs( + asyncio_task_repr_info_func, self, NULL); } /*[clinic input] @@ -1896,7 +1898,7 @@ return NULL; } - PyObject *e = _PyObject_CallArg1(et, msg); + PyObject *e = PyObject_CallFunctionObjArgs(et, msg, NULL); Py_DECREF(msg); if (e == NULL) { return NULL; @@ -1946,7 +1948,7 @@ if (!exc) { /* exc was not a CancelledError */ - exc = _PyObject_CallNoArg(asyncio_CancelledError); + exc = PyObject_CallFunctionObjArgs(asyncio_CancelledError, NULL); if (!exc) { goto fail; } @@ -2179,7 +2181,7 @@ } /* Check if `result` is a generator */ - o = _PyObject_CallArg1(inspect_isgenerator, result); + o = PyObject_CallFunctionObjArgs(inspect_isgenerator, result, NULL); if (o == NULL) { /* An exception in inspect.isgenerator */ goto fail; diff -r fd1bd563d2f3 -r d35fc6e58a70 Modules/_csv.c --- a/Modules/_csv.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Modules/_csv.c Sun Dec 04 22:59:09 2016 +0100 @@ -1259,7 +1259,7 @@ (void *) self->rec, self->rec_len); if (line == NULL) return NULL; - result = _PyObject_CallArg1(self->writeline, line); + result = PyObject_CallFunctionObjArgs(self->writeline, line, NULL); Py_DECREF(line); return result; } diff -r fd1bd563d2f3 -r d35fc6e58a70 Modules/_elementtree.c --- a/Modules/_elementtree.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Modules/_elementtree.c Sun Dec 04 22:59:09 2016 +0100 @@ -2457,7 +2457,7 @@ PyObject *event = PyTuple_Pack(2, action, node); if (event == NULL) return -1; - res = _PyObject_CallArg1(self->events_append, event); + res = PyObject_CallFunctionObjArgs(self->events_append, event, NULL); Py_DECREF(event); if (res == NULL) return -1; diff -r fd1bd563d2f3 -r d35fc6e58a70 Modules/_json.c --- a/Modules/_json.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Modules/_json.c Sun Dec 04 22:59:09 2016 +0100 @@ -813,14 +813,14 @@ *next_idx_ptr = idx + 1; if (has_pairs_hook) { - val = _PyObject_CallArg1(s->object_pairs_hook, rval); + val = PyObject_CallFunctionObjArgs(s->object_pairs_hook, rval, NULL); Py_DECREF(rval); return val; } /* if object_hook is not None: rval = object_hook(rval) */ if (s->object_hook != Py_None) { - val = _PyObject_CallArg1(s->object_hook, rval); + val = PyObject_CallFunctionObjArgs(s->object_hook, rval, NULL); Py_DECREF(rval); return val; } @@ -924,7 +924,7 @@ return NULL; /* rval = parse_constant(constant) */ - rval = _PyObject_CallArg1(s->parse_constant, cstr); + rval = PyObject_CallFunctionObjArgs(s->parse_constant, cstr, NULL); idx += PyUnicode_GET_LENGTH(cstr); Py_DECREF(cstr); *next_idx_ptr = idx; @@ -1023,7 +1023,7 @@ idx - start); if (numstr == NULL) return NULL; - rval = _PyObject_CallArg1(custom_func, numstr); + rval = PyObject_CallFunctionObjArgs(custom_func, numstr, NULL); } else { Py_ssize_t i, n; @@ -1475,7 +1475,7 @@ if (s->fast_encode) return s->fast_encode(NULL, obj); else - return _PyObject_CallArg1(s->encoder, obj); + return PyObject_CallFunctionObjArgs(s->encoder, obj, NULL); } static int @@ -1553,7 +1553,7 @@ return -1; } } - newobj = _PyObject_CallArg1(s->defaultfn, obj); + newobj = PyObject_CallFunctionObjArgs(s->defaultfn, obj, NULL); if (newobj == NULL) { Py_XDECREF(ident); return -1; diff -r fd1bd563d2f3 -r d35fc6e58a70 Modules/_ssl.c --- a/Modules/_ssl.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Modules/_ssl.c Sun Dec 04 22:59:09 2016 +0100 @@ -3197,7 +3197,7 @@ PySSL_END_ALLOW_THREADS_S(pw_info->thread_state); if (pw_info->callable) { - fn_ret = _PyObject_CallNoArg(pw_info->callable); + fn_ret = PyObject_CallFunctionObjArgs(pw_info->callable, NULL); if (!fn_ret) { /* TODO: It would be nice to move _ctypes_add_traceback() into the core python API, so we could use it to add a frame here */ diff -r fd1bd563d2f3 -r d35fc6e58a70 Modules/_struct.c --- a/Modules/_struct.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Modules/_struct.c Sun Dec 04 22:59:09 2016 +0100 @@ -2046,7 +2046,7 @@ return s_object; } - s_object = _PyObject_CallArg1((PyObject *)(&PyStructType), fmt); + s_object = PyObject_CallFunctionObjArgs((PyObject *)(&PyStructType), fmt, NULL); if (s_object != NULL) { if (PyDict_Size(cache) >= MAXCACHE) PyDict_Clear(cache); diff -r fd1bd563d2f3 -r d35fc6e58a70 Modules/_testbuffer.c --- a/Modules/_testbuffer.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Modules/_testbuffer.c Sun Dec 04 22:59:09 2016 +0100 @@ -312,7 +312,7 @@ assert(PyObject_CheckBuffer(obj)); assert(PyList_Check(items) || PyTuple_Check(items)); - structobj = _PyObject_CallArg1(Struct, format); + structobj = PyObject_CallFunctionObjArgs(Struct, format, NULL); if (structobj == NULL) return -1; @@ -406,7 +406,7 @@ if (format == NULL) goto out; - structobj = _PyObject_CallArg1(Struct, format); + structobj = PyObject_CallFunctionObjArgs(Struct, format, NULL); if (structobj == NULL) goto out; @@ -620,7 +620,7 @@ if (ndim == 0) { memcpy(item, ptr, itemsize); - x = _PyObject_CallArg1(unpack_from, mview); + x = PyObject_CallFunctionObjArgs(unpack_from, mview, NULL); if (x == NULL) return NULL; if (PyTuple_GET_SIZE(x) == 1) { @@ -696,7 +696,7 @@ if (format == NULL) goto out; - structobj = _PyObject_CallArg1(Struct, format); + structobj = PyObject_CallFunctionObjArgs(Struct, format, NULL); Py_DECREF(format); if (structobj == NULL) goto out; @@ -788,7 +788,7 @@ PyObject *tmp; Py_ssize_t itemsize; - tmp = _PyObject_CallArg1(calcsize, format); + tmp = PyObject_CallFunctionObjArgs(calcsize, format, NULL); if (tmp == NULL) return -1; itemsize = PyLong_AsSsize_t(tmp); diff -r fd1bd563d2f3 -r d35fc6e58a70 Modules/gcmodule.c --- a/Modules/gcmodule.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Modules/gcmodule.c Sun Dec 04 22:59:09 2016 +0100 @@ -709,7 +709,7 @@ assert(callback != NULL); /* copy-paste of weakrefobject.c's handle_callback() */ - temp = _PyObject_CallArg1(callback, wr); + temp = PyObject_CallFunctionObjArgs(callback, wr, NULL); if (temp == NULL) PyErr_WriteUnraisable(callback); else diff -r fd1bd563d2f3 -r d35fc6e58a70 Modules/itertoolsmodule.c --- a/Modules/itertoolsmodule.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Modules/itertoolsmodule.c Sun Dec 04 22:59:09 2016 +0100 @@ -101,7 +101,7 @@ newkey = newvalue; Py_INCREF(newvalue); } else { - newkey = _PyObject_CallArg1(gbo->keyfunc, newvalue); + newkey = PyObject_CallFunctionObjArgs(gbo->keyfunc, newvalue, NULL); if (newkey == NULL) { Py_DECREF(newvalue); return NULL; @@ -293,7 +293,7 @@ newkey = newvalue; Py_INCREF(newvalue); } else { - newkey = _PyObject_CallArg1(gbo->keyfunc, newvalue); + newkey = PyObject_CallFunctionObjArgs(gbo->keyfunc, newvalue, NULL); if (newkey == NULL) { Py_DECREF(newvalue); return NULL; @@ -1130,7 +1130,7 @@ if (lz->start == 1) return item; - good = _PyObject_CallArg1(lz->func, item); + good = PyObject_CallFunctionObjArgs(lz->func, item, NULL); if (good == NULL) { Py_DECREF(item); return NULL; @@ -1296,7 +1296,7 @@ if (item == NULL) return NULL; - good = _PyObject_CallArg1(lz->func, item); + good = PyObject_CallFunctionObjArgs(lz->func, item, NULL); if (good == NULL) { Py_DECREF(item); return NULL; @@ -3824,7 +3824,7 @@ ok = PyObject_IsTrue(item); } else { PyObject *good; - good = _PyObject_CallArg1(lz->func, item); + good = PyObject_CallFunctionObjArgs(lz->func, item, NULL); if (good == NULL) { Py_DECREF(item); return NULL; diff -r fd1bd563d2f3 -r d35fc6e58a70 Modules/mathmodule.c --- a/Modules/mathmodule.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Modules/mathmodule.c Sun Dec 04 22:59:09 2016 +0100 @@ -951,7 +951,7 @@ return NULL; return math_1_to_int(number, ceil, 0); } - result = _PyObject_CallNoArg(method); + result = PyObject_CallFunctionObjArgs(method, NULL); Py_DECREF(method); return result; } @@ -991,7 +991,7 @@ return NULL; return math_1_to_int(number, floor, 0); } - result = _PyObject_CallNoArg(method); + result = PyObject_CallFunctionObjArgs(method, NULL); Py_DECREF(method); return result; } @@ -1542,7 +1542,7 @@ Py_TYPE(number)->tp_name); return NULL; } - result = _PyObject_CallNoArg(trunc); + result = PyObject_CallFunctionObjArgs(trunc, NULL); Py_DECREF(trunc); return result; } diff -r fd1bd563d2f3 -r d35fc6e58a70 Modules/posixmodule.c --- a/Modules/posixmodule.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Modules/posixmodule.c Sun Dec 04 22:59:09 2016 +0100 @@ -902,7 +902,7 @@ goto error_exit; } - o = to_cleanup = _PyObject_CallNoArg(func); + o = to_cleanup = PyObject_CallFunctionObjArgs(func, NULL); Py_DECREF(func); if (NULL == o) { goto error_exit; @@ -12041,7 +12041,7 @@ Py_TYPE(path)->tp_name); } - path_repr = _PyObject_CallNoArg(func); + path_repr = PyObject_CallFunctionObjArgs(func, NULL); Py_DECREF(func); if (NULL == path_repr) { return NULL; diff -r fd1bd563d2f3 -r d35fc6e58a70 Objects/abstract.c --- a/Objects/abstract.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Objects/abstract.c Sun Dec 04 22:59:09 2016 +0100 @@ -103,7 +103,7 @@ } return defaultvalue; } - result = _PyObject_CallNoArg(hint); + result = PyObject_CallFunctionObjArgs(hint, NULL); Py_DECREF(hint); if (result == NULL) { if (PyErr_ExceptionMatches(PyExc_TypeError)) { @@ -716,7 +716,7 @@ } /* And call it. */ - result = _PyObject_CallArg1(meth, format_spec); + result = PyObject_CallFunctionObjArgs(meth, format_spec, NULL); Py_DECREF(meth); if (result && !PyUnicode_Check(result)) { @@ -3011,7 +3011,7 @@ Py_DECREF(checker); return ok; } - res = _PyObject_CallArg1(checker, inst); + res = PyObject_CallFunctionObjArgs(checker, inst, NULL); Py_LeaveRecursiveCall(); Py_DECREF(checker); if (res != NULL) { @@ -3085,7 +3085,7 @@ Py_DECREF(checker); return ok; } - res = _PyObject_CallArg1(checker, derived); + res = PyObject_CallFunctionObjArgs(checker, derived, NULL); Py_LeaveRecursiveCall(); Py_DECREF(checker); if (res != NULL) { diff -r fd1bd563d2f3 -r d35fc6e58a70 Objects/bytearrayobject.c --- a/Objects/bytearrayobject.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Objects/bytearrayobject.c Sun Dec 04 22:59:09 2016 +0100 @@ -98,7 +98,8 @@ PyObject * PyByteArray_FromObject(PyObject *input) { - return _PyObject_CallArg1((PyObject *)&PyByteArray_Type, input); + return PyObject_CallFunctionObjArgs((PyObject *)&PyByteArray_Type, + input, NULL); } PyObject * @@ -1984,7 +1985,8 @@ { PyObject *result = _PyBytes_FromHex(string, type == &PyByteArray_Type); if (type != &PyByteArray_Type && result != NULL) { - Py_SETREF(result, _PyObject_CallArg1((PyObject *)type, result)); + Py_SETREF(result, PyObject_CallFunctionObjArgs((PyObject *)type, + result, NULL)); } return result; } diff -r fd1bd563d2f3 -r d35fc6e58a70 Objects/bytesobject.c --- a/Objects/bytesobject.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Objects/bytesobject.c Sun Dec 04 22:59:09 2016 +0100 @@ -549,7 +549,7 @@ /* does it support __bytes__? */ func = _PyObject_LookupSpecial(v, &PyId___bytes__); if (func != NULL) { - result = _PyObject_CallNoArg(func); + result = PyObject_CallFunctionObjArgs(func, NULL); Py_DECREF(func); if (result == NULL) return NULL; @@ -2331,7 +2331,8 @@ { PyObject *result = _PyBytes_FromHex(string, 0); if (type != &PyBytes_Type && result != NULL) { - Py_SETREF(result, _PyObject_CallArg1((PyObject *)type, result)); + Py_SETREF(result, PyObject_CallFunctionObjArgs((PyObject *)type, + result, NULL)); } return result; } @@ -2568,7 +2569,7 @@ PyObject_Bytes doesn't do. */ func = _PyObject_LookupSpecial(x, &PyId___bytes__); if (func != NULL) { - new = _PyObject_CallNoArg(func); + new = PyObject_CallFunctionObjArgs(func, NULL); Py_DECREF(func); if (new == NULL) return NULL; diff -r fd1bd563d2f3 -r d35fc6e58a70 Objects/complexobject.c --- a/Objects/complexobject.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Objects/complexobject.c Sun Dec 04 22:59:09 2016 +0100 @@ -273,7 +273,7 @@ f = _PyObject_LookupSpecial(op, &PyId___complex__); if (f) { - PyObject *res = _PyObject_CallNoArg(f); + PyObject *res = PyObject_CallFunctionObjArgs(f, NULL); Py_DECREF(f); if (res != NULL && !PyComplex_Check(res)) { PyErr_SetString(PyExc_TypeError, diff -r fd1bd563d2f3 -r d35fc6e58a70 Objects/descrobject.c --- a/Objects/descrobject.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Objects/descrobject.c Sun Dec 04 22:59:09 2016 +0100 @@ -1414,7 +1414,7 @@ return -1; } if (value == NULL) - res = _PyObject_CallArg1(func, obj); + res = PyObject_CallFunctionObjArgs(func, obj, NULL); else res = PyObject_CallFunctionObjArgs(func, obj, value, NULL); if (res == NULL) diff -r fd1bd563d2f3 -r d35fc6e58a70 Objects/dictobject.c --- a/Objects/dictobject.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Objects/dictobject.c Sun Dec 04 22:59:09 2016 +0100 @@ -2066,7 +2066,8 @@ _Py_IDENTIFIER(__missing__); missing = _PyObject_LookupSpecial((PyObject *)mp, &PyId___missing__); if (missing != NULL) { - res = _PyObject_CallArg1(missing, key); + res = PyObject_CallFunctionObjArgs(missing, + key, NULL); Py_DECREF(missing); return res; } diff -r fd1bd563d2f3 -r d35fc6e58a70 Objects/enumobject.c --- a/Objects/enumobject.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Objects/enumobject.c Sun Dec 04 22:59:09 2016 +0100 @@ -258,7 +258,7 @@ return NULL; } if (reversed_meth != NULL) { - PyObject *res = _PyObject_CallNoArg(reversed_meth); + PyObject *res = PyObject_CallFunctionObjArgs(reversed_meth, NULL); Py_DECREF(reversed_meth); return res; } diff -r fd1bd563d2f3 -r d35fc6e58a70 Objects/floatobject.c --- a/Objects/floatobject.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Objects/floatobject.c Sun Dec 04 22:59:09 2016 +0100 @@ -1439,7 +1439,7 @@ goto parse_error; result = PyFloat_FromDouble(negate ? -x : x); if (cls != (PyObject *)&PyFloat_Type && result != NULL) { - Py_SETREF(result, _PyObject_CallArg1(cls, result)); + Py_SETREF(result, PyObject_CallFunctionObjArgs(cls, result, NULL)); } return result; diff -r fd1bd563d2f3 -r d35fc6e58a70 Objects/genobject.c --- a/Objects/genobject.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Objects/genobject.c Sun Dec 04 22:59:09 2016 +0100 @@ -43,7 +43,7 @@ /* Save the current exception, if any. */ PyErr_Fetch(&error_type, &error_value, &error_traceback); - res = _PyObject_CallArg1(finalizer, self); + res = PyObject_CallFunctionObjArgs(finalizer, self, NULL); if (res == NULL) { PyErr_WriteUnraisable(self); @@ -591,7 +591,7 @@ * * (See PyErr_SetObject/_PyErr_CreateException code for details.) */ - e = _PyObject_CallArg1(PyExc_StopIteration, value); + e = PyObject_CallFunctionObjArgs(PyExc_StopIteration, value, NULL); if (e == NULL) { return -1; } diff -r fd1bd563d2f3 -r d35fc6e58a70 Objects/listobject.c --- a/Objects/listobject.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Objects/listobject.c Sun Dec 04 22:59:09 2016 +0100 @@ -1970,7 +1970,8 @@ } for (i = 0; i < saved_ob_size ; i++) { - keys[i] = _PyObject_CallArg1(keyfunc, saved_ob_item[i]); + keys[i] = PyObject_CallFunctionObjArgs(keyfunc, saved_ob_item[i], + NULL); if (keys[i] == NULL) { for (i=i-1 ; i>=0 ; i--) Py_DECREF(keys[i]); diff -r fd1bd563d2f3 -r d35fc6e58a70 Objects/longobject.c --- a/Objects/longobject.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Objects/longobject.c Sun Dec 04 22:59:09 2016 +0100 @@ -5282,7 +5282,8 @@ Py_DECREF(bytes); if (type != &PyLong_Type) { - Py_SETREF(long_obj, _PyObject_CallArg1((PyObject *)type, long_obj)); + Py_SETREF(long_obj, PyObject_CallFunctionObjArgs((PyObject *)type, + long_obj, NULL)); } return long_obj; diff -r fd1bd563d2f3 -r d35fc6e58a70 Objects/memoryobject.c --- a/Objects/memoryobject.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Objects/memoryobject.c Sun Dec 04 22:59:09 2016 +0100 @@ -1939,7 +1939,7 @@ if (format == NULL) goto error; - structobj = _PyObject_CallArg1(Struct, format); + structobj = PyObject_CallFunctionObjArgs(Struct, format, NULL); if (structobj == NULL) goto error; @@ -1978,7 +1978,7 @@ PyObject *v; memcpy(x->item, ptr, x->itemsize); - v = _PyObject_CallArg1(x->unpack_from, x->mview); + v = PyObject_CallFunctionObjArgs(x->unpack_from, x->mview, NULL); if (v == NULL) return NULL; diff -r fd1bd563d2f3 -r d35fc6e58a70 Objects/object.c --- a/Objects/object.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Objects/object.c Sun Dec 04 22:59:09 2016 +0100 @@ -596,7 +596,7 @@ func = _PyObject_LookupSpecial(v, &PyId___bytes__); if (func != NULL) { - result = _PyObject_CallNoArg(func); + result = PyObject_CallFunctionObjArgs(func, NULL); Py_DECREF(func); if (result == NULL) return NULL; @@ -1314,7 +1314,7 @@ return NULL; } /* use __dir__ */ - result = _PyObject_CallNoArg(dirfunc); + result = PyObject_CallFunctionObjArgs(dirfunc, NULL); Py_DECREF(dirfunc); if (result == NULL) return NULL; diff -r fd1bd563d2f3 -r d35fc6e58a70 Objects/odictobject.c --- a/Objects/odictobject.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Objects/odictobject.c Sun Dec 04 22:59:09 2016 +0100 @@ -1256,7 +1256,7 @@ if (PyODict_CheckExact(od)) od_copy = PyODict_New(); else - od_copy = _PyObject_CallNoArg((PyObject *)Py_TYPE(od)); + od_copy = PyObject_CallFunctionObjArgs((PyObject *)Py_TYPE(od), NULL); if (od_copy == NULL) return NULL; diff -r fd1bd563d2f3 -r d35fc6e58a70 Objects/typeobject.c --- a/Objects/typeobject.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Objects/typeobject.c Sun Dec 04 22:59:09 2016 +0100 @@ -3487,7 +3487,9 @@ sorted = _PyDict_GetItemId(builtins, &PyId_sorted); if (sorted == NULL) goto error; - sorted_methods = _PyObject_CallArg1(sorted, abstract_methods); + sorted_methods = PyObject_CallFunctionObjArgs(sorted, + abstract_methods, + NULL); if (sorted_methods == NULL) goto error; comma = _PyUnicode_FromId(&comma_id); @@ -6191,7 +6193,7 @@ else attr = descr; } - res = _PyObject_CallArg1(attr, name); + res = PyObject_CallFunctionObjArgs(attr, name, NULL); Py_XDECREF(descr); return res; } diff -r fd1bd563d2f3 -r d35fc6e58a70 Objects/unicodeobject.c --- a/Objects/unicodeobject.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Objects/unicodeobject.c Sun Dec 04 22:59:09 2016 +0100 @@ -4269,7 +4269,7 @@ if (*exceptionObject == NULL) goto onError; - restuple = _PyObject_CallArg1(*errorHandler, *exceptionObject); + restuple = PyObject_CallFunctionObjArgs(*errorHandler, *exceptionObject, NULL); if (restuple == NULL) goto onError; if (!PyTuple_Check(restuple)) { @@ -4368,7 +4368,7 @@ if (*exceptionObject == NULL) goto onError; - restuple = _PyObject_CallArg1(*errorHandler, *exceptionObject); + restuple = PyObject_CallFunctionObjArgs(*errorHandler, *exceptionObject, NULL); if (restuple == NULL) goto onError; if (!PyTuple_Check(restuple)) { @@ -6649,7 +6649,8 @@ if (*exceptionObject == NULL) return NULL; - restuple = _PyObject_CallArg1(*errorHandler, *exceptionObject); + restuple = PyObject_CallFunctionObjArgs( + *errorHandler, *exceptionObject, NULL); if (restuple == NULL) return NULL; if (!PyTuple_Check(restuple)) { @@ -8643,7 +8644,8 @@ if (*exceptionObject == NULL) return NULL; - restuple = _PyObject_CallArg1(*errorHandler, *exceptionObject); + restuple = PyObject_CallFunctionObjArgs( + *errorHandler, *exceptionObject, NULL); if (restuple == NULL) return NULL; if (!PyTuple_Check(restuple)) { diff -r fd1bd563d2f3 -r d35fc6e58a70 Objects/weakrefobject.c --- a/Objects/weakrefobject.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Objects/weakrefobject.c Sun Dec 04 22:59:09 2016 +0100 @@ -867,7 +867,7 @@ static void handle_callback(PyWeakReference *ref, PyObject *callback) { - PyObject *cbresult = _PyObject_CallArg1(callback, ref); + PyObject *cbresult = PyObject_CallFunctionObjArgs(callback, ref, NULL); if (cbresult == NULL) PyErr_WriteUnraisable(callback); diff -r fd1bd563d2f3 -r d35fc6e58a70 Python/_warnings.c --- a/Python/_warnings.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Python/_warnings.c Sun Dec 04 22:59:09 2016 +0100 @@ -415,7 +415,7 @@ if (msg == NULL) goto error; - res = _PyObject_CallArg1(show_fn, msg); + res = PyObject_CallFunctionObjArgs(show_fn, msg, NULL); Py_DECREF(show_fn); Py_DECREF(msg); diff -r fd1bd563d2f3 -r d35fc6e58a70 Python/bltinmodule.c --- a/Python/bltinmodule.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Python/bltinmodule.c Sun Dec 04 22:59:09 2016 +0100 @@ -469,7 +469,7 @@ ok = PyObject_IsTrue(item); } else { PyObject *good; - good = _PyObject_CallArg1(lz->func, item); + good = PyObject_CallFunctionObjArgs(lz->func, item, NULL); if (good == NULL) { Py_DECREF(item); return NULL; @@ -1519,7 +1519,7 @@ while (( item = PyIter_Next(it) )) { /* get the value from the key function */ if (keyfunc != NULL) { - val = _PyObject_CallArg1(keyfunc, item); + val = PyObject_CallFunctionObjArgs(keyfunc, item, NULL); if (val == NULL) goto Fail_it_item; } @@ -2044,9 +2044,9 @@ } if (ndigits == NULL || ndigits == Py_None) - result = _PyObject_CallNoArg(round); + result = PyObject_CallFunctionObjArgs(round, NULL); else - result = _PyObject_CallArg1(round, ndigits); + result = PyObject_CallFunctionObjArgs(round, ndigits, NULL); Py_DECREF(round); return result; } diff -r fd1bd563d2f3 -r d35fc6e58a70 Python/ceval.c --- a/Python/ceval.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Python/ceval.c Sun Dec 04 22:59:09 2016 +0100 @@ -1756,7 +1756,7 @@ Py_DECREF(value); goto error; } - res = _PyObject_CallArg1(hook, value); + res = PyObject_CallFunctionObjArgs(hook, value, NULL); Py_DECREF(value); if (res == NULL) goto error; @@ -3062,7 +3062,7 @@ Py_DECREF(mgr); if (enter == NULL) goto error; - res = _PyObject_CallNoArg(enter); + res = PyObject_CallFunctionObjArgs(enter, NULL); Py_DECREF(enter); if (res == NULL) goto error; @@ -3096,7 +3096,7 @@ } SET_TOP(exit); Py_DECREF(mgr); - res = _PyObject_CallNoArg(enter); + res = PyObject_CallFunctionObjArgs(enter, NULL); Py_DECREF(enter); if (res == NULL) goto error; diff -r fd1bd563d2f3 -r d35fc6e58a70 Python/import.c --- a/Python/import.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Python/import.c Sun Dec 04 22:59:09 2016 +0100 @@ -985,7 +985,7 @@ PyObject *hook = PyList_GetItem(path_hooks, j); if (hook == NULL) return NULL; - importer = _PyObject_CallArg1(hook, p); + importer = PyObject_CallFunctionObjArgs(hook, p, NULL); if (importer != NULL) break; diff -r fd1bd563d2f3 -r d35fc6e58a70 Python/sysmodule.c --- a/Python/sysmodule.c Sun Dec 04 11:00:57 2016 -0800 +++ b/Python/sysmodule.c Sun Dec 04 22:59:09 2016 +0100 @@ -1098,7 +1098,7 @@ Py_TYPE(o)->tp_name); } else { - res = _PyObject_CallNoArg(method); + res = PyObject_CallFunctionObjArgs(method, NULL); Py_DECREF(method); }