diff options
author | Petr Viktorin <encukou@gmail.com> | 2020-02-11 16:46:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-11 16:46:57 (GMT) |
commit | ffd9753a944916ced659b2c77aebe66a6c9fbab5 (patch) | |
tree | f3469bdca81c102afa811a39dd3eaa9643287e93 /Modules/_elementtree.c | |
parent | f3e7ea5b8c220cd63101e419d529c8563f9c6115 (diff) | |
download | cpython-ffd9753a944916ced659b2c77aebe66a6c9fbab5.zip cpython-ffd9753a944916ced659b2c77aebe66a6c9fbab5.tar.gz cpython-ffd9753a944916ced659b2c77aebe66a6c9fbab5.tar.bz2 |
bpo-39245: Switch to public API for Vectorcall (GH-18460)
The bulk of this patch was generated automatically with:
for name in \
PyObject_Vectorcall \
Py_TPFLAGS_HAVE_VECTORCALL \
PyObject_VectorcallMethod \
PyVectorcall_Function \
PyObject_CallOneArg \
PyObject_CallMethodNoArgs \
PyObject_CallMethodOneArg \
;
do
echo $name
git grep -lwz _$name | xargs -0 sed -i "s/\b_$name\b/$name/g"
done
old=_PyObject_FastCallDict
new=PyObject_VectorcallDict
git grep -lwz $old | xargs -0 sed -i "s/\b$old\b/$new/g"
and then cleaned up:
- Revert changes to in docs & news
- Revert changes to backcompat defines in headers
- Nudge misaligned comments
Diffstat (limited to 'Modules/_elementtree.c')
-rw-r--r-- | Modules/_elementtree.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c index c096eab..a04b295 100644 --- a/Modules/_elementtree.c +++ b/Modules/_elementtree.c @@ -2671,7 +2671,7 @@ treebuilder_append_event(TreeBuilderObject *self, PyObject *action, PyObject *event = PyTuple_Pack(2, action, node); if (event == NULL) return -1; - res = _PyObject_CallOneArg(self->events_append, event); + res = PyObject_CallOneArg(self->events_append, event); Py_DECREF(event); if (res == NULL) return -1; @@ -2837,7 +2837,7 @@ treebuilder_handle_comment(TreeBuilderObject* self, PyObject* text) } if (self->comment_factory) { - comment = _PyObject_CallOneArg(self->comment_factory, text); + comment = PyObject_CallOneArg(self->comment_factory, text); if (!comment) return NULL; @@ -3179,7 +3179,7 @@ expat_set_error(enum XML_Error error_code, Py_ssize_t line, Py_ssize_t column, if (errmsg == NULL) return; - error = _PyObject_CallOneArg(st->parseerror_obj, errmsg); + error = PyObject_CallOneArg(st->parseerror_obj, errmsg); Py_DECREF(errmsg); if (!error) return; @@ -3242,7 +3242,7 @@ expat_default_handler(XMLParserObject* self, const XML_Char* data_in, (TreeBuilderObject*) self->target, value ); else if (self->handle_data) - res = _PyObject_CallOneArg(self->handle_data, value); + res = PyObject_CallOneArg(self->handle_data, value); else res = NULL; Py_XDECREF(res); @@ -3353,7 +3353,7 @@ expat_data_handler(XMLParserObject* self, const XML_Char* data_in, /* shortcut */ res = treebuilder_handle_data((TreeBuilderObject*) self->target, data); else if (self->handle_data) - res = _PyObject_CallOneArg(self->handle_data, data); + res = PyObject_CallOneArg(self->handle_data, data); else res = NULL; @@ -3380,7 +3380,7 @@ expat_end_handler(XMLParserObject* self, const XML_Char* tag_in) else if (self->handle_end) { tag = makeuniversal(self, tag_in); if (tag) { - res = _PyObject_CallOneArg(self->handle_end, tag); + res = PyObject_CallOneArg(self->handle_end, tag); Py_DECREF(tag); } } @@ -3467,7 +3467,7 @@ expat_end_ns_handler(XMLParserObject* self, const XML_Char* prefix_in) if (!prefix) return; - res = _PyObject_CallOneArg(self->handle_end_ns, prefix); + res = PyObject_CallOneArg(self->handle_end_ns, prefix); Py_DECREF(prefix); } @@ -3499,7 +3499,7 @@ expat_comment_handler(XMLParserObject* self, const XML_Char* comment_in) if (!comment) return; - res = _PyObject_CallOneArg(self->handle_comment, comment); + res = PyObject_CallOneArg(self->handle_comment, comment); Py_XDECREF(res); Py_DECREF(comment); } |