[pypy-svn] r23162 - in pypy/dist/pypy: interpreter objspace/flow
pedronis at codespeak.net
pedronis at codespeak.net
Wed Feb 8 22:41:14 CET 2006
Author: pedronis
Date: Wed Feb 8 22:41:11 2006
New Revision: 23162
Modified:
pypy/dist/pypy/interpreter/pyframe.py
pypy/dist/pypy/objspace/flow/objspace.py
Log:
fixes
Modified: pypy/dist/pypy/interpreter/pyframe.py
==============================================================================
--- pypy/dist/pypy/interpreter/pyframe.py (original)
+++ pypy/dist/pypy/interpreter/pyframe.py Wed Feb 8 22:41:11 2006
@@ -525,7 +525,7 @@
def state_unpack_variables(self, space):
return [space.wrap(self.jump_to)]
def state_pack_variables(self, space, w_jump_to):
- self.jump_to = space.uint_w(w_jump_to)
+ self.jump_to = space.int_w(w_jump_to)
class SReturnValue(ControlFlowException):
"""Signals a 'return' statement.
Modified: pypy/dist/pypy/objspace/flow/objspace.py
==============================================================================
--- pypy/dist/pypy/objspace/flow/objspace.py (original)
+++ pypy/dist/pypy/objspace/flow/objspace.py Wed Feb 8 22:41:11 2006
@@ -126,6 +126,16 @@
return val
return self.unwrap(w_obj)
+ def uint_w(self, w_obj):
+ if isinstance(w_obj, Constant):
+ from pypy.rpython.rarithmetic import r_uint
+ val = w_obj.value
+ if type(val) is not r_uint:
+ raise TypeError("expected unsigned: " + repr(w_obj))
+ return val
+ return self.unwrap(w_obj)
+
+
def str_w(self, w_obj):
if isinstance(w_obj, Constant):
val = w_obj.value
More information about the Pypy-commit
mailing list