Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r61:e79cbb0feeeb
Date: 2014-11-18 00:14 +0100
http://bitbucket.org/cffi/creflect/changeset/e79cbb0feeeb/

Log:    Properly lay out the current limitations

diff --git a/creflect/model.py b/creflect/model.py
--- a/creflect/model.py
+++ b/creflect/model.py
@@ -153,7 +153,12 @@
         # this class overrides inspect_type() instead of
         # inspect_nonconst_type(), to avoid the extra call to get_const_type()
         self._flush_inspect(inspect)
+
+        # limitations so far:
         assert not self.ellipsis, "XXX"
+        assert inspect is not None, "XXX"
+        assert inspect.levels == ['*'], "XXX"
+
         t1 = self.result.inspect_type(block, None)
         call = ['    ']
         if not isinstance(self.result, VoidType):
@@ -174,7 +179,7 @@
         wrline = toplevel.writeline
         wrline('static void %s(void *func, void *args[], void *result) {' % (
             crx_func_name,))
-        wrline('    func_t f = func;')  # XXX!
+        wrline('    %s f = func;' % inspect.typename)
         wrline(''.join(call))
         wrline('}')
         wrline('')
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to