From ba251c2ae6654bfc8abd9d886b219698ad34ac3c Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Thu, 11 Mar 2021 23:35:45 +0100 Subject: bpo-43356: Allow passing a signal number to interrupt_main() (GH-24755) Also introduce a new C API ``PyErr_SetInterruptEx(int signum)``. --- Include/pyerrors.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Include/pyerrors.h') diff --git a/Include/pyerrors.h b/Include/pyerrors.h index 692d671757..14129d3533 100644 --- a/Include/pyerrors.h +++ b/Include/pyerrors.h @@ -224,6 +224,9 @@ PyAPI_FUNC(void) PyErr_WriteUnraisable(PyObject *); /* In signalmodule.c */ PyAPI_FUNC(int) PyErr_CheckSignals(void); PyAPI_FUNC(void) PyErr_SetInterrupt(void); +#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030A0000 +PyAPI_FUNC(int) PyErr_SetInterruptEx(int signum); +#endif /* Support for adding program text to SyntaxErrors */ PyAPI_FUNC(void) PyErr_SyntaxLocation( -- cgit v1.2.1