| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
friends. (Modified version of patch #101682 from Neil Schemenauer)
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This should match the situation in the 1.6b1 tree.
|
|
|
|
|
|
| |
Remove some of GCC's warning in -Wstrict-prototypes mode.
This closes SourceForge patch #101342.
|
| |
|
| |
|
|
|
|
| |
marked my*.h as obsolete
|
|
|
|
| |
possible.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 ;)
|
| |
|
|
|
|
| |
consensus where it should go).
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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?]
|
|
|
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
| |
PyArg_ParseTuple() format string arguments as possible.
|
|
|
|
|
|
| |
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!
|
| |
|
|
|
|
| |
on BeOS or Windows.
|
| |
|
|
|
|
|
| |
This is because they are huge and the stack is limited on Windows.
Other platforms keep declaring it on the stack.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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!
|
| |
|
| |
|
|
|
|
| |
deletion of object from list argument during callout to fileno().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Setup.in: clarified Tk comments somewhat.
structmodule.c: use memcpy() instead of double precision assignment.
|
| |
|
|
|
|
| |
must be set after timeout is initialized.
|
|
|
|
| |
meaning as no 4th argument
|
|
|
|
| |
* tokenizer.[ch]: allow continuation without \ inside () [] {}.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
| |
* select.c: bzero -> memset; removed global variable
|
| |
|
|
interfaces to variants of select() system call, "myselect.h". This includes
adding fileno() methods to files, sockets and stdwin.
|