[pypy-svn] r50816 - pypy/dist/pypy/rpython/lltypesystem

fijal at codespeak.net fijal at codespeak.net
Mon Jan 21 09:50:07 CET 2008


Author: fijal
Date: Mon Jan 21 09:50:06 2008
New Revision: 50816

Modified:
   pypy/dist/pypy/rpython/lltypesystem/ll2ctypes.py
Log:
On rare occasions, allow to pass GcStructs around.


Modified: pypy/dist/pypy/rpython/lltypesystem/ll2ctypes.py
==============================================================================
--- pypy/dist/pypy/rpython/lltypesystem/ll2ctypes.py	(original)
+++ pypy/dist/pypy/rpython/lltypesystem/ll2ctypes.py	Mon Jan 21 09:50:06 2008
@@ -414,7 +414,7 @@
                 _all_callbacks.append(res)
                 return res
 
-        if T.TO._gckind != 'raw':
+        if T.TO._gckind != 'raw' and not T.TO._hints.get('callback', None):
             raise Exception("can only pass 'raw' data structures to C, not %r"
                             % (T.TO._gckind,))
         if container._storage is None:



More information about the Pypy-commit mailing list