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

afa at codespeak.net afa at codespeak.net
Thu Apr 22 12:57:18 CEST 2010


Author: afa
Date: Thu Apr 22 12:57:17 2010
New Revision: 73959

Modified:
   pypy/branch/cpython-extension/pypy/module/cpyext/api.py
Log:
still not the correct approach IMO,
but at least reduce the number of warnings, and fix errors with C++


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	Thu Apr 22 12:57:17 2010
@@ -626,7 +626,7 @@
             typ = typ.replace("*", "")
         pypy_decls.append('PyAPI_DATA(%s) %s;' % (typ, name_clean))
         if not globals_are_pointers and "#" not in name:
-            pypy_decls.append("#define %s &%s" % (name, name,))
+            pypy_decls.append("#define %s (PyObject*)&%s" % (name, name,))
     pypy_decls.append("#endif /*PYPY_STANDALONE*/\n")
 
     pypy_decl_h = udir.join('pypy_decl.h')



More information about the Pypy-commit mailing list