[pypy-commit] pypy remove-frame-debug-attrs: a bit blindly fix cpyext
fijal
noreply at buildbot.pypy.org
Mon May 4 11:24:20 CEST 2015
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: remove-frame-debug-attrs
Changeset: r77031:4a5b944ea124
Date: 2015-05-04 11:24 +0200
http://bitbucket.org/pypy/pypy/changeset/4a5b944ea124/
Log: a bit blindly fix cpyext
diff --git a/pypy/module/cpyext/frameobject.py b/pypy/module/cpyext/frameobject.py
--- a/pypy/module/cpyext/frameobject.py
+++ b/pypy/module/cpyext/frameobject.py
@@ -35,7 +35,7 @@
py_frame = rffi.cast(PyFrameObject, py_obj)
py_frame.c_f_code = rffi.cast(PyCodeObject, make_ref(space, frame.pycode))
py_frame.c_f_globals = make_ref(space, frame.w_globals)
- rffi.setintfield(py_frame, 'c_f_lineno', frame.f_lineno)
+ rffi.setintfield(py_frame, 'c_f_lineno', frame.getorcreatedebug().f_lineno)
@cpython_api([PyObject], lltype.Void, external=False)
def frame_dealloc(space, py_obj):
@@ -58,7 +58,8 @@
w_globals = from_ref(space, py_frame.c_f_globals)
frame = space.FrameClass(space, code, w_globals, outer_func=None)
- frame.f_lineno = rffi.getintfield(py_frame, 'c_f_lineno')
+ d = frame.getorcreatedebug()
+ d.f_lineno = rffi.getintfield(py_frame, 'c_f_lineno')
w_obj = space.wrap(frame)
track_reference(space, py_obj, w_obj)
return w_obj
More information about the pypy-commit
mailing list