@@ -189,19 +189,26 @@ itimer_retval(struct itimerval *iv)
189189}
190190#endif
191191
192+ /*[clinic input]
193+ signal.default_int_handler
194+ signalnum: int
195+ frame: object
196+ /
197+
198+ The default handler for SIGINT installed by Python.
199+
200+ It raises KeyboardInterrupt.
201+ [clinic start generated code]*/
202+
192203static PyObject *
193- signal_default_int_handler (PyObject * self , PyObject * args )
204+ signal_default_int_handler_impl (PyObject * module , int signalnum ,
205+ PyObject * frame )
206+ /*[clinic end generated code: output=bb11c2eb115ace4e input=efcd4a56a207acfd]*/
194207{
195208 PyErr_SetNone (PyExc_KeyboardInterrupt );
196209 return NULL ;
197210}
198211
199- PyDoc_STRVAR (default_int_handler_doc ,
200- "default_int_handler(...)\n\
201- \n\
202- The default handler for SIGINT installed by Python.\n\
203- It raises KeyboardInterrupt." );
204-
205212
206213static int
207214report_wakeup_write_error (void * data )
@@ -1297,7 +1304,7 @@ signal_pidfd_send_signal_impl(PyObject *module, int pidfd, int signalnum,
12971304/* List of functions defined in the module -- some of the methoddefs are
12981305 defined to nothing if the corresponding C function is not available. */
12991306static PyMethodDef signal_methods [] = {
1300- { "default_int_handler" , signal_default_int_handler , METH_VARARGS , default_int_handler_doc },
1307+ SIGNAL_DEFAULT_INT_HANDLER_METHODDEF
13011308 SIGNAL_ALARM_METHODDEF
13021309 SIGNAL_SETITIMER_METHODDEF
13031310 SIGNAL_GETITIMER_METHODDEF
0 commit comments