[pypy-svn] r69185 - pypy/branch/faster-raise/pypy/interpreter
arigo at codespeak.net
arigo at codespeak.net
Wed Nov 11 17:43:26 CET 2009
Author: arigo
Date: Wed Nov 11 17:43:25 2009
New Revision: 69185
Modified:
pypy/branch/faster-raise/pypy/interpreter/error.py
pypy/branch/faster-raise/pypy/interpreter/pytraceback.py
Log:
Oups. Forgot some '.lineno'.
Modified: pypy/branch/faster-raise/pypy/interpreter/error.py
==============================================================================
--- pypy/branch/faster-raise/pypy/interpreter/error.py (original)
+++ pypy/branch/faster-raise/pypy/interpreter/error.py Wed Nov 11 17:43:25 2009
@@ -95,7 +95,7 @@
print >> file, "Traceback (application-level):"
while tb is not None:
co = tb.frame.pycode
- lineno = tb.lineno
+ lineno = tb.get_lineno()
fname = co.co_filename
if fname.startswith('<inline>\n'):
lines = fname.split('\n')
Modified: pypy/branch/faster-raise/pypy/interpreter/pytraceback.py
==============================================================================
--- pypy/branch/faster-raise/pypy/interpreter/pytraceback.py (original)
+++ pypy/branch/faster-raise/pypy/interpreter/pytraceback.py Wed Nov 11 17:43:25 2009
@@ -18,9 +18,11 @@
self.lasti = lasti
self.next = next
+ def get_lineno(self):
+ return offset2lineno(self.frame.pycode, self.lasti)
+
def descr_tb_lineno(space, self):
- lineno = offset2lineno(self.frame.pycode, self.lasti)
- return space.wrap(lineno)
+ return space.wrap(self.get_lineno())
def descr__reduce__(self, space):
from pypy.interpreter.mixedmodule import MixedModule
@@ -33,7 +35,6 @@
tup_state = [
w(self.frame),
w(self.lasti),
- w(self.lineno),
w(self.next),
]
nt = space.newtuple
@@ -42,10 +43,9 @@
def descr__setstate__(self, space, w_args):
from pypy.interpreter.pyframe import PyFrame
args_w = space.unpackiterable(w_args)
- w_frame, w_lasti, w_lineno, w_next = args_w
+ w_frame, w_lasti, w_next = args_w
self.frame = space.interp_w(PyFrame, w_frame)
self.lasti = space.int_w(w_lasti)
- self.lineno = space.int_w(w_lineno)
self.next = space.interp_w(PyTraceback, w_next, can_be_None=True)
def record_application_traceback(space, operror, frame, last_instruction):
More information about the Pypy-commit
mailing list