Mercurial > cpython-lru_cache-weakref
diff Modules/syslogmodule.c @ 38489:3fe3ccdf0155 legacy-trunk
Make use of METH_O and METH_NOARGS where possible.
Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Mon, 29 May 2006 21:04:52 +0000 |
| parents | 1af7f719ed28 |
| children | 47a58ca3e10e 776b8bd68b30 |
line wrap: on
line diff
--- a/Modules/syslogmodule.c Mon May 29 20:57:01 2006 +0000 +++ b/Modules/syslogmodule.c Mon May 29 21:04:52 2006 +0000 @@ -98,10 +98,8 @@ } static PyObject * -syslog_closelog(PyObject *self, PyObject *args) +syslog_closelog(PyObject *self, PyObject *unused) { - if (!PyArg_ParseTuple(args, ":closelog")) - return NULL; closelog(); Py_XDECREF(S_ident_o); S_ident_o = NULL; @@ -146,7 +144,7 @@ static PyMethodDef syslog_methods[] = { {"openlog", syslog_openlog, METH_VARARGS}, - {"closelog", syslog_closelog, METH_VARARGS}, + {"closelog", syslog_closelog, METH_NOARGS}, {"syslog", syslog_syslog, METH_VARARGS}, {"setlogmask", syslog_setlogmask, METH_VARARGS}, {"LOG_MASK", syslog_log_mask, METH_VARARGS},
