diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-02-10 12:32:29 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2017-02-10 12:32:29 (GMT) |
commit | 766af559ad967dcf5b2810331c331fe8773b8ef3 (patch) | |
tree | 614fd016c90bd3dd9c10dc9b819c151cb6f42616 /Python/modsupport.c | |
parent | 109a9fe7960c5bac931aa817e57da7556d64e4a6 (diff) | |
download | cpython-766af559ad967dcf5b2810331c331fe8773b8ef3.zip cpython-766af559ad967dcf5b2810331c331fe8773b8ef3.tar.gz cpython-766af559ad967dcf5b2810331c331fe8773b8ef3.tar.bz2 |
Issue #29465: Add Objects/call.c file
* Move all functions to call objects in a new Objects/call.c file.
* Rename fast_function() to _PyFunction_FastCallKeywords().
* Copy null_error() from Objects/abstract.c
* Inline type_error() in call.c to not have to copy it, it was only
called once.
* Export _PyEval_EvalCodeWithName() since it is now called
from call.c.
Diffstat (limited to 'Python/modsupport.c')
-rw-r--r-- | Python/modsupport.c | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/Python/modsupport.c b/Python/modsupport.c index e9e025b..9637191 100644 --- a/Python/modsupport.c +++ b/Python/modsupport.c @@ -586,57 +586,6 @@ va_build_stack(PyObject **small_stack, Py_ssize_t small_stack_len, } -PyObject * -PyEval_CallFunction(PyObject *callable, const char *format, ...) -{ - va_list vargs; - PyObject *args; - PyObject *res; - - va_start(vargs, format); - - args = Py_VaBuildValue(format, vargs); - va_end(vargs); - - if (args == NULL) - return NULL; - - res = PyEval_CallObject(callable, args); - Py_DECREF(args); - - return res; -} - - -PyObject * -PyEval_CallMethod(PyObject *obj, const char *name, const char *format, ...) -{ - va_list vargs; - PyObject *meth; - PyObject *args; - PyObject *res; - - meth = PyObject_GetAttrString(obj, name); - if (meth == NULL) - return NULL; - - va_start(vargs, format); - - args = Py_VaBuildValue(format, vargs); - va_end(vargs); - - if (args == NULL) { - Py_DECREF(meth); - return NULL; - } - - res = PyEval_CallObject(meth, args); - Py_DECREF(meth); - Py_DECREF(args); - - return res; -} - int PyModule_AddObject(PyObject *m, const char *name, PyObject *o) { |