cpython: 2954d2aa4c90 (original) (raw)
Mercurial > cpython
changeset 102788:2954d2aa4c90
pattern_subx() now uses fast call Issue #27128. [#27128]
Victor Stinner victor.stinner@gmail.com | |
---|---|
date | Sat, 20 Aug 2016 01:38:00 +0200 |
parents | abb93035ebb7 |
children | 545bfa4c20eb |
files | Modules/_sre.c |
diffstat | 1 files changed, 1 insertions(+), 8 deletions(-)[+] [-] Modules/_sre.c 9 |
line wrap: on
line diff
--- a/Modules/_sre.c +++ b/Modules/_sre.c @@ -1056,7 +1056,6 @@ pattern_subx(PatternObject* self, PyObje PyObject* joiner; PyObject* item; PyObject* filter;
- PyObject* args; PyObject* match; void* ptr; Py_ssize_t status; @@ -1158,13 +1157,7 @@ pattern_subx(PatternObject* self, PyObje match = pattern_new_match(self, &state, 1); if (!match) goto error;
args = PyTuple_Pack(1, match);[](#l1.15)
if (!args) {[](#l1.16)
Py_DECREF(match);[](#l1.17)
goto error;[](#l1.18)
}[](#l1.19)
item = PyObject_CallObject(filter, args);[](#l1.20)
Py_DECREF(args);[](#l1.21)
item = _PyObject_FastCall(filter, &match, 1, NULL);[](#l1.22) Py_DECREF(match);[](#l1.23) if (!item)[](#l1.24) goto error;[](#l1.25)