summaryrefslogtreecommitdiff
path: root/Tools/idle/interruptmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-04-29 11:27:16 +0000
committerGuido van Rossum <guido@python.org>2003-04-29 11:27:16 +0000
commita3c253e83b248df1562c3ac2a5be3cf3504432f8 (patch)
tree9aff2fe100549b3af220796679673e616b9aa8d6 /Tools/idle/interruptmodule.c
parent767d9fedc797fcddb16cdba8ce0268b503ee13d1 (diff)
downloadcpython-git-a3c253e83b248df1562c3ac2a5be3cf3504432f8.tar.gz
Removing new files accidentally checked in on the trunk rather than on the
idlefork-merge-branch.
Diffstat (limited to 'Tools/idle/interruptmodule.c')
-rw-r--r--Tools/idle/interruptmodule.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/Tools/idle/interruptmodule.c b/Tools/idle/interruptmodule.c
deleted file mode 100644
index 8e18d5af90..0000000000
--- a/Tools/idle/interruptmodule.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/***********************************************************************
- * interruptmodule.c
- *
- * Python extension implementing the interrupt module.
- *
- **********************************************************************/
-
-#include "Python.h"
-
-#ifndef PyDoc_STR
-#define PyDoc_VAR(name) static char name[]
-#define PyDoc_STR(str) str
-#define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str)
-#endif
-
-/* module documentation */
-
-PyDoc_STRVAR(module_doc,
-"Provide a way to interrupt the main thread from a subthread.\n\n\
-In threaded Python code the KeyboardInterrupt is always directed to\n\
-the thread which raised it. This extension provides a method,\n\
-interrupt_main, which a subthread can use to raise a KeyboardInterrupt\n\
-in the main thread.");
-
-/* module functions */
-
-static PyObject *
-setinterrupt(PyObject * self, PyObject * args)
-{
- PyErr_SetInterrupt();
- Py_INCREF(Py_None);
- return Py_None;
-}
-
-/* registration table */
-
-static struct PyMethodDef methods[] = {
- {"interrupt_main", setinterrupt, METH_VARARGS,
- PyDoc_STR("Interrupt the main thread")},
- {NULL, NULL}
-};
-
-/* module initialization */
-
-void
-initinterrupt(void)
-{
- (void) Py_InitModule3("interrupt", methods, module_doc);
-}