[pypy-svn] r76108 - pypy/branch/fast-forward/pypy/rlib/rstruct

benjamin at codespeak.net benjamin at codespeak.net
Sun Jul 11 19:05:05 CEST 2010


Author: benjamin
Date: Sun Jul 11 19:05:03 2010
New Revision: 76108

Modified:
   pypy/branch/fast-forward/pypy/rlib/rstruct/standardfmttable.py
Log:
get a character for ord()

Modified: pypy/branch/fast-forward/pypy/rlib/rstruct/standardfmttable.py
==============================================================================
--- pypy/branch/fast-forward/pypy/rlib/rstruct/standardfmttable.py	(original)
+++ pypy/branch/fast-forward/pypy/rlib/rstruct/standardfmttable.py	Sun Jul 11 19:05:03 2010
@@ -150,7 +150,8 @@
 
 @specialize.argtype(0)
 def unpack_bool(fmtiter):
-    fmtiter.appendobj(bool(ord(fmtiter.read(1))))
+    c = ord(fmtiter.read(1)[0])
+    fmtiter.appendobj(bool(c))
 
 @specialize.argtype(0)
 def unpack_string(fmtiter, count):



More information about the Pypy-commit mailing list