mirror of
https://github.com/python/cpython.git
synced 2025-07-19 17:25:54 +00:00
The second argument to start_new_thread() is not a tuple, as pointed
out by Curtis Jensen on c.l.py and forwarded by Fredrik Lundh.
This commit is contained in:
parent
92f3972090
commit
38d45b7da9
1 changed files with 2 additions and 2 deletions
|
@ -221,7 +221,7 @@ t_bootstrap(void *boot_raw)
|
||||||
static PyObject *
|
static PyObject *
|
||||||
thread_PyThread_start_new_thread(PyObject *self, PyObject *fargs)
|
thread_PyThread_start_new_thread(PyObject *self, PyObject *fargs)
|
||||||
{
|
{
|
||||||
PyObject *func, *args = NULL, *keyw = NULL;
|
PyObject *func, *args, *keyw = NULL;
|
||||||
struct bootstate *boot;
|
struct bootstate *boot;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(fargs, "OO|O:start_new_thread", &func, &args, &keyw))
|
if (!PyArg_ParseTuple(fargs, "OO|O:start_new_thread", &func, &args, &keyw))
|
||||||
|
@ -233,7 +233,7 @@ thread_PyThread_start_new_thread(PyObject *self, PyObject *fargs)
|
||||||
}
|
}
|
||||||
if (!PyTuple_Check(args)) {
|
if (!PyTuple_Check(args)) {
|
||||||
PyErr_SetString(PyExc_TypeError,
|
PyErr_SetString(PyExc_TypeError,
|
||||||
"optional 2nd arg must be a tuple");
|
"2nd arg must be a tuple");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (keyw != NULL && !PyDict_Check(keyw)) {
|
if (keyw != NULL && !PyDict_Check(keyw)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue