[Python-checkins] commit of r41724 - python/trunk/Modules/_elementtree.c

fredrik.lundh python-checkins at python.org
Fri Dec 16 23:06:43 CET 2005


Author: fredrik.lundh
Date: Fri Dec 16 23:06:43 2005
New Revision: 41724
Modified:
 python/trunk/Modules/_elementtree.c
Log:
updating to cElementTree 1.0.5 (step 3 of 3)
Modified: python/trunk/Modules/_elementtree.c
==============================================================================
--- python/trunk/Modules/_elementtree.c	(original)
+++ python/trunk/Modules/_elementtree.c	Fri Dec 16 23:06:43 2005
@@ -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 @@
 };
 
 DL_EXPORT(void)
-initcElementTree(void)
+init_elementtree(void)
 {
 PyObject* m;
 PyObject* g;
@@ -2583,7 +2586,7 @@
 XMLParser_Type.ob_type = &PyType_Type;
 #endif
 
- m = Py_InitModule("cElementTree", _functions);
+ m = Py_InitModule("_elementtree", _functions);
 
 /* python glue code */
 
@@ -2600,13 +2603,13 @@
 "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"


More information about the Python-checkins mailing list

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