summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-12-04 21:59:09 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-12-04 21:59:09 (GMT)
commitde4ae3d4869e88dda8bfbad24880cb398160a7a0 (patch)
treeb8c42842a31f408c9fe09993e19fba49d60b2dcf /Python
parentc8d03187ff85326ab8b24af06f8a4e391365f42a (diff)
downloadcpython-de4ae3d4869e88dda8bfbad24880cb398160a7a0.zip
cpython-de4ae3d4869e88dda8bfbad24880cb398160a7a0.tar.gz
cpython-de4ae3d4869e88dda8bfbad24880cb398160a7a0.tar.bz2
Backed out changeset b9c9691c72c5
Issue #28858: The change b9c9691c72c5 introduced a regression. It seems like _PyObject_CallArg1() uses more stack memory than PyObject_CallFunctionObjArgs().
Diffstat (limited to 'Python')
-rw-r--r--Python/_warnings.c2
-rw-r--r--Python/bltinmodule.c8
-rw-r--r--Python/ceval.c6
-rw-r--r--Python/import.c2
-rw-r--r--Python/sysmodule.c2
5 files changed, 10 insertions, 10 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c
index 1b2c6cd..cecc8ad 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -415,7 +415,7 @@ call_show_warning(PyObject *category, PyObject *text, PyObject *message,
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 --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 1b53897..5c92545 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -469,7 +469,7 @@ filter_next(filterobject *lz)
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 @@ min_max(PyObject *args, PyObject *kwds, int op)
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 @@ builtin_round(PyObject *self, PyObject *args, PyObject *kwds)
}
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 --git a/Python/ceval.c b/Python/ceval.c
index b615bd9..ca876e0 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1756,7 +1756,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
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 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
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 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
}
SET_TOP(exit);
Py_DECREF(mgr);
- res = _PyObject_CallNoArg(enter);
+ res = PyObject_CallFunctionObjArgs(enter, NULL);
Py_DECREF(enter);
if (res == NULL)
goto error;
diff --git a/Python/import.c b/Python/import.c
index a12b9e2..6bcb1d7 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -985,7 +985,7 @@ get_path_importer(PyObject *path_importer_cache, PyObject *path_hooks,
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 --git a/Python/sysmodule.c b/Python/sysmodule.c
index 19a3850..98a6674 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -1098,7 +1098,7 @@ _PySys_GetSizeOf(PyObject *o)
Py_TYPE(o)->tp_name);
}
else {
- res = _PyObject_CallNoArg(method);
+ res = PyObject_CallFunctionObjArgs(method, NULL);
Py_DECREF(method);
}