[pypy-commit] pypy reflex-support: C++ and typo fixes

wlav noreply at buildbot.pypy.org
Thu Aug 11 02:31:52 CEST 2011


Author: Wim Lavrijsen <WLavrijsen at lbl.gov>
Branch: reflex-support
Changeset: r46433:41e42b571343
Date: 2011-08-10 17:30 -0700
http://bitbucket.org/pypy/pypy/changeset/41e42b571343/

Log:	C++ and typo fixes

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
@@ -24,8 +24,9 @@
 #include <utility>
 
 
-/*  CINT internal (won't work on Windwos) -------------------------------- */
+/*  CINT internals (won't work on Windwos) ------------------------------- */
 extern long G__store_struct_offset;
+extern "C" void* G__GetShlHandle();
 
 /* data for life time management ------------------------------------------ */
 typedef std::vector<TClassRef> ClassRefs_t;
@@ -394,5 +395,7 @@
 }
 
 void* cppyy_load_dictionary(const char* lib_name) {
-   gSystem->Load(lib_name);
+    if (gSystem->Load(lib_name))
+       return (void*)G__GetShlHandle();
+    return (void*)0;
 }
diff --git a/pypy/module/cppyy/test/Makefile b/pypy/module/cppyy/test/Makefile
--- a/pypy/module/cppyy/test/Makefile
+++ b/pypy/module/cppyy/test/Makefile
@@ -34,8 +34,10 @@
 # g++ -I$ROOTSYS/include example01_cint.cxx example01.cxx -shared -o example01Dict.so -rdynamic
 #
 # rootcint -f operators_cint.cxx -c operators.h operators_LinkDef.h
-# g++ -I$ROOTSYS/include operators_cint.cxx operators.cxx -shared -o operatorsDict.os -rdynamic
-
+# g++ -I$ROOTSYS/include operators_cint.cxx operators.cxx -shared -o operatorsDict.so -rdynamic
+#
+# rootcint -f datatypes_cint.cxx -c datatypes.h datatypes_LinkDef.h
+# g++ -I$ROOTSYS/include datatypes_cint.cxx datatypes.cxx -shared -o datatypesDict.so -rdynamic
 
 # TODO: methptrgetter causes these tests to crash, so don't use it for now
 stltypesDict.so: stltypes.cxx stltypes.h stltypes.xml


More information about the pypy-commit mailing list