1. jakelundy
  2. pypy

Commits

wlav  committed 9113640

fixes for jit generation: argument type consistency

  • Participants
  • Parent commits c442968
  • Branches reflex-support

Comments (0)

Files changed (2)

File pypy/module/cppyy/capi.py

View file
 
 def charp2str_free(charp):
     string = rffi.charp2str(charp)
-    c_free(charp)
+    voidp = rffi.cast(rffi.VOIDP, charp)
+    c_free(voidp)
     return string

File pypy/module/cppyy/converter.py

View file
 
 class BoolConverter(TypeConverter):
     _immutable = True
+    libffitype = libffi.types.sint               # TODO: probably incorrect
 
     def convert_argument(self, space, w_obj):
         arg = space.c_int_w(w_obj)
 
 class FloatConverter(TypeConverter):
     _immutable = True
+    libffitype = libffi.types.float
 
     def _unwrap_object(self, space, w_obj):
         return r_singlefloat(space.float_w(w_obj))