[pypy-commit] cffi cffi-1.0: improve readability of the generated file

arigo noreply at buildbot.pypy.org
Sat Apr 18 12:58:26 CEST 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: cffi-1.0
Changeset: r1753:25edcc21fda2
Date: 2015-04-18 12:59 +0200
http://bitbucket.org/cffi/cffi/changeset/25edcc21fda2/

Log:	improve readability of the generated file

diff --git a/new/recompiler.py b/new/recompiler.py
--- a/new/recompiler.py
+++ b/new/recompiler.py
@@ -118,8 +118,8 @@
         #
         # the declaration of '_cffi_types'
         prnt('static void *_cffi_types[] = {')
-        for op in self.cffi_types:
-            prnt('  %s,' % (op.as_c_expr(),))
+        for i, op in enumerate(self.cffi_types):
+            prnt('/* %2d */ %s,' % (i, op.as_c_expr()))
         if not self.cffi_types:
             prnt('  0')
         prnt('};')


More information about the pypy-commit mailing list