Kaydet (Commit) 14b4feac authored tarafından Fredrik Lundh's avatar Fredrik Lundh

renamed to _elementtree (for Python 2.5)

üst 0c53bfd3
...@@ -2522,7 +2522,7 @@ static PyMethodDef _functions[] = { ...@@ -2522,7 +2522,7 @@ static PyMethodDef _functions[] = {
}; };
DL_EXPORT(void) DL_EXPORT(void)
initcElementTree(void) init_elementtree(void)
{ {
PyObject* m; PyObject* m;
PyObject* g; PyObject* g;
...@@ -2537,7 +2537,7 @@ initcElementTree(void) ...@@ -2537,7 +2537,7 @@ initcElementTree(void)
XMLParser_Type.ob_type = &PyType_Type; XMLParser_Type.ob_type = &PyType_Type;
#endif #endif
m = Py_InitModule("cElementTree", _functions); m = Py_InitModule("_elementtree", _functions);
/* python glue code */ /* python glue code */
...@@ -2554,13 +2554,13 @@ initcElementTree(void) ...@@ -2554,13 +2554,13 @@ initcElementTree(void)
"from copy import copy, deepcopy\n" "from copy import copy, deepcopy\n"
"try:\n" "try:\n"
" from elementtree import ElementTree\n" " from xml.etree import ElementTree\n"
"except ImportError:\n" "except ImportError:\n"
" import ElementTree\n" " import ElementTree\n"
"ET = ElementTree\n" "ET = ElementTree\n"
"del ElementTree\n" "del ElementTree\n"
"import cElementTree\n" "import _elementtree as cElementTree\n"
"try:\n" /* check if copy works as is */ "try:\n" /* check if copy works as is */
" copy(cElementTree.Element('x'))\n" " copy(cElementTree.Element('x'))\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment