[pypy-svn] pypy jit-shadowstack: Fix translation: 'count' was an unsigned number here.

arigo commits-noreply at bitbucket.org
Fri Apr 1 14:01:52 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: jit-shadowstack
Changeset: r43079:08ddd81eb627
Date: 2011-04-01 12:02 +0000
http://bitbucket.org/pypy/pypy/changeset/08ddd81eb627/

Log:	Fix translation: 'count' was an unsigned number here.

diff --git a/pypy/module/cpyext/eval.py b/pypy/module/cpyext/eval.py
--- a/pypy/module/cpyext/eval.py
+++ b/pypy/module/cpyext/eval.py
@@ -112,6 +112,7 @@
     try:
         while True:
             count = fread(buf, 1, BUF_SIZE, fp)
+            count = rffi.cast(lltype.Signed, count)
             source += rffi.charpsize2str(buf, count)
             if count < BUF_SIZE:
                 if feof(fp):


More information about the Pypy-commit mailing list