Make use of METH_O and METH_NOARGS where possible.

Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
This commit is contained in:
Georg Brandl 2006-05-29 21:04:52 +00:00
parent fd9a4b19e9
commit 96a8c3954c
26 changed files with 187 additions and 405 deletions

View file

@ -456,7 +456,8 @@ thread_PyThread_start_new_thread(PyObject *self, PyObject *fargs)
struct bootstate *boot;
long ident;
if (!PyArg_ParseTuple(fargs, "OO|O:start_new_thread", &func, &args, &keyw))
if (!PyArg_UnpackTuple(fargs, "start_new_thread", 2, 3,
&func, &args, &keyw))
return NULL;
if (!PyCallable_Check(func)) {
PyErr_SetString(PyExc_TypeError,