Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r93444:4f856cec59aa
Date: 2017-12-16 10:46 +0100
http://bitbucket.org/pypy/pypy/changeset/4f856cec59aa/

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
@@ -122,9 +122,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

Reply via email to