[pypy-commit] pypy reflex-support: call_i implementation for cint back-end

wlav noreply at buildbot.pypy.org
Tue Jul 12 18:02:13 CEST 2011


Author: Wim Lavrijsen <WLavrijsen at lbl.gov>
Branch: reflex-support
Changeset: r45515:17d70e8f88b7
Date: 2011-07-12 06:43 -0700
http://bitbucket.org/pypy/pypy/changeset/17d70e8f88b7/

Log:	call_i implementation for cint back-end

diff --git a/pypy/module/cppyy/capi/cint_capi.py b/pypy/module/cppyy/capi/cint_capi.py
--- a/pypy/module/cppyy/capi/cint_capi.py
+++ b/pypy/module/cppyy/capi/cint_capi.py
@@ -107,6 +107,10 @@
     "cppyy_call_h",
     [C_TYPEHANDLE, rffi.INT, C_OBJECT, rffi.INT, rffi.VOIDPP], rffi.SHORT,
     compilation_info=eci)
+c_call_i = rffi.llexternal(
+    "cppyy_call_i",
+    [C_TYPEHANDLE, rffi.INT, C_OBJECT, rffi.INT, rffi.VOIDPP], rffi.INT,
+    compilation_info=eci)
 c_call_l = rffi.llexternal(
     "cppyy_call_l",
     [C_TYPEHANDLE, rffi.INT, C_OBJECT, rffi.INT, rffi.VOIDPP], rffi.LONG,
diff --git a/pypy/module/cppyy/capi/reflex_capi.py b/pypy/module/cppyy/capi/reflex_capi.py
--- a/pypy/module/cppyy/capi/reflex_capi.py
+++ b/pypy/module/cppyy/capi/reflex_capi.py
@@ -108,7 +108,7 @@
     [C_TYPEHANDLE, rffi.INT, C_OBJECT, rffi.INT, rffi.VOIDPP], rffi.SHORT,
     compilation_info=eci)
 c_call_i = rffi.llexternal(
-    "cppyy_call_l",
+    "cppyy_call_i",
     [C_TYPEHANDLE, rffi.INT, C_OBJECT, rffi.INT, rffi.VOIDPP], rffi.INT,
     compilation_info=eci)
 c_call_l = rffi.llexternal(
diff --git a/pypy/module/cppyy/src/cintcwrapper.cxx b/pypy/module/cppyy/src/cintcwrapper.cxx
--- a/pypy/module/cppyy/src/cintcwrapper.cxx
+++ b/pypy/module/cppyy/src/cintcwrapper.cxx
@@ -128,6 +128,12 @@
     return (short)G__int(result);
 }
 
+int cppyy_call_i(cppyy_typehandle_t handle, int method_index,
+                  cppyy_object_t self, int numargs, void* args[]) {
+    G__value result = cppyy_call_T(handle, method_index, self, numargs, args);
+    return (int)G__int(result);
+}
+
 long cppyy_call_l(cppyy_typehandle_t handle, int method_index,
                   cppyy_object_t self, int numargs, void* args[]) {
     G__value result = cppyy_call_T(handle, method_index, self, numargs, args);


More information about the pypy-commit mailing list