[pypy-commit] pypy reflex-support: fix callback declaration

wlav noreply at buildbot.pypy.org
Wed Dec 18 23:18:15 CET 2013


Author: Wim Lavrijsen <WLavrijsen at lbl.gov>
Branch: reflex-support
Changeset: r68473:0744e9384dae
Date: 2013-12-18 14:07 -0800
http://bitbucket.org/pypy/pypy/changeset/0744e9384dae/

Log:	fix callback declaration

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
@@ -8,6 +8,7 @@
 from rpython.translator.tool.cbuild import ExternalCompilationInfo
 from rpython.rtyper.lltypesystem import rffi, lltype
 from rpython.rlib import libffi, rdynload
+from rpython.tool.udir import udir
 
 from pypy.module.cppyy.capi.capi_types import C_OBJECT
 
@@ -22,13 +23,13 @@
     import commands
     (stat, incdir) = commands.getstatusoutput("root-config --incdir")
     if stat != 0:
-        rootincpath = [os.path.join(os.environ["ROOTSYS"], "include")]
+        rootincpath = [os.path.join(os.environ["ROOTSYS"], "include"), py.path.local(udir)]
         rootlibpath = [os.path.join(os.environ["ROOTSYS"], "lib64"), os.path.join(os.environ["ROOTSYS"], "lib")]
     else:
-        rootincpath = [incdir]
+        rootincpath = [incdir, py.path.local(udir)]
         rootlibpath = commands.getoutput("root-config --libdir").split()
 else:
-    rootincpath = []
+    rootincpath = [py.path.local(udir)]
     rootlibpath = []
 
 def identify():
@@ -422,7 +423,7 @@
 from pypy.module.cpyext.api import cpython_api, CANNOT_FAIL
 
 @cpython_api([rffi.VOIDP], lltype.Void, error=CANNOT_FAIL)
-def cppyy_recursive_remove(space, cppobject):
+def _Py_cppyy_recursive_remove(space, cppobject):
     from pypy.module.cppyy.interp_cppyy import memory_regulator
     from pypy.module.cppyy.capi import C_OBJECT, C_NULL_OBJECT
 
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
@@ -37,6 +37,9 @@
 #include <string>
 #include <utility>
 
+// for recursive_remove callback
+#include "pypy_macros.h"
+
 
 /* ROOT/CINT internals --------------------------------------------------- */
 extern long G__store_struct_offset;
@@ -61,12 +64,12 @@
 };
 
 // memory regulation (cppyy_recursive_remove is generated as a cpyext capi call)
-extern "C" void cppyy_recursive_remove(void*);
+extern "C" void _Py_cppyy_recursive_remove(void*);
 
 class Cppyy_MemoryRegulator : public TObject {
 public:
     virtual void RecursiveRemove(TObject* object) {
-        cppyy_recursive_remove((void*)object);
+        _Py_cppyy_recursive_remove((void*)object);
     }
 };
 


More information about the pypy-commit mailing list