Author: Armin Rigo <[email protected]>
Branch: cpyext-gc-support-2
Changeset: r82220:f19a490ae47f
Date: 2016-02-13 16:42 +0100
http://bitbucket.org/pypy/pypy/changeset/f19a490ae47f/
Log: fix test_pyerrors
diff --git a/pypy/module/cpyext/pyerrors.py b/pypy/module/cpyext/pyerrors.py
--- a/pypy/module/cpyext/pyerrors.py
+++ b/pypy/module/cpyext/pyerrors.py
@@ -28,12 +28,12 @@
"""This is a shorthand for PyErr_SetObject(type, Py_None)."""
PyErr_SetObject(space, w_type, space.w_None)
-@cpython_api([], PyObject)
+@cpython_api([], PyObject, result_borrowed=True)
def PyErr_Occurred(space):
state = space.fromcache(State)
if state.operror is None:
return None
- return borrow_from(None, state.operror.w_type)
+ return state.operror.w_type
@cpython_api([], lltype.Void)
def PyErr_Clear(space):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit