[pypy-svn] r73674 - pypy/branch/cpython-extension/pypy/module/cpyext

afa at codespeak.net afa at codespeak.net
Mon Apr 12 17:28:37 CEST 2010


Author: afa
Date: Mon Apr 12 17:28:36 2010
New Revision: 73674

Modified:
   pypy/branch/cpython-extension/pypy/module/cpyext/api.py
Log:
small beautification of pypy_decl.h


Modified: pypy/branch/cpython-extension/pypy/module/cpyext/api.py
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/api.py	(original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/api.py	Mon Apr 12 17:28:36 2010
@@ -563,11 +563,11 @@
     pypy_decls = []
     pypy_decls.append("#ifndef PYPY_STANDALONE\n")
     for name, func in sorted(FUNCTIONS.iteritems()):
-        restype = db.gettype(func.restype).replace('@', '')
+        restype = db.gettype(func.restype).replace('@', '').strip()
         args = []
         for i, argtype in enumerate(func.argtypes):
             arg = db.gettype(argtype)
-            arg = arg.replace('@', 'arg%d' % (i,))
+            arg = arg.replace('@', 'arg%d' % (i,)).strip()
             args.append(arg)
         args = ', '.join(args) or "void"
         header = "%s %s(%s)" % (restype, name, args)



More information about the Pypy-commit mailing list