summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Vladimir Marangozov:Guido van Rossum2000-06-281-8/+8
| | | | | | | | | | | | This patch fixes a problem on AIX with the signed int case code in getargs.c, after Trent Mick's intervention about MIN/MAX overflow checks. The AIX compiler/optimizer generates bogus code with the default flags "-g -O" causing test_builtin to fail: int("10", 16) <> 16L. Swapping the two checks in the signed int code makes the problem go away. Also, make the error messages fit in 80 char lines in the source.
* Vladimir Marangozov:Guido van Rossum2000-06-281-3/+3
| | | | | | Avoid calling the dealloc function, previously triggered with DECREF(inst). This caused a segfault in PyDict_GetItem, called with a NULL dict, whenever inst->in_dict fails under low-memory conditions.
* Urmpf. Quality control on this patch lapsed a bit. :-(Guido van Rossum2000-06-281-2/+6
| | | | | | | | | | | The depth field was never decremented inside w_object(), and it was never initialized in PyMarshal_WriteObjectToFile(). This caused imports from .pyc files to fil mysteriously when the .pyc file was written by the broken code -- w_object() would bail out early, but PyMarshal_WriteObjectToFile() doesn't check the error or return an error code, and apparently the marshalling code doesn't call PyErr_Check() either. (That's a separate patch if I feel like it.)
* Running the program through itself reveals that one end tag wasGuido van Rossum2000-06-281-1/+1
| | | | | | | | | | mislabeled. (Using -c and then -e rearranges some comments, so I won't check that in -- but it's a good test anyway. Note that pindent is not perfect -- e.g. it doesn't know about triple-quoted strings!)
* Peter Schneider-Kamp:Guido van Rossum2000-06-281-10/+75
| | | | | | | | | | | | | Problem: A Python program can be completed and reformatted using Tools/scripts/pindent.py. Unfortunately there is no option for removal of the generated "# end"-tags. Although a few Python commands or a "grep -v '# end '" can do wonders here, there are two drawbacks: - not everyone has grep/time to write a Python script - it is not checked whether the "# end"-tags were used validly Solution: add extra option "-e" (eliminate) to pindent.py
* Trent Mick:Guido van Rossum2000-06-281-2/+2
| | | | | | | | | Fix warnings on 64-bit build build of signalmodule.c - Though I know that SIG_DFL and SIG_IGN are just small constants, there are cast to function pointers so the appropriate Python call is PyLong_FromVoidPtr so that the pointer value cannot overflow on Win64 where sizeof(long) < sizeof(void*).
* Trent Mick:Guido van Rossum2000-06-281-8/+7
| | | | | | | | | | | | This patch fixes cPickle.c for 64-bit platforms. - The false assumption sizeof(long) == size(void*) exists where PyInt_FromLong is used to represent a pointer. The safe Python call for this is PyLong_FromVoidPtr. (On platforms where the above assumption *is* true a PyInt is returned as before so there is no effective change.) - use size_t instead of int for some variables
* Trent Mick: familiar simple Win64 patchesGuido van Rossum2000-06-282-9/+8
|
* Give Moshe some work to do.Fred Drake2000-06-281-0/+2
|
* Add a "See also:" link to the curses.ascii module.Fred Drake2000-06-281-0/+3
|
* Made the title of the Examples subsection plural!Fred Drake2000-06-281-2/+2
|
* Added note that the atexit module was added for Python 1.6.Fred Drake2000-06-281-0/+2
|
* Trent Mick's Win64 changes: size_t vs. int or long; also some overflowGuido van Rossum2000-06-289-21/+40
| | | | tests.
* Added entry for the curses.ascii module.Fred Drake2000-06-281-0/+1
|
* Added entries for the curses.ascii module.Fred Drake2000-06-282-50/+93
|
* Trent Mick: familiar simple Win64 patchesGuido van Rossum2000-06-284-11/+14
|
* added ucnhash (optional on USE_UCNHASH) and the mysteriously disappeared math.Jack Jansen2000-06-281-1/+7
|
* ucnhash and various other modules added.Jack Jansen2000-06-282-0/+0
|
* Added USE_UCNHASH (experimental, I hope it can go), USE_TOOLBOX and USE_QT.Jack Jansen2000-06-281-3/+4
|
* Trent Mick: change a few casts for Win64 compatibility.Guido van Rossum2000-06-282-2/+2
|
* Added USE_UCNHASH (experimental, I hope it can go)Jack Jansen2000-06-281-0/+1
|
* Skip Montanaro <skip@mojam.com>:Fred Drake2000-06-281-1/+18
| | | | Added an example of using an HTTP POST request.
* Trent Mick: use size_t instead of int where appropriate (time_strftime()).Guido van Rossum2000-06-281-2/+2
|
* Trent Mick: use size_t instead of int where appropriate (set_key()).Guido van Rossum2000-06-281-2/+2
|
* Trent Mick: use size_t instead of int where appropriate (call_readline()).Guido van Rossum2000-06-281-1/+1
|
* Trent Mick: use size_t instead of int where appropriate (mpz_format()).Guido van Rossum2000-06-281-1/+1
|
* Trent Mick: use size_t instead of int where appropriate (various spots).Guido van Rossum2000-06-281-9/+9
|
* Trent Mick: use size_t instead of int where appropriate (inGuido van Rossum2000-06-281-2/+2
| | | | fromfile(), to hold fread() result.)
* Trent Mick: use size_t instead of int where appropriate (in strxfrm(),Guido van Rossum2000-06-281-1/+1
| | | | to hold strlen() outcome).
* 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?]
* Trent Mick:Guido van Rossum2000-06-281-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | Various small fixes to the builtin module to ensure no buffer overflows. - chunk #1: Proper casting to ensure no truncation, and hence no surprises, in the comparison. - chunk #2: The id() function guarantees a unique return value for different objects. It does this by returning the pointer to the object. By returning a PyInt, on Win64 (sizeof(long) < sizeof(void*)) the pointer is truncated and the guarantee may be proven false. The appropriate return function is PyLong_FromVoidPtr, this returns a PyLong if that is necessary to return the pointer without truncation. [GvR: note that this means that id() can now return a long on Win32 platforms. This *might* break some code...] - chunk #3: Ensure no overflow in raw_input(). Granted the user would have to pass in >2GB of data but it *is* a possible buffer overflow condition.
* Support constant as a font name for the first column of a table using theFred Drake2000-06-281-0/+3
| | | | tableii & friends markup family.
* Jack Jansen: Moved includes to the top, removed think C supportGuido van Rossum2000-06-281-18/+20
|
* Jack Jansen: Mac Carbon: don't include sys/types if we don't have itGuido van Rossum2000-06-281-0/+2
|
* Jack Jansen: Removed support for long-dead Think C compilerGuido van Rossum2000-06-281-5/+0
|
* Jack Jansen: Removed Macintosh tab-guessing codeGuido van Rossum2000-06-281-7/+0
|
* Jack Jansen: Support for conditional inclusion of methods and functionsGuido van Rossum2000-06-283-8/+33
|
* Revise the description of when functions retrieved from class instancesFred Drake2000-06-281-9/+11
| | | | | | | | | are and are not turned into bound methods; some confusion was noted by Andrew Dalke. In particular, it has to be noted that functions located on the class instance are not turned into any sort of method, only those which are found via the underlying class.
* Michael Hudson <mwh21@cam.ac.uk>:Fred Drake2000-06-281-3/+22
| | | | | | | | | | | | | As I really do not have anything better to do at the moment, I have written a patch to Python/marshal.c that prevents Python dumping core when trying to marshal stack bustingly deep (or recursive) data structure. It just throws an exception; even slightly clever handling of recursive data is what pickle is for... [Fred Drake:] Moved magic constant 5000 to a #define. This closes SourceForge patch #100645.
* Trent Mick <trentm@activestate.com>:Fred Drake2000-06-281-2/+54
| | | | | | | | Testing: test_array.py was also extended to check that one can set the full range of values for each of the integral signed and unsigned array types. This closes SourceForge patch #100506.
* Trent Mick <trentm@activestate.com>:Fred Drake2000-06-281-10/+95
| | | | | | | | | | | | | | | | | | | | | | | | | The cause: Relatively recent (last month) patches to getargs.c added overflow checking to the PyArg_Parse*() integral formatters thereby restricting 'b' to unsigned char value and 'h','i', and 'l' to signed integral values (i.e. if the incoming value is outside of the specified bounds you get an OverflowError, previous it silently overflowed). The problem: This broke the array module (as Fredrik pointed out) because *its* formatters relied on the loose allowance of signed and unsigned ranges being able to pass through PyArg_Parse*()'s formatters. The fix: This patch fixes the array module to work with the more strict bounds checking now in PyArg_Parse*(). How: If the type signature of a formatter in the arraymodule exactly matches one in PyArg_Parse*(), then use that directly. If there is no equivalent type signature in PyArg_Parse*() (e.g. there is no unsigned int formatter in PyArg_Parse*()), then use the next one up and do some extra bounds checking in the array module. This partially closes SourceForge patch #100506.
* Thomas Wouters <thomas@xs4all.net>:Fred Drake2000-06-282-0/+25
| | | | Documentation updates related to the addition of openpty() and forkpty().
* Marc-Andre Lemburg <mal@lemburg.com>:Marc-André Lemburg2000-06-281-0/+664
| | | | | | | | | | | | Perfect hash table generator. Outputs a Python extension module which provides access to the hash table (which is stored in static C data) using custom code. This module can currently only generates code for the ucnhash module, but can easily be adapted to produce perfect hash tables for other tasks where fast lookup in large tables is needed. By Bill Tutt.
* Marc-Andre Lemburg <mal@lemburg.com>:Marc-André Lemburg2000-06-281-0/+109
| | | | | Generator for the new ucnhash module (ucnhash.h|c). Uses perfect_hash.py to create the ucnhash module.
* Marc-Andre Lemburg <mal@lemburg.com>:Marc-André Lemburg2000-06-281-0/+72
| | | | | | Utility extension module needed by perfect_hash.py By Bill Tutt.
* Marc-Andre Lemburg <mal@lemburg.com>:Marc-André Lemburg2000-06-281-0/+121
| | | | | | | | Patch to the standard unicode-escape codec which dynamically loads the Unicode name to ordinal mapping from the module ucnhash. By Bill Tutt.
* Marc-Andre Lemburg <mal@lemburg.com>:Marc-André Lemburg2000-06-281-0/+1
| | | | Added new ucnhash module by Bill Tutt.
* Marc-Andre Lemburg <mal@lemburg.com>:Marc-André Lemburg2000-06-281-0/+1
| | | | Added new ucnhash module.
* Marc-Andre Lemburg <mal@lemburg.com>:Marc-André Lemburg2000-06-281-0/+3
| | | | Updated test output.
* Marc-Andre Lemburg <mal@lemburg.com>:Marc-André Lemburg2000-06-281-0/+75
| | | | | Added tests for the new Unicode character name support in the standard unicode-escape codec.