[pypy-svn] pypy default: More fixes
amauryfa
commits-noreply at bitbucket.org
Sat Apr 9 09:44:48 CEST 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch:
Changeset: r43243:40ab3eac752e
Date: 2011-04-09 09:44 +0200
http://bitbucket.org/pypy/pypy/changeset/40ab3eac752e/
Log: More fixes
diff --git a/pypy/module/cpyext/test/test_stringobject.py b/pypy/module/cpyext/test/test_stringobject.py
--- a/pypy/module/cpyext/test/test_stringobject.py
+++ b/pypy/module/cpyext/test/test_stringobject.py
@@ -194,8 +194,8 @@
c_buf = py_str.c_ob_type.c_tp_as_buffer
assert c_buf
py_obj = rffi.cast(PyObject, py_str)
- assert c_buf.c_bf_getsegcount(py_obj, lltype.nullptr(rffi.INTP.TO)) == 1
- ref = lltype.malloc(rffi.INTP.TO, 1, flavor='raw')
+ assert c_buf.c_bf_getsegcount(py_obj, lltype.nullptr(Py_ssize_tP.TO)) == 1
+ ref = lltype.malloc(Py_ssize_tP.TO, 1, flavor='raw')
assert c_buf.c_bf_getsegcount(py_obj, ref) == 1
assert ref[0] == 10
lltype.free(ref, flavor='raw')
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
@@ -33,7 +33,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)
- py_frame.c_f_lineno = frame.f_lineno
+ rffi.setintfield(py_frame, 'c_f_lineno', frame.f_lineno)
@cpython_api([PyObject], lltype.Void, external=False)
def frame_dealloc(space, py_obj):
More information about the Pypy-commit
mailing list