Bug report : fcntlmodule.so (fonction ioctl) python 1.5.2
M.-A. Lemburg
mal at lemburg.com
Mon Sep 27 17:24:52 EDT 1999
David Berthelot wrote:
>
> Hi,
>
> i think, i found a bug (and a fix).
>
> In the "fcntlmodule.so", the "ioctl" function does not work with
> an optional int parameter but currently it works only with an
> optional string parameter.
>
> So i think that the line number 76 of fcntlmodule.c :
> 76: ret = ioctl(fd, code, arg);
>
> should be replaced by:
> 76: ret = ioctl(fd, code, &arg);
>
> I think it does it, doesn't it ?
> Yes, unlike fcntl, ioctl uses a pointer for its 3rd arg.
Not always... it depends on the fd and code.
Note that Python 1.5.2 (well at least the CVS version)
has code for handling strings *and* integers. The struct
module will help you build pointers to integers if needed.
If you need a read/write memory area, you can use the new
buffer objects for this task.
--
Marc-Andre Lemburg
______________________________________________________________________
Y2000: 98 days left
Business: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/
More information about the Python-list
mailing list