[pypy-svn] pypy default: Fix translation.

arigo commits-noreply at bitbucket.org
Sun Dec 19 17:36:36 CET 2010


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r40135:42164a893f20
Date: 2010-12-19 17:36 +0100
http://bitbucket.org/pypy/pypy/changeset/42164a893f20/

Log:	Fix translation.

diff --git a/pypy/module/cpyext/structmember.py b/pypy/module/cpyext/structmember.py
--- a/pypy/module/cpyext/structmember.py
+++ b/pypy/module/cpyext/structmember.py
@@ -45,7 +45,8 @@
                 w_result = space.wrap(lltype.cast_primitive(lltype.Float,
                                                             result[0]))
             elif typ == T_BOOL:
-                w_result = space.wrap(result[0] != '\x00')
+                x = rffi.cast(lltype.Signed, result[0])
+                w_result = space.wrap(x != 0)
             else:
                 w_result = space.wrap(result[0])
             return w_result


More information about the Pypy-commit mailing list