summaryrefslogtreecommitdiff
path: root/Modules/selectmodule.c
AgeCommit message (Collapse)AuthorLines
2001-11-01backport of 2.58:Anthony Baxter-3/+13
Fix SF bug #474538: Memory (reference) leak in poller.register (Dave Brueck) Replace some tortuous code that was trying to be clever but forgot to DECREF the key and value, by more longwinded but obviously correct code.
2001-11-01backport 2.56 from uncle tim:Anthony Baxter-15/+11
Stop adding 3 to FD_SETSIZE -- it makes no sense. If it turns out it actually does <wink>, perhaps an Insure run will catch it. Also removed senseless Windows comment.
2001-11-01backport barry's 2.54:Anthony Baxter-8/+21
select_select(): Closing bug #448351 the easy way, i.e. by changing the "#ifdef MS_WINDOWS" to "#ifdef SELECT_USES_HEAP" and by setting SELECT_USES_HEAP when FD_SETSIZE > 1024. The indirection seems useful since this subtly changes the path that "normal" Windows programs take (where Timmie sez FD_SETSIZE = 512). If that's a problem for Windows, he has only one place to change.
2001-07-16Backport of AMK's checkin 2.52:Thomas Wouters-1/+3
[Bug #438050] Include sys/poll.h if it was found by the configure script. The OpenGroup spec says poll.h is the correct header file to use, so that file is preferred.
2001-06-27Backport Fred's checkin 2.51:Thomas Wouters-3/+3
Add :method info to the PyArg_ParseTuple() format strings for poll objects.
2001-03-02RISCOS changes by dschwertbergerGuido van Rossum-0/+9
2000-12-12SF bug 110843: Low FD_SETSIZE limit on Win32 (PR#41). Boosted to 512.Tim Peters-1/+10
2000-09-28Add #ifdef's for platforms that don't have the constants POLLRDNORM andAndrew M. Kuchling-0/+8
friends. (Modified version of patch #101682 from Neil Schemenauer)
2000-09-26Rationalize use of limits.h, moving the inclusion to Python.h.Fred Drake-3/+0
Add definitions of INT_MAX and LONG_MAX to pyport.h. Remove includes of limits.h and conditional definitions of INT_MAX and LONG_MAX elsewhere. This closes SourceForge patch #101659 and bug #115323.
2000-09-01REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum-9/+0
This should match the situation in the 1.6b1 tree.
2000-08-31Peter Schneider-Kamp <nowonder@nowonder.de>:Fred Drake-1/+1
Remove some of GCC's warning in -Wstrict-prototypes mode. This closes SourceForge patch #101342.
2000-08-25Not every OS that support poll seems to support POLLMSG.Sjoerd Mullender-0/+2
2000-08-25Add interface to poll() system call (SF patch #100852)Andrew M. Kuchling-2/+319
2000-07-31merge Include/my*.h into Include/pyport.hPeter Schneider-Kamp-1/+0
marked my*.h as obsolete
2000-07-22Even more ANSIfication: fix as many function pointers and declarations asThomas Wouters-1/+1
possible.
2000-07-22Remove unused variable.Thomas Wouters-1/+0
2000-07-21Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',Thomas Wouters-1/+1
and a couple of functions that were missed in the previous batches. Not terribly tested, but very carefully scrutinized, three times. All these were found by the little findkrc.py that I posted to python-dev, which means there might be more lurking. Cases such as this: long func(a, b) long a; long b; /* flagword */ { and other cases where the last ; in the argument list isn't followed by a newline and an opening curly bracket. Regexps to catch all are welcome, of course ;)
2000-07-13Use PyObject_AsFileDescriptorAndrew M. Kuchling-24/+2
2000-07-11One more include of limits.h (possibly to be moved elsewhere when there isJack Jansen-0/+3
consensus where it should go).
2000-07-10ANSI-ficationPeter Schneider-Kamp-12/+4
2000-06-30Change copyright notice - 2nd try.Guido van Rossum-6/+0
2000-06-30Change copyright notice.Guido van Rossum-21/+6
2000-06-28Trent Mick:Guido van Rossum-3/+7
This patches fixes a possible overflow of the optional timeout parameter for the select() function (selectmodule.c). This timeout is passed in as a double and then truncated to an int. If the double is sufficiently large you can get unexpected results as it overflows. This patch raises an overflow if the given select timeout overflows. [GvR: To my embarrassment, the original code was assuming an int could always hold a million. Note that the overflow check doesn't test for a very large *negative* timeout passed in -- but who in the world would do such a thing?]
2000-05-03Vladimir Marangozov's long-awaited malloc restructuring.Guido van Rossum-3/+3
For more comments, read the patches@python.org archives. For documentation read the comments in mymalloc.h and objimpl.h. (This is not exactly what Vladimir posted to the patches list; I've made a few changes, and Vladimir sent me a fix in private email for a problem that only occurs in debug mode. I'm also holding back on his change to main.c, which seems unnecessary to me.)
2000-02-29Massive patch by Skip Montanaro to add ":name" to as manyGuido van Rossum-1/+1
PyArg_ParseTuple() format string arguments as possible.
2000-01-14According to Ron Bickers, and with apparent approval of ChrisGuido van Rossum-1/+1
Herborth, the code in list2set() that sets max unconditionally to 0 should not be used on BeOS. So be it. Anybody using BeOS, please test!
1999-08-27Patch by Mark Hammond to avoid certain header files on Windows/CE.Guido van Rossum-0/+2
1998-12-04Add DL_EXPORT() to all modules that could possibly be usedGuido van Rossum-1/+1
on BeOS or Windows.
1998-08-04Changes for BeOS, QNX and long long, by Chris Herborth.Guido van Rossum-1/+8
1998-07-02On Windows, put the select file descriptor arrays on the heap.Guido van Rossum-0/+22
This is because they are huge and the stack is limited on Windows. Other platforms keep declaring it on the stack.
1998-06-28Added doc strings.Guido van Rossum-2/+30
1997-11-22os2 patch by Jeff RushGuido van Rossum-0/+5
1997-10-01Apply two changes, systematically:Guido van Rossum-3/+1
(1) Use PyErr_NewException("module.class", NULL, NULL) to create the exception object. (2) Remove all calls to Py_FatalError(); instead, return or ignore the errors -- the import code now checks PyErr_Occurred() after calling a module's init function, so it's no longer a fatal error for the initialization to fail. Also did some small cleanups, e.g. removed unnecessary test for "already initialized" from initfpectl(), and unified initposix()/initnt(). I haven't checked this very thoroughly, so while the changes are pretty trivial -- beware of untested code!
1996-12-16list2set(): correct return value (an int, not a PyObject*).Barry Warsaw-1/+1
1996-12-13list2set(): PyList_GetItem could fail.Barry Warsaw-1/+3
1996-12-12Reworked to eliminate all potential memory problems, includingBarry Warsaw-73/+110
deletion of object from list argument during callout to fileno().
1996-12-12Several changes... Guido *please* take a look!Barry Warsaw-155/+193
1. Renamed 2. Several coding styles were being used here, owing to the multiple contributors. I tried to convert everything to standard "python" coding style for indentation, paren and brace placement, etc. 3. There were several potential error conditions that were never being checked, and where I saw them, I added checks of return values, etc. I'm pretty sure I got them all. 4. There were some old-style (pre PyArg_ParseTuple) argument extraction and these were converted to use PyArg_ParseTuple. All changes compile and run with the new test_select.py module, at least on my Solaris/Sparc box.
1996-12-09Add ``extern void bzero();'' for SGI, to keep gcc -Wall happy.Guido van Rossum-0/+5
1996-12-05Keep gcc -Wall happy.Guido van Rossum-0/+4
1996-10-25New permission notice, includes CNRI.Guido van Rossum-12/+19
1996-06-28Slightly different Windows ifdefsGuido van Rossum-1/+1
1996-06-12Yet another pass at fd2obj -- this time for WindowsGuido van Rossum-29/+58
1995-03-29fix subtle refcnt bugGuido van Rossum-10/+11
1995-01-04Added 1995 to copyright message.Guido van Rossum-2/+2
Setup.in: clarified Tk comments somewhat. structmodule.c: use memcpy() instead of double precision assignment.
1994-08-01Merge alpha100 branch back to main trunkGuido van Rossum-6/+9
1993-11-02Fixed a couple of bugs: getargs doesn't use % escapes, and secondsSjoerd Mullender-2/+2
must be set after timeout is initialized.
1993-11-01* selectmodule.c (select_select): timeout argument may be None with sameGuido van Rossum-6/+12
meaning as no 4th argument
1993-05-12* selectmodule.c: fix (another!) two memory leaks -- this time in list2setGuido van Rossum-0/+2
* tokenizer.[ch]: allow continuation without \ inside () [] {}.
1993-03-16* Changed many files to use mkvalue() instead of newtupleobject().Guido van Rossum-2/+2
* Fixcprt.py: added [-y file] option, do only files younger than file. * modsupport.[ch]: added vmkvalue(). * intobject.c: use mkvalue(). * stringobject.c: added "formatstring"; renamed string* to string_*; ceval.c: call formatstring for string % value. * longobject.c: close memory leak in divmod. * parsetok.c: set result node to NULL when returning an error.
1993-02-05* ceval.c: ifdef out the last argument passing compat hack.Guido van Rossum-2/+6
* Fixed memory leaks in socket, select and sv modules: mkvalue("O", v) does INCREF(v) so if v is brand new it should be XDECREF'd