diff options
Diffstat (limited to 'Modules/syslogmodule.c')
-rw-r--r-- | Modules/syslogmodule.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/syslogmodule.c b/Modules/syslogmodule.c index 112b749..6f2a868 100644 --- a/Modules/syslogmodule.c +++ b/Modules/syslogmodule.c @@ -100,9 +100,10 @@ syslog_syslog(PyObject * self, PyObject * args) message = PyUnicode_AsString(message_object); if (message == NULL) return NULL; + Py_BEGIN_ALLOW_THREADS; syslog(priority, "%s", message); - Py_INCREF(Py_None); - return Py_None; + Py_END_ALLOW_THREADS; + Py_RETURN_NONE; } static PyObject * |