Author: Maciej Fijalkowski <[email protected]>
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
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to