[pypy-svn] pypy default: Fix on 64bit. It was hidden by the signal module's extra level around callbacks...

arigo commits-noreply at bitbucket.org
Sat Apr 9 10:24:35 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r43245:2548807e92bd
Date: 2011-04-09 10:24 +0200
http://bitbucket.org/pypy/pypy/changeset/2548807e92bd/

Log:	Fix on 64bit. It was hidden by the signal module's extra level
	around callbacks...

diff --git a/pypy/module/pyexpat/interp_pyexpat.py b/pypy/module/pyexpat/interp_pyexpat.py
--- a/pypy/module/pyexpat/interp_pyexpat.py
+++ b/pypy/module/pyexpat/interp_pyexpat.py
@@ -253,8 +253,10 @@
     except OperationError, e:
         parser._exc_info = e
         XML_StopParser(parser.itself, XML_FALSE)
-        return 0
-    return 1
+        result = 0
+    else:
+        result = 1
+    return rffi.cast(rffi.INT, result)
 callback_type = lltype.Ptr(lltype.FuncType(
     [rffi.VOIDP, rffi.CCHARP, XML_Encoding_Ptr], rffi.INT))
 XML_SetUnknownEncodingHandler = expat_external(


More information about the Pypy-commit mailing list