[pypy-commit] pypy release-4.0.x: import cffi/60e372e91498 (Python3 fix only)

arigo noreply at buildbot.pypy.org
Mon Nov 16 06:16:11 EST 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: release-4.0.x
Changeset: r80711:22e46a230fef
Date: 2015-11-16 12:14 +0100
http://bitbucket.org/pypy/pypy/changeset/22e46a230fef/

Log:	import cffi/60e372e91498 (Python3 fix only)

diff --git a/lib_pypy/cffi/cparser.py b/lib_pypy/cffi/cparser.py
--- a/lib_pypy/cffi/cparser.py
+++ b/lib_pypy/cffi/cparser.py
@@ -62,7 +62,8 @@
         if csource.startswith('*', endpos):
             parts.append('('); closing += ')'
         level = 0
-        for i in xrange(endpos, len(csource)):
+        i = endpos
+        while i < len(csource):
             c = csource[i]
             if c == '(':
                 level += 1
@@ -73,6 +74,7 @@
             elif c in ',;=':
                 if level == 0:
                     break
+            i += 1
         csource = csource[endpos:i] + closing + csource[i:]
         #print repr(''.join(parts)+csource)
     parts.append(csource)


More information about the pypy-commit mailing list