[pypy-commit] pypy reflex-support: further protection against using reflection info during translation with CINT backend and fixup of test_zjit to handle it

wlav noreply at buildbot.pypy.org
Fri Feb 24 18:24:29 CET 2012


Author: Wim Lavrijsen <WLavrijsen at lbl.gov>
Branch: reflex-support
Changeset: r52867:6d45bcabae5b
Date: 2012-02-24 00:21 -0800
http://bitbucket.org/pypy/pypy/changeset/6d45bcabae5b/

Log:	further protection against using reflection info during translation
	with CINT backend and fixup of test_zjit to handle it

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
@@ -428,6 +428,8 @@
                 self.data_members[data_member_name] = data_member
 
     def update(self):
+        if self.space.config.translating and not objectmodel.we_are_translated():
+             return cpptype
         self._find_methods()
         self._find_data_members()
 
diff --git a/pypy/module/cppyy/test/test_zjit.py b/pypy/module/cppyy/test/test_zjit.py
--- a/pypy/module/cppyy/test/test_zjit.py
+++ b/pypy/module/cppyy/test/test_zjit.py
@@ -65,6 +65,9 @@
     def __init__(self):
         self.fromcache = InternalSpaceCache(self).getorbuild
         self.user_del_action = FakeUserDelAction(self)
+        class dummy: pass
+        self.config = dummy()
+        self.config.translating = False
 
     def issequence_w(self, w_obj):
         return True


More information about the pypy-commit mailing list