[Python-checkins] python/dist/src/Modules selectmodule.c,2.76,2.77

akuchling at users.sourceforge.net akuchling at users.sourceforge.net
Sat Aug 7 19:21:29 CEST 2004


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24297

Modified Files:
	selectmodule.c 
Log Message:
[Bug #923315] Produce correct result on AIX

Index: selectmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v
retrieving revision 2.76
retrieving revision 2.77
diff -C2 -d -r2.76 -r2.77
*** selectmodule.c	21 Mar 2004 23:45:42 -0000	2.76
--- selectmodule.c	7 Aug 2004 17:21:27 -0000	2.77
***************
*** 512,516 ****
  			PyTuple_SET_ITEM(value, 0, num);
  
! 			num = PyInt_FromLong(self->ufds[i].revents);
  			if (num == NULL) {
  				Py_DECREF(value);
--- 512,520 ----
  			PyTuple_SET_ITEM(value, 0, num);
  
! 			/* The &0xffff is a workaround for AIX.  'revents'
! 			   is a 16-bit short, and IBM assigned POLLNVAL
! 			   to be 0x8000, so the conversion to int results
! 			   in a negative number. See SF bug #923315. */
! 			num = PyInt_FromLong(self->ufds[i].revents & 0xffff);
  			if (num == NULL) {
  				Py_DECREF(value);



More information about the Python-checkins mailing list