Author: Carl Friedrich Bolz <cfb...@gmx.de> Branch: space-newtext Changeset: r88101:9ade4b7cdbd7 Date: 2016-11-03 08:06 +0100 http://bitbucket.org/pypy/pypy/changeset/9ade4b7cdbd7/
Log: continuation diff --git a/pypy/module/_continuation/interp_continuation.py b/pypy/module/_continuation/interp_continuation.py --- a/pypy/module/_continuation/interp_continuation.py +++ b/pypy/module/_continuation/interp_continuation.py @@ -35,7 +35,7 @@ w_args, w_kwds = __args__.topacked() bottomframe = space.createframe(get_entrypoint_pycode(space), get_w_module_dict(space), None) - bottomframe.locals_cells_stack_w[0] = space.wrap(self) + bottomframe.locals_cells_stack_w[0] = self bottomframe.locals_cells_stack_w[1] = w_callable bottomframe.locals_cells_stack_w[2] = w_args bottomframe.locals_cells_stack_w[3] = w_kwds @@ -126,13 +126,13 @@ def W_Continulet___new__(space, w_subtype, __args__): r = space.allocate_instance(W_Continulet, w_subtype) r.__init__(space) - return space.wrap(r) + return r def unpickle(space, w_subtype): """Pickle support.""" r = space.allocate_instance(W_Continulet, w_subtype) r.__init__(space) - return space.wrap(r) + return r W_Continulet.typedef = TypeDef( @@ -156,7 +156,7 @@ def __init__(self, space): self.space = space w_module = space.getbuiltinmodule('_continuation') - self.w_error = space.getattr(w_module, space.wrap('error')) + self.w_error = space.getattr(w_module, space.newtext('error')) # the following function switches away immediately, so that # continulet.__init__() doesn't immediately run func(), but it # also has the hidden purpose of making sure we have a single @@ -179,7 +179,7 @@ def geterror(space, message): cs = space.fromcache(State) - return OperationError(cs.w_error, space.wrap(message)) + return OperationError(cs.w_error, space.newtext(message)) def get_entrypoint_pycode(space): cs = space.fromcache(State) diff --git a/pypy/module/_continuation/interp_pickle.py b/pypy/module/_continuation/interp_pickle.py --- a/pypy/module/_continuation/interp_pickle.py +++ b/pypy/module/_continuation/interp_pickle.py @@ -24,8 +24,8 @@ elif self.sthread.is_empty_handle(self.h): w_frame = space.w_None else: - w_frame = space.wrap(self.bottomframe) - w_continulet_type = space.type(space.wrap(self)) + w_frame = self.bottomframe + w_continulet_type = space.type(self) w_dict = self.getdict(space) or space.w_None args = [getunpickle(space), space.newtuple([w_continulet_type]), _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit