summaryrefslogtreecommitdiffstats
path: root/Modules/selectmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Trent Mick:Guido van Rossum2000-06-281-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?]
* Vladimir Marangozov's long-awaited malloc restructuring.Guido van Rossum2000-05-031-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.)
* Massive patch by Skip Montanaro to add ":name" to as manyGuido van Rossum2000-02-291-1/+1
| | | | PyArg_ParseTuple() format string arguments as possible.
* According to Ron Bickers, and with apparent approval of ChrisGuido van Rossum2000-01-141-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!
* Patch by Mark Hammond to avoid certain header files on Windows/CE.Guido van Rossum1999-08-271-0/+2
|
* Add DL_EXPORT() to all modules that could possibly be usedGuido van Rossum1998-12-041-1/+1
| | | | on BeOS or Windows.
* Changes for BeOS, QNX and long long, by Chris Herborth.Guido van Rossum1998-08-041-1/+8
|
* On Windows, put the select file descriptor arrays on the heap.Guido van Rossum1998-07-021-0/+22
| | | | | This is because they are huge and the stack is limited on Windows. Other platforms keep declaring it on the stack.
* Added doc strings.Guido van Rossum1998-06-281-2/+30
|
* os2 patch by Jeff RushGuido van Rossum1997-11-221-0/+5
|
* Apply two changes, systematically:Guido van Rossum1997-10-011-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!
* list2set(): correct return value (an int, not a PyObject*).Barry Warsaw1996-12-161-1/+1
|
* list2set(): PyList_GetItem could fail.Barry Warsaw1996-12-131-1/+3
|
* Reworked to eliminate all potential memory problems, includingBarry Warsaw1996-12-121-74/+111
| | | | deletion of object from list argument during callout to fileno().
* Several changes... Guido *please* take a look!Barry Warsaw1996-12-121-163/+201
| | | | | | | | | | | | | | | | | | 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.
* Add ``extern void bzero();'' for SGI, to keep gcc -Wall happy.Guido van Rossum1996-12-091-0/+5
|
* Keep gcc -Wall happy.Guido van Rossum1996-12-051-0/+4
|
* New permission notice, includes CNRI.Guido van Rossum1996-10-251-13/+20
|
* Slightly different Windows ifdefsGuido van Rossum1996-06-281-1/+1
|
* Yet another pass at fd2obj -- this time for WindowsGuido van Rossum1996-06-121-29/+58
|
* fix subtle refcnt bugGuido van Rossum1995-03-291-10/+11
|
* Added 1995 to copyright message.Guido van Rossum1995-01-041-2/+2
| | | | | Setup.in: clarified Tk comments somewhat. structmodule.c: use memcpy() instead of double precision assignment.
* Merge alpha100 branch back to main trunkGuido van Rossum1994-08-011-6/+9
|
* Fixed a couple of bugs: getargs doesn't use % escapes, and secondsSjoerd Mullender1993-11-021-2/+2
| | | | must be set after timeout is initialized.
* * selectmodule.c (select_select): timeout argument may be None with sameGuido van Rossum1993-11-011-6/+12
| | | | meaning as no 4th argument
* * selectmodule.c: fix (another!) two memory leaks -- this time in list2setGuido van Rossum1993-05-121-0/+2
| | | | * tokenizer.[ch]: allow continuation without \ inside () [] {}.
* * Changed many files to use mkvalue() instead of newtupleobject().Guido van Rossum1993-03-161-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.
* * ceval.c: ifdef out the last argument passing compat hack.Guido van Rossum1993-02-051-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
* Replaced max=-1 by max = -1.Guido van Rossum1992-08-061-1/+1
|
* * Makefile: cosmeticsGuido van Rossum1992-08-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * socketmodule.c: get rid of makepair(); fix makesocketaddr to fix broken recvfrom() * socketmodule: get rid of getStrarg() * ceval.h: move eval_code() to new file eval.h, so compile.h is no longer needed. * ceval.c: move thread comments to ceval.h; always make save/restore thread functions available (for dynloaded modules) * cdmodule.c, listobject.c: don't include compile.h * flmodule.c: include ceval.h * import.c: include eval.h instead of ceval.h * cgen.py: add forground(); noport(); winopen(""); to initgl(). * bltinmodule.c, socketmodule.c, fileobject.c, posixmodule.c, selectmodule.c: adapt to threads (add BGN/END SAVE macros) * stdwinmodule.c: adapt to threads and use a special stdwin lock. * pythonmain.c: don't include getpythonpath(). * pythonrun.c: use BGN/END SAVE instead of direct calls; also more BGN/END SAVE calls etc. * thread.c: bigger stack size for sun; change exit() to _exit() * threadmodule.c: use BGN/END SAVE macros where possible * timemodule.c: adapt better to threads; use BGN/END SAVE; add longsleep internal function if BSD_TIME; cosmetics
* * myselect.h: bzero -> memsetGuido van Rossum1992-08-041-12/+12
| | | | * select.c: bzero -> memset; removed global variable
* Use "myselect.h" as intended.Guido van Rossum1992-06-231-5/+1
|
* Changes for new UNIX-specific built-in module 'select' and new header forGuido van Rossum1992-06-231-0/+194
interfaces to variants of select() system call, "myselect.h". This includes adding fileno() methods to files, sockets and stdwin.