Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 38d45b7

Browse files
committed
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.
1 parent 92f3972 commit 38d45b7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Modules/threadmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ t_bootstrap(void *boot_raw)
221221
static PyObject *
222222
thread_PyThread_start_new_thread(PyObject *self, PyObject *fargs)
223223
{
224-
PyObject *func, *args = NULL, *keyw = NULL;
224+
PyObject *func, *args, *keyw = NULL;
225225
struct bootstate *boot;
226226

227227
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)
233233
}
234234
if (!PyTuple_Check(args)) {
235235
PyErr_SetString(PyExc_TypeError,
236-
"optional 2nd arg must be a tuple");
236+
"2nd arg must be a tuple");
237237
return NULL;
238238
}
239239
if (keyw != NULL && !PyDict_Check(keyw)) {

0 commit comments

Comments
 (0)