summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-05-29 21:04:52 (GMT)
committerGeorg Brandl <georg@python.org>2006-05-29 21:04:52 (GMT)
commit96a8c3954cbdb186bc567a490dad8987508ce268 (patch)
tree4d6516790abcd566c43418e4c9b02e9c52cf9f2f /Python
parentfd9a4b19e9c77e9ccc3e7fcb57051cf160c0df6d (diff)
downloadcpython-96a8c3954cbdb186bc567a490dad8987508ce268.zip
cpython-96a8c3954cbdb186bc567a490dad8987508ce268.tar.gz
cpython-96a8c3954cbdb186bc567a490dad8987508ce268.tar.bz2
Make use of METH_O and METH_NOARGS where possible.
Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
Diffstat (limited to 'Python')
-rw-r--r--Python/sysmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 8612c24..37d4b38 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -200,7 +200,7 @@ static PyObject *
sys_exit(PyObject *self, PyObject *args)
{
PyObject *exit_code = 0;
- if (!PyArg_ParseTuple(args, "|O:exit", &exit_code))
+ if (!PyArg_UnpackTuple(args, "exit", 0, 1, &exit_code))
return NULL;
/* Raise SystemExit so callers may catch it or clean up. */
PyErr_SetObject(PyExc_SystemExit, exit_code);
@@ -672,7 +672,7 @@ static PyObject *
sys_call_tracing(PyObject *self, PyObject *args)
{
PyObject *func, *funcargs;
- if (!PyArg_ParseTuple(args, "OO:call_tracing", &func, &funcargs))
+ if (!PyArg_UnpackTuple(args, "call_tracing", 2, 2, &func, &funcargs))
return NULL;
return _PyEval_CallTracing(func, funcargs);
}