mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +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
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue