Mercurial > cpython-lru_cache-weakref
diff Modules/syslogmodule.c @ 34177:e89b1a240ff7 2.4
Backport fixes for bugs #1086555 and #1085744.
| author | Raymond Hettinger <python@rcn.com> |
|---|---|
| date | Fri, 17 Dec 2004 14:44:45 +0000 |
| parents | f66b3a3509c7 |
| children | 1af7f719ed28 |
line wrap: on
line diff
--- a/Modules/syslogmodule.c Thu Dec 16 09:48:37 2004 +0000 +++ b/Modules/syslogmodule.c Fri Dec 17 14:44:45 2004 +0000 @@ -57,17 +57,18 @@ { long logopt = 0; long facility = LOG_USER; - + PyObject *new_S_ident_o; - Py_XDECREF(S_ident_o); if (!PyArg_ParseTuple(args, "S|ll;ident string [, logoption [, facility]]", - &S_ident_o, &logopt, &facility)) + &new_S_ident_o, &logopt, &facility)) return NULL; /* This is needed because openlog() does NOT make a copy * and syslog() later uses it.. cannot trash it. */ + Py_XDECREF(S_ident_o); + S_ident_o = new_S_ident_o; Py_INCREF(S_ident_o); openlog(PyString_AsString(S_ident_o), logopt, facility);
