summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-08-22 20:48:54 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-08-22 20:48:54 (GMT)
commit559bb6a71399af3b1b2a0ba97230d2bcc649e993 (patch)
tree94927374ac025ae249aa487ce4a17df99c3df2d8 /Objects
parentc98afb7a26ac611a4544c5b8dd445d8ea05e6360 (diff)
downloadcpython-559bb6a71399af3b1b2a0ba97230d2bcc649e993.zip
cpython-559bb6a71399af3b1b2a0ba97230d2bcc649e993.tar.gz
cpython-559bb6a71399af3b1b2a0ba97230d2bcc649e993.tar.bz2
Rename _PyObject_FastCall() to _PyObject_FastCallDict()
Issue #27809: * Rename _PyObject_FastCall() function to _PyObject_FastCallDict() * Add _PyObject_FastCall(), _PyObject_CallNoArg() and _PyObject_CallArg1() macros calling _PyObject_FastCallDict()
Diffstat (limited to 'Objects')
-rw-r--r--Objects/abstract.c12
-rw-r--r--Objects/fileobject.c2
-rw-r--r--Objects/iterobject.c2
-rw-r--r--Objects/typeobject.c14
4 files changed, 15 insertions, 15 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 32d4575..2ce7f32 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -2255,12 +2255,12 @@ _PyStack_AsTuple(PyObject **stack, Py_ssize_t nargs)
}
PyObject *
-_PyObject_FastCall(PyObject *func, PyObject **args, int nargs, PyObject *kwargs)
+_PyObject_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs)
{
ternaryfunc call;
PyObject *result = NULL;
- /* _PyObject_FastCall() must not be called with an exception set,
+ /* _PyObject_FastCallDict() must not be called with an exception set,
because it may clear it (directly or indirectly) and so the
caller loses its exception */
assert(!PyErr_Occurred());
@@ -2318,7 +2318,7 @@ call_function_tail(PyObject *callable, PyObject *args)
assert(args != NULL);
if (!PyTuple_Check(args)) {
- result = _PyObject_FastCall(callable, &args, 1, NULL);
+ result = _PyObject_CallArg1(callable, args);
}
else {
result = PyObject_Call(callable, args, NULL);
@@ -2338,7 +2338,7 @@ PyObject_CallFunction(PyObject *callable, const char *format, ...)
}
if (!format || !*format) {
- return _PyObject_FastCall(callable, NULL, 0, NULL);
+ return _PyObject_CallNoArg(callable);
}
va_start(va, format);
@@ -2364,7 +2364,7 @@ _PyObject_CallFunction_SizeT(PyObject *callable, const char *format, ...)
}
if (!format || !*format) {
- return _PyObject_FastCall(callable, NULL, 0, NULL);
+ return _PyObject_CallNoArg(callable);
}
va_start(va, format);
@@ -2392,7 +2392,7 @@ callmethod(PyObject* func, const char *format, va_list va, int is_size_t)
}
if (!format || !*format) {
- return _PyObject_FastCall(func, NULL, 0, NULL);
+ return _PyObject_CallNoArg(func);
}
if (is_size_t) {
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index 83348a8..f442418 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -146,7 +146,7 @@ PyFile_WriteObject(PyObject *v, PyObject *f, int flags)
Py_DECREF(writer);
return -1;
}
- result = _PyObject_FastCall(writer, &value, 1, NULL);
+ result = _PyObject_CallArg1(writer, value);
Py_DECREF(value);
Py_DECREF(writer);
if (result == NULL)
diff --git a/Objects/iterobject.c b/Objects/iterobject.c
index a8e6e1c..75b2fcb 100644
--- a/Objects/iterobject.c
+++ b/Objects/iterobject.c
@@ -214,7 +214,7 @@ calliter_iternext(calliterobject *it)
return NULL;
}
- result = _PyObject_FastCall(it->it_callable, NULL, 0, NULL);
+ result = _PyObject_CallNoArg(it->it_callable);
if (result != NULL) {
int ok;
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 0f18355..544d0b5 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -1450,7 +1450,7 @@ call_method(PyObject *o, _Py_Identifier *nameid, const char *format, ...)
Py_DECREF(args);
}
else {
- retval = _PyObject_FastCall(func, NULL, 0, NULL);
+ retval = _PyObject_CallNoArg(func);
}
Py_DECREF(func);
@@ -1490,7 +1490,7 @@ call_maybe(PyObject *o, _Py_Identifier *nameid, const char *format, ...)
Py_DECREF(args);
}
else {
- retval = _PyObject_FastCall(func, NULL, 0, NULL);
+ retval = _PyObject_CallNoArg(func);
}
Py_DECREF(func);
@@ -5834,7 +5834,7 @@ slot_sq_item(PyObject *self, Py_ssize_t i)
goto error;
}
- retval = _PyObject_FastCall(func, &ival, 1, NULL);
+ retval = _PyObject_CallArg1(func, ival);
Py_DECREF(func);
Py_DECREF(ival);
return retval;
@@ -5875,7 +5875,7 @@ slot_sq_contains(PyObject *self, PyObject *value)
return -1;
}
if (func != NULL) {
- res = _PyObject_FastCall(func, &value, 1, NULL);
+ res = _PyObject_CallArg1(func, value);
Py_DECREF(func);
if (res != NULL) {
result = PyObject_IsTrue(res);
@@ -5967,7 +5967,7 @@ slot_nb_bool(PyObject *self)
using_len = 1;
}
- value = _PyObject_FastCall(func, NULL, 0, NULL);
+ value = _PyObject_CallNoArg(func);
if (value == NULL) {
goto error;
}
@@ -6245,7 +6245,7 @@ slot_tp_richcompare(PyObject *self, PyObject *other, int op)
PyErr_Clear();
Py_RETURN_NOTIMPLEMENTED;
}
- res = _PyObject_FastCall(func, &other, 1, NULL);
+ res = _PyObject_CallArg1(func, other);
Py_DECREF(func);
return res;
}
@@ -6266,7 +6266,7 @@ slot_tp_iter(PyObject *self)
}
if (func != NULL) {
- res = _PyObject_FastCall(func, NULL, 0, NULL);
+ res = _PyObject_CallNoArg(func);
Py_DECREF(func);
return res;
}