Author: Armin Rigo <ar...@tunes.org> Branch: cpyext-avoid-roundtrip Changeset: r93445:b7431c4cc863 Date: 2017-12-16 10:47 +0100 http://bitbucket.org/pypy/pypy/changeset/b7431c4cc863/
Log: Found out how to have a Void-returning function raise 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 @@ -123,9 +123,7 @@ error indicator.""" raise oefmt(space.w_TypeError, "bad argument type for built-in operation") -# NB. this returns 'void' in CPython, but we can't easily, otherwise the -# function is supposed not to fail -@cpython_api([], rffi.INT_real, error=-1) +@cpython_api([], lltype.Void, error=None) def PyErr_BadInternalCall(space): raise oefmt(space.w_SystemError, "Bad internal call!") _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit