[pypy-svn] r63231 - pypy/trunk/pypy/module/pyexpat

afa at codespeak.net afa at codespeak.net
Mon Mar 23 15:43:55 CET 2009


Author: afa
Date: Mon Mar 23 15:43:53 2009
New Revision: 63231

Modified:
   pypy/trunk/pypy/module/pyexpat/interp_pyexpat.py
Log:
A few r_uint conversions to please the rtyper on 64bit platforms
"arithmetic is not supported for rffi.INT"


Modified: pypy/trunk/pypy/module/pyexpat/interp_pyexpat.py
==============================================================================
--- pypy/trunk/pypy/module/pyexpat/interp_pyexpat.py	(original)
+++ pypy/trunk/pypy/module/pyexpat/interp_pyexpat.py	Mon Mar 23 15:43:53 2009
@@ -6,6 +6,7 @@
 from pypy.objspace.descroperation import object_setattr
 from pypy.rpython.lltypesystem import rffi, lltype
 from pypy.rlib.unroll import unrolling_iterable
+from pypy.rlib.rarithmetic import r_uint
 
 from pypy.rpython.tool import rffi_platform
 from pypy.translator.tool.cbuild import ExternalCompilationInfo
@@ -168,7 +169,7 @@
         result_error = "None"
 
     if name == 'CharacterDataHandler':
-        pre_code = 'if parser.buffer_string(space, w_arg0, arg1): return'
+        pre_code = 'if parser.buffer_string(space, w_arg0, r_uint(arg1)): return'
     else:
         pre_code = 'parser.flush_character_buffer(space)'
 
@@ -339,7 +340,7 @@
 
     def w_convert_charp_n(self, space, data, length):
         if data:
-            return self.w_convert(space, rffi.charp2strn(data, length))
+            return self.w_convert(space, rffi.charp2strn(data, r_uint(length)))
         else:
             return space.w_None
 



More information about the Pypy-commit mailing list