summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2005-12-16 22:06:43 (GMT)
committerFredrik Lundh <fredrik@pythonware.com>2005-12-16 22:06:43 (GMT)
commit6d52b55c562e1c06811fa9816fe7ce708efa6a28 (patch)
treeffad5e131ecf6222a2a15704b5f472ca5468b41f
parent8c8836b40652e7e3ce86172c847f0febb32976c1 (diff)
downloadcpython-6d52b55c562e1c06811fa9816fe7ce708efa6a28.zip
cpython-6d52b55c562e1c06811fa9816fe7ce708efa6a28.tar.gz
cpython-6d52b55c562e1c06811fa9816fe7ce708efa6a28.tar.bz2
updating to cElementTree 1.0.5 (step 3 of 3)
-rw-r--r--Modules/_elementtree.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
index fe479cf..4ba70c7 100644
--- a/Modules/_elementtree.c
+++ b/Modules/_elementtree.c
@@ -41,6 +41,9 @@
* http://www.pythonware.com
*/
+/* Licensed to PSF under a Contributor Agreement. */
+/* See http://www.python.org/2.4/license for licensing details. */
+
#include "Python.h"
#define VERSION "1.0.5"
@@ -2568,7 +2571,7 @@ static PyMethodDef _functions[] = {
};
DL_EXPORT(void)
-initcElementTree(void)
+init_elementtree(void)
{
PyObject* m;
PyObject* g;
@@ -2583,7 +2586,7 @@ initcElementTree(void)
XMLParser_Type.ob_type = &PyType_Type;
#endif
- m = Py_InitModule("cElementTree", _functions);
+ m = Py_InitModule("_elementtree", _functions);
/* python glue code */
@@ -2600,13 +2603,13 @@ initcElementTree(void)
"from copy import copy, deepcopy\n"
"try:\n"
- " from elementtree import ElementTree\n"
+ " from xml.etree import ElementTree\n"
"except ImportError:\n"
" import ElementTree\n"
"ET = ElementTree\n"
"del ElementTree\n"
- "import cElementTree\n"
+ "import _elementtree as cElementTree\n"
"try:\n" /* check if copy works as is */
" copy(cElementTree.Element('x'))\n"