mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Make use of METH_O and METH_NOARGS where possible.
Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
This commit is contained in:
parent
fd9a4b19e9
commit
96a8c3954c
26 changed files with 187 additions and 405 deletions
|
|
@ -98,10 +98,8 @@ syslog_syslog(PyObject * self, PyObject * args)
|
|||
}
|
||||
|
||||
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 @@ syslog_log_upto(PyObject *self, PyObject *args)
|
|||
|
||||
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},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue