diff Modules/threadmodule.c @ 38489:3fe3ccdf0155 legacy-trunk

Make use of METH_O and METH_NOARGS where possible. Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
author Georg Brandl <georg@python.org>
date Mon, 29 May 2006 21:04:52 +0000
parents a812d0fae74a
children 0b2b076e5908
line wrap: on
line diff
--- a/Modules/threadmodule.c	Mon May 29 20:57:01 2006 +0000
+++ b/Modules/threadmodule.c	Mon May 29 21:04:52 2006 +0000
@@ -456,7 +456,8 @@
 	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,