[Python-checkins] cpython: Issue #14007: drop unused TreeBuilder().xml.

florent.xicluna python-checkins at python.org
Mon Mar 5 10:43:02 CET 2012


http://hg.python.org/cpython/rev/39cc025968f1
changeset: 75410:39cc025968f1
user: Florent Xicluna <florent.xicluna at gmail.com>
date: Mon Mar 05 10:28:42 2012 +0100
summary:
 Issue #14007: drop unused TreeBuilder().xml.
files:
 Modules/_elementtree.c | 23 -----------------------
 1 files changed, 0 insertions(+), 23 deletions(-)
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
--- a/Modules/_elementtree.c
+++ b/Modules/_elementtree.c
@@ -1699,13 +1699,6 @@
 /* handlers */
 
 LOCAL(PyObject*)
-treebuilder_handle_xml(TreeBuilderObject* self, PyObject* encoding,
- PyObject* standalone)
-{
- Py_RETURN_NONE;
-}
-
-LOCAL(PyObject*)
 treebuilder_handle_start(TreeBuilderObject* self, PyObject* tag,
 PyObject* attrib)
 {
@@ -1976,22 +1969,10 @@
 return treebuilder_handle_start(self, tag, attrib);
 }
 
-static PyObject*
-treebuilder_xml(TreeBuilderObject* self, PyObject* args)
-{
- PyObject* encoding;
- PyObject* standalone;
- if (!PyArg_ParseTuple(args, "OO:xml", &encoding, &standalone))
- return NULL;
-
- return treebuilder_handle_xml(self, encoding, standalone);
-}
-
 static PyMethodDef treebuilder_methods[] = {
 {"data", (PyCFunction) treebuilder_data, METH_VARARGS},
 {"start", (PyCFunction) treebuilder_start, METH_VARARGS},
 {"end", (PyCFunction) treebuilder_end, METH_VARARGS},
- {"xml", (PyCFunction) treebuilder_xml, METH_VARARGS},
 {"close", (PyCFunction) treebuilder_close, METH_VARARGS},
 {NULL, NULL}
 };
@@ -2052,8 +2033,6 @@
 
 PyObject* names;
 
- PyObject* handle_xml;
-
 PyObject* handle_start;
 PyObject* handle_data;
 PyObject* handle_end;
@@ -2506,7 +2485,6 @@
 Py_INCREF(target);
 self->target = target;
 
- self->handle_xml = PyObject_GetAttrString(target, "xml");
 self->handle_start = PyObject_GetAttrString(target, "start");
 self->handle_data = PyObject_GetAttrString(target, "data");
 self->handle_end = PyObject_GetAttrString(target, "end");
@@ -2562,7 +2540,6 @@
 Py_XDECREF(self->handle_end);
 Py_XDECREF(self->handle_data);
 Py_XDECREF(self->handle_start);
- Py_XDECREF(self->handle_xml);
 
 Py_DECREF(self->target);
 Py_DECREF(self->entity);
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /