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

afa at codespeak.net afa at codespeak.net
Mon Apr 26 19:49:06 CEST 2010


Author: afa
Date: Mon Apr 26 19:49:04 2010
New Revision: 74091

Modified:
   pypy/branch/cpython-extension/pypy/module/cpyext/api.py
Log:
Provide an actual definition for structures like PyIntObject,
boost::python needs it to subclass types.


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 26 19:49:04 2010
@@ -297,7 +297,8 @@
         GLOBALS['Py%s_Type#' % (cpyname, )] = ('PyTypeObject*', pypyexpr)
 
     for cpyname in 'Method List Int Long Dict Tuple'.split():
-        FORWARD_DECLS.append('struct Py%sObject' % (cpyname, ))
+        FORWARD_DECLS.append('typedef struct { PyObject_HEAD } '
+                             'Py%sObject' % (cpyname, ))
 build_exported_objects()
 
 def get_structtype_for_ctype(ctype):



More information about the Pypy-commit mailing list