1. Duangle
  2. Untitled project
  3. autobind-cffi

Commits

Leonard Ritter  committed 985f0d5

cffi related mangling fixes

  • Participants
  • Parent commits e48e74e
  • Branches default

Comments (0)

Files changed (1)

File autobind/__init__.py

View file
  • Ignore whitespace
         }
         
         def get_signature(value):
-            sig = ffi._backend._getfields(ffi.typeof(value))
-            assert sig, 'you must run the builder in python for now (no pypy)'
-            return sig[1:]
+            #resultsig = ffi.typeof(value).result
+            sig = ffi.typeof(value).args
+            return sig
         
         def is_strptr_type(ctype):
             return "'unsigned char *'" in repr(arg)
         
         def is_ptr_type(ctype):
-            return " *'" in repr(ctype)
+            cname = ctype.cname 
+            if ctype.cname == 'char *':
+                return False
+            return " *" in ctype.cname
     
         for name,value in CAPI.items():
             module_name = name