diff options
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 4 |
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); } |