[Patches] [Patch #101046] fcntlmodule: use PyArg_ParseTuple everywhere.

noreply@sourceforge.net noreply@sourceforge.net
Wed, 2 Aug 2000 13:48:06 -0700


Patch #101046 has been updated. 

Project: 
Category: Modules
Status: Accepted
Summary: fcntlmodule: use PyArg_ParseTuple everywhere.

Follow-Ups:

Date: 2000-Aug-02 06:27
By: gvanrossum

Comment:
The idea is fine, but you missed the fact that the code is trying to simulate "ii|i" by trying "(ii)" and then "(iii)".  This should be collapsed too (in two places).   If you fix this I'll accept it.
-------------------------------------------------------

Date: 2000-Aug-02 06:59
By: hooft

Comment:
I revised the patch. Still not too happy about all error messages:

>>> fcntl.ioctl(1,2,fcntl)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: an integer is required

But I don't know how to fix that.
-------------------------------------------------------

Date: 2000-Aug-02 13:48
By: gvanrossum

Comment:
Done.

That error messages comes from intobject.c, to fix it you would have to fix that file as well as PyArg_ParseTuple.

Note: the module test.test_fcntl doesn't d a very thorough test -- it doesn't even test ioctl at all!
-------------------------------------------------------

-------------------------------------------------------
For more info, visit:

http://sourceforge.net/patch/?func=detailpatch&patch_id=101046&group_id=5470