diff options
author | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2011-05-02 16:31:17 (GMT) |
---|---|---|
committer | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2011-05-02 16:31:17 (GMT) |
commit | 09a98a99cdb39b977ed49d927760bb58787a037b (patch) | |
tree | 4a557dee8112ef76b1d7a5a6ee4f61d81e496c1a /Modules | |
parent | 03163ac185a8fdf7a1569f19a6d60e2b6259cc13 (diff) | |
parent | 72c53b5dccb02f7a14edbfa4a197827b29e454e9 (diff) | |
download | cpython-09a98a99cdb39b977ed49d927760bb58787a037b.zip cpython-09a98a99cdb39b977ed49d927760bb58787a037b.tar.gz cpython-09a98a99cdb39b977ed49d927760bb58787a037b.tar.bz2 |
merge
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/signalmodule.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c index 305261c..0cb2720 100644 --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -720,24 +720,16 @@ PyInit_signal(void) Py_DECREF(x); #ifdef SIG_BLOCK - x = PyLong_FromLong(SIG_BLOCK); - if (!x || PyDict_SetItemString(d, "SIG_BLOCK", x) < 0) - goto finally; - Py_DECREF(x); + if (PyModule_AddIntMacro(m, SIG_BLOCK)) + goto finally; #endif - #ifdef SIG_UNBLOCK - x = PyLong_FromLong(SIG_UNBLOCK); - if (!x || PyDict_SetItemString(d, "SIG_UNBLOCK", x) < 0) - goto finally; - Py_DECREF(x); + if (PyModule_AddIntMacro(m, SIG_UNBLOCK)) + goto finally; #endif - #ifdef SIG_SETMASK - x = PyLong_FromLong(SIG_SETMASK); - if (!x || PyDict_SetItemString(d, "SIG_SETMASK", x) < 0) - goto finally; - Py_DECREF(x); + if (PyModule_AddIntMacro(m, SIG_SETMASK)) + goto finally; #endif x = IntHandler = PyDict_GetItemString(d, "default_int_handler"); |