cpython: 154f78d387f9 (original) (raw)
Mercurial > cpython
changeset 102785:154f78d387f9
call_trampoline() now uses fast call Issue #27128. [#27128]
Victor Stinner victor.stinner@gmail.com | |
---|---|
date | Sat, 20 Aug 2016 01:22:57 +0200 |
parents | e5b24f595235 |
children | 351b987d6d1c |
files | Python/sysmodule.c |
diffstat | 1 files changed, 12 insertions(+), 21 deletions(-)[+] [-] Python/sysmodule.c 33 |
line wrap: on
line diff
--- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -368,34 +368,25 @@ static PyObject call_trampoline(PyObject callback, PyFrameObject *frame, int what, PyObject *arg) {
- PyObject *args;
- PyObject *whatstr; PyObject *result; -
- args = PyTuple_New(3);
- if (args == NULL)
return NULL;[](#l1.13)
- if (PyFrame_FastToLocalsWithError(frame) < 0)
return NULL;[](#l1.15)
- Py_INCREF(frame);
- whatstr = whatstrings[what];
- Py_INCREF(whatstr);
- if (arg == NULL)
arg = Py_None;[](#l1.22)
- Py_INCREF(arg);
- PyTuple_SET_ITEM(args, 0, (PyObject *)frame);
- PyTuple_SET_ITEM(args, 1, whatstr);
- PyTuple_SET_ITEM(args, 2, arg);
- stack[0] = (PyObject *)frame;
- stack[1] = whatstrings[what];
- stack[2] = (arg != NULL) ? arg : Py_None;
/* call the Python-level function */