Author: Wim Lavrijsen <[email protected]>
Branch: reflex-support
Changeset: r44367:9113640a83ac
Date: 2011-05-22 18:41 -0700
http://bitbucket.org/pypy/pypy/changeset/9113640a83ac/

Log:    fixes for jit generation: argument type consistency

diff --git a/pypy/module/cppyy/capi.py b/pypy/module/cppyy/capi.py
--- a/pypy/module/cppyy/capi.py
+++ b/pypy/module/cppyy/capi.py
@@ -159,5 +159,6 @@
 
 def charp2str_free(charp):
     string = rffi.charp2str(charp)
-    c_free(charp)
+    voidp = rffi.cast(rffi.VOIDP, charp)
+    c_free(voidp)
     return string
diff --git a/pypy/module/cppyy/converter.py b/pypy/module/cppyy/converter.py
--- a/pypy/module/cppyy/converter.py
+++ b/pypy/module/cppyy/converter.py
@@ -111,6 +111,7 @@
 
 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)
@@ -237,6 +238,7 @@
 
 class FloatConverter(TypeConverter):
     _immutable = True
+    libffitype = libffi.types.float
 
     def _unwrap_object(self, space, w_obj):
         return r_singlefloat(space.float_w(w_obj))
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to