[pypy-commit] pypy stacklet: Fix.
arigo
noreply at buildbot.pypy.org
Sat Aug 6 17:34:59 CEST 2011
Author: Armin Rigo <arigo at tunes.org>
Branch: stacklet
Changeset: r46325:abbb95518912
Date: 2011-08-06 16:51 +0200
http://bitbucket.org/pypy/pypy/changeset/abbb95518912/
Log: Fix.
diff --git a/pypy/module/_stacklet/interp_stacklet.py b/pypy/module/_stacklet/interp_stacklet.py
--- a/pypy/module/_stacklet/interp_stacklet.py
+++ b/pypy/module/_stacklet/interp_stacklet.py
@@ -15,6 +15,11 @@
def __init__(self, space, ec):
w_module = space.getbuiltinmodule('_stacklet')
self.space = space
+ if (space.config.translation.gc == 'boehm'
+ or space.config.translation.gc == 'ref'):
+ self.gcrootfinder = 'n/a'
+ else:
+ self.gcrootfinder = space.config.translation.gcrootfinder
self.ec = ec
self.w_error = space.getattr(w_module, space.wrap('error'))
self.pending_exception = None
@@ -83,7 +88,7 @@
sthread = self.sthread
ec = sthread.ec
saved_frame_top = ec.topframeref
- h = rstacklet.switch(sthread.thrd, h)
+ h = rstacklet.switch(sthread.gcrootfinder, sthread.thrd, h)
ec.topframeref = saved_frame_top
return sthread.new_stacklet_object(h)
@@ -147,7 +152,8 @@
start_state.args = __args__
saved_frame_top = ec.topframeref
ec.topframeref = jit.vref_None
- h = rstacklet.new(sthread.thrd, new_stacklet_callback,
+ h = rstacklet.new(sthread.gcrootfinder, sthread.thrd,
+ new_stacklet_callback,
lltype.nullptr(rffi.VOIDP.TO))
ec.topframeref = saved_frame_top
return sthread.new_stacklet_object(h)
More information about the pypy-commit
mailing list