@@ -189,19 +189,26 @@ itimer_retval(struct itimerval *iv)
189
189
}
190
190
#endif
191
191
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
+
192
203
static 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]*/
194
207
{
195
208
PyErr_SetNone (PyExc_KeyboardInterrupt );
196
209
return NULL ;
197
210
}
198
211
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
-
205
212
206
213
static int
207
214
report_wakeup_write_error (void * data )
@@ -1297,7 +1304,7 @@ signal_pidfd_send_signal_impl(PyObject *module, int pidfd, int signalnum,
1297
1304
/* List of functions defined in the module -- some of the methoddefs are
1298
1305
defined to nothing if the corresponding C function is not available. */
1299
1306
static PyMethodDef signal_methods [] = {
1300
- { "default_int_handler" , signal_default_int_handler , METH_VARARGS , default_int_handler_doc },
1307
+ SIGNAL_DEFAULT_INT_HANDLER_METHODDEF
1301
1308
SIGNAL_ALARM_METHODDEF
1302
1309
SIGNAL_SETITIMER_METHODDEF
1303
1310
SIGNAL_GETITIMER_METHODDEF
0 commit comments