diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-08-19 23:38:00 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-08-19 23:38:00 (GMT) |
commit | ea5e5990c9a26b81b149417239e0fe435a621818 (patch) | |
tree | 292d25b2c3c698ef4f5dd34a98356f840b95751c /Modules/_sre.c | |
parent | 7fbac45287e13cf721f363614f699ffcfbcee2af (diff) | |
download | cpython-ea5e5990c9a26b81b149417239e0fe435a621818.zip cpython-ea5e5990c9a26b81b149417239e0fe435a621818.tar.gz cpython-ea5e5990c9a26b81b149417239e0fe435a621818.tar.bz2 |
pattern_subx() now uses fast call
Issue #27128.
Diffstat (limited to 'Modules/_sre.c')
-rw-r--r-- | Modules/_sre.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Modules/_sre.c b/Modules/_sre.c index 6f8ec0e..3e8d7f8 100644 --- a/Modules/_sre.c +++ b/Modules/_sre.c @@ -1056,7 +1056,6 @@ pattern_subx(PatternObject* self, PyObject* ptemplate, PyObject* string, PyObject* joiner; PyObject* item; PyObject* filter; - PyObject* args; PyObject* match; void* ptr; Py_ssize_t status; @@ -1158,13 +1157,7 @@ pattern_subx(PatternObject* self, PyObject* ptemplate, PyObject* string, 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; |