If you're digging into the threadmodule.c could you take a look at bug #1163563 (http://sourceforge.net/tracker/index.php?func=detail&aid=1163563&group_id=5470&atid=105470) I've posted a patch (http://sourceforge.net/tracker/index.php? func=detail&aid=1203393&group_id=5470&atid=305470)
Regards, Max On 6/2/05, A.M. Kuchling <[EMAIL PROTECTED]> wrote: > Looking at bug #1209880, the following function from threadmodule.c is > referenced. I think the args==NULL case, which can return None > instead of a Boolean value, can never be reached because > PyArg_ParseTuple() will fail if args==NULL. > > Before ripping the args==NULL code out, I wanted to be sure my > analysis is correct; is there some subtlety here I'm missing that > makes args==NULL possible? > > --amk > > static PyObject * > lock_PyThread_acquire_lock(lockobject *self, PyObject *args) > { > int i = 1; > > if (!PyArg_ParseTuple(args, "|i:acquire", &i)) > return NULL; > > Py_BEGIN_ALLOW_THREADS > i = PyThread_acquire_lock(self->lock_lock, i); > Py_END_ALLOW_THREADS > > if (args == NULL) { > Py_INCREF(Py_None); > return Py_None; > } > else > return PyBool_FromLong((long)i); > } > _______________________________________________ > Python-Dev mailing list > Python-Dev@python.org > http://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > http://mail.python.org/mailman/options/python-dev/anothermax%40gmail.com > -- flickr: http://www.flickr.com/photos/anothermax/sets _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com