Commits

wlav committed 0744e93

fix callback declaration

  • Participants
  • Parent commits db15690
  • Branches reflex-support

Comments (0)

Files changed (2)

pypy/module/cppyy/capi/cint_capi.py

 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
 
     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():
 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
 

pypy/module/cppyy/src/cintcwrapper.cxx

 #include <string>
 #include <utility>
 
+// for recursive_remove callback
+#include "pypy_macros.h"
+
 
 /* ROOT/CINT internals --------------------------------------------------- */
 extern long G__store_struct_offset;
 };
 
 // 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);
     }
 };