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

fredrik.lundh python-checkins at python.org
Sun Dec 25 12:40:20 CET 2005


Author: fredrik.lundh
Date: Sun Dec 25 12:40:19 2005
New Revision: 41808

Modified:
   python/trunk/Modules/_elementtree.c
Log:
SF#1389809 

cast first PyUnicode_Decode argument to proper type (why is
"char *" used for encoded byte streams, btw?  shouldn't that
be "void *" or, if necessary, "unsigned char *"?)



Modified: python/trunk/Modules/_elementtree.c
==============================================================================
--- python/trunk/Modules/_elementtree.c	(original)
+++ python/trunk/Modules/_elementtree.c	Sun Dec 25 12:40:19 2005
@@ -2146,7 +2146,7 @@
     for (i = 0; i < 256; i++)
         s[i] = i;
     
-    u = PyUnicode_Decode(s, 256, name, "replace");
+    u = PyUnicode_Decode((char*) s, 256, name, "replace");
     if (!u)
         return XML_STATUS_ERROR;
 


More information about the Python-checkins mailing list