diff options
author | Max Bachmann <kontakt@maxbachmann.de> | 2023-02-25 14:51:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-25 14:51:53 +0100 |
commit | 3a2e365d288e52652fc689841f3b8e97d00dc233 (patch) | |
tree | 7c0adb9744ff419f70fdfd690344116338e62fb2 | |
parent | a927f89deb121dd539a4ea41d8fa179e73b093ab (diff) | |
download | cython-3a2e365d288e52652fc689841f3b8e97d00dc233.tar.gz |
Add recently added CPython exception C-API functions (GH-5257)
-rw-r--r-- | Cython/Includes/cpython/exc.pxd | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Cython/Includes/cpython/exc.pxd b/Cython/Includes/cpython/exc.pxd index bc57c0e57..8b03bf469 100644 --- a/Cython/Includes/cpython/exc.pxd +++ b/Cython/Includes/cpython/exc.pxd @@ -88,6 +88,11 @@ cdef extern from "Python.h": # needs to handle exceptions or by code that needs to save and # restore the error indicator temporarily. + PyObject* PyErr_GetHandledException() + void PyErr_SetHandledException(PyObject* exc) + PyObject* PyErr_GetRaisedException() + void PyErr_SetRaisedException(PyObject* exc) + void PyErr_Restore(PyObject* type, PyObject* value, PyObject* traceback) # Set the error indicator from the three objects. If the error # indicator is already set, it is cleared first. If the objects @@ -236,6 +241,8 @@ cdef extern from "Python.h": # KeyboardInterrupt will be raised. It may be called without # holding the interpreter lock. + int PyErr_SetInterruptEx(int signum) + object PyErr_NewException(char *name, object base, object dict) # Return value: New reference. # This utility function creates and returns a new exception |