summaryrefslogtreecommitdiffstats
path: root/Modules/signalmodule.c
diff options
context:
space:
mode:
authorBrian Curtin <brian.curtin@gmail.com>2010-04-12 17:16:38 (GMT)
committerBrian Curtin <brian.curtin@gmail.com>2010-04-12 17:16:38 (GMT)
commiteb24d7498f3e34586fee24209f5630a58bb1a04b (patch)
tree2618500362c3b75e9ff541971954b57d14d66a86 /Modules/signalmodule.c
parentb2416e54b15d90b4a1bc917897912061830b42fc (diff)
downloadcpython-eb24d7498f3e34586fee24209f5630a58bb1a04b.zip
cpython-eb24d7498f3e34586fee24209f5630a58bb1a04b.tar.gz
cpython-eb24d7498f3e34586fee24209f5630a58bb1a04b.tar.bz2
Port #1220212 (os.kill for Win32) to py3k.
Diffstat (limited to 'Modules/signalmodule.c')
-rw-r--r--Modules/signalmodule.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
index 13806c7..0039777 100644
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -7,6 +7,7 @@
#include "intrcheck.h"
#ifdef MS_WINDOWS
+#include <Windows.h>
#ifdef HAVE_PROCESS_H
#include <process.h>
#endif
@@ -805,6 +806,18 @@ PyInit_signal(void)
PyDict_SetItemString(d, "ItimerError", ItimerError);
#endif
+#ifdef CTRL_C_EVENT
+ x = PyLong_FromLong(CTRL_C_EVENT);
+ PyDict_SetItemString(d, "CTRL_C_EVENT", x);
+ Py_DECREF(x);
+#endif
+
+#ifdef CTRL_BREAK_EVENT
+ x = PyLong_FromLong(CTRL_BREAK_EVENT);
+ PyDict_SetItemString(d, "CTRL_BREAK_EVENT", x);
+ Py_DECREF(x);
+#endif
+
if (PyErr_Occurred()) {
Py_DECREF(m);
m = NULL;