develooper Front page | perl.perl5.porters | Postings from April 2011

IO:select - pp_sselect interface change

Thread Next
April 25, 2011 17:55
IO:select - pp_sselect interface change
Message ID:
A look through 'current' Perl source reveals several instances of use of 
the FD_SET/FD_ZERO/FD_ISSET macros, whereas the pp_sselect interface 
uses 3 bit-mapped 'strings' to identify the sockets to be used by the 
select() function.

Assuming there are no technical constraints, I wish to propose that the 
IO:select interface to pp_sselect be changed to use 3 'int'(I32) arrays 
to hold the socket ID's and that pp_sselect use the FD_xxxx macros (as 
used elsewhere in Perl) to adapt these to select().

This would have the following benefits:

  1. no longer needs to work with bit maps,
  2. The interface is consistent with other places in the source,
  3. OS's that support FD_XXXX macros but not bit-mapped strings
     (f.e NetWare) should now be able to work with select().

This is based on the (reasonable) assumption that for all OS, the 
FD_XXXX macros use the same parameter type returned as a socket ID.

Or have I missed something?


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About