[pypy-commit] pypy reflex-support: name fix and added assertions

wlav noreply at buildbot.pypy.org
Thu Aug 25 01:03:19 CEST 2011


Author: Wim Lavrijsen <WLavrijsen at lbl.gov>
Branch: reflex-support
Changeset: r46761:a6d679b2cdca
Date: 2011-08-23 16:32 -0700
http://bitbucket.org/pypy/pypy/changeset/a6d679b2cdca/

Log:	name fix and added assertions

diff --git a/pypy/module/cppyy/bench/hsimple.py b/pypy/module/cppyy/bench/hsimple.py
--- a/pypy/module/cppyy/bench/hsimple.py
+++ b/pypy/module/cppyy/bench/hsimple.py
@@ -15,7 +15,7 @@
     warnings.simplefilter("ignore")
 
     import cppyy, random
-    cppyy.load_lib('bench02Dict_reflex.so')
+    cppyy.load_reflection_info('bench02Dict_reflex.so')
 
     app      = cppyy.gbl.Bench02RootApp()
     TCanvas  = cppyy.gbl.TCanvas
diff --git a/pypy/module/cppyy/interp_cppyy.py b/pypy/module/cppyy/interp_cppyy.py
--- a/pypy/module/cppyy/interp_cppyy.py
+++ b/pypy/module/cppyy/interp_cppyy.py
@@ -330,6 +330,7 @@
     def __init__(self, space, name, handle):
         self.space = space
         self.name = name
+        assert lltype.typeOf(handle) == rffi.VOIDP
         self.handle = handle
         self.methods = {}
         # Do not call "self._find_methods()" here, so that a distinction can
@@ -490,6 +491,7 @@
     def __init__(self, space, name, handle):
         self.space = space
         self.name = name
+        assert lltype.typeOf(handle) == rffi.VOIDP
         self.handle = handle
 
     def __call__(self, args_w):


More information about the pypy-commit mailing list