(original) (raw)
changeset: 102788:2954d2aa4c90 user: Victor Stinner victor.stinner@gmail.com date: Sat Aug 20 01:38:00 2016 +0200 files: Modules/_sre.c description: pattern_subx() now uses fast call Issue #27128. diff -r abb93035ebb7 -r 2954d2aa4c90 Modules/_sre.c --- a/Modules/_sre.c Sat Aug 20 01:34:44 2016 +0200 +++ b/Modules/_sre.c Sat Aug 20 01:38:00 2016 +0200 @@ -1056,7 +1056,6 @@ PyObject* joiner; PyObject* item; PyObject* filter; - PyObject* args; PyObject* match; void* ptr; Py_ssize_t status; @@ -1158,13 +1157,7 @@ match = pattern_new_match(self, &state, 1); if (!match) goto error; - args = PyTuple_Pack(1, match); - if (!args) { - Py_DECREF(match); - goto error; - } - item = PyObject_CallObject(filter, args); - Py_DECREF(args); + item = _PyObject_FastCall(filter, &match, 1, NULL); Py_DECREF(match); if (!item) goto error; /victor.stinner@gmail.com