summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Trent Mick <trentm@activestate.com>:Fred Drake2000-06-303-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | The common technique for printing out a pointer has been to cast to a long and use the "%lx" printf modifier. This is incorrect on Win64 where casting to a long truncates the pointer. The "%p" formatter should be used instead. The problem as stated by Tim: > Unfortunately, the C committee refused to define what %p conversion "looks > like" -- they explicitly allowed it to be implementation-defined. Older > versions of Microsoft C even stuck a colon in the middle of the address (in > the days of segment+offset addressing)! The result is that the hex value of a pointer will maybe/maybe not have a 0x prepended to it. Notes on the patch: There are two main classes of changes: - in the various repr() functions that print out pointers - debugging printf's in the various thread_*.h files (these are why the patch is large) Closes SourceForge patch #100505.
* the mad patcher strikes again:Fredrik Lundh2000-06-301-25/+24
| | | | | | | | | | | | | | | -- added pickling support (only works if sre is imported) -- fixed wordsize problems in engine (instead of casting literals down to the character size, cast characters up to the literal size (same as the code word size). this prevents false hits when you're matching a unicode pattern against an 8-bit string. (unfortunately, this broke another test, but I think the test should be changed in this case; more on that on python-dev) -- added sre.purge function (unofficial, clears the cache)
* - fixed lookahead assertions (#10, #11, #12)Fredrik Lundh2000-06-302-29/+53
| | | | - untabified sre_constants.py
* - fixed default value handling in group/groupdictFredrik Lundh2000-06-301-18/+23
| | | | - added test suite
* final patches from Neil Schemenauer for garbage collectionJeremy Hylton2000-06-304-1/+684
|
* Add a comment about needing to change a #include if using a version ofFred Drake2000-06-301-0/+1
| | | | | Berkeley DB 2.0 or newer; most Linux distros will include a more recent version than 1.85.
* Trent Mick <trentm@activestate.com>:Fred Drake2000-06-301-13/+46
| | | | | | | | | | | | | | | | | | This patch fixes possible overflows in the socket module for 64-bit platforms (mainly Win64). The changes are: - abstract the socket type to SOCKET_T (this is SOCKET on Windows, int on Un*x), this is necessary because sizeof(SOCKET) > sizeof(int) on Win64 - use INVALID_SOCKET on Win32/64 for an error return value for accept() - ensure no overflow of the socket variable for: (1) a PyObject return value (use PyLong_FromLongLong if necessary); and (2) printf formatting in repr(). Closes SourceForge patch #100516.
* Patch by Nadav Horesh to make acosh and asinh better.Guido van Rossum2000-06-301-7/+12
| | | | | | | Tim posted a long comment to python-dev (subject: "Controversial patch (cmath)"; date: 6/29/00). The conclusion is that this whole module stinks and this patch isn't perfect, but it's better than the acosh and asinh we had, so let's check it in.
* - fixed split behaviour on empty matchesFredrik Lundh2000-06-301-3/+3
| | | | | | - fixed compiler problems when using locale/unicode flags - fixed group/octal code parsing in sub/subn templates
* still trying to figure out how to fix the remainingFredrik Lundh2000-06-291-12/+78
| | | | | | | | | | | | | | | | | | | group reset problem. in the meantime, I added some optimizations: - added "inline" directive to LOCAL (this assumes that AC_C_INLINE does what it's supposed to do). to compile SRE on a non-unix platform that doesn't support inline, you have to add a "#define inline" somewhere... - added code to generate a SRE_OP_INFO primitive - added code to do fast prefix search (enabled by the USE_FAST_SEARCH define; default is on, in this release)
* Trent Mick <trentm@activestate.com>:Fred Drake2000-06-291-4/+11
| | | | | | | | | | This patch fixes a possible overflow in the Sleep system call on Win32/64 in the time_sleep() function in the time module. For very large values of the give time to sleep the number of milliseconds can overflow and give unexpected sleep intervals. THis patch raises an OverflowError if the value overflows. Closes SourceForge patch #100514.
* Trent Mick <trentm@activestate.com>:Fred Drake2000-06-291-67/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the posix module for large file support mainly on Win64, although some general cleanup is done as well. The changes are: - abstract stat->STAT, fstat->FSTAT, and struct stat->STRUCT_STAT This is because stat() etc. are not the correct functions to use on Win64 (nor maybe on other platforms?, if not then it is now trivial to select the appropriate one). On Win64 the appropriate system functions are _stati64(), etc. - add _pystat_fromstructstat(), it builds the return tuple for the fstat system call. This functionality was being duplicated. As well the construction of the tuple was modified to ensure no overflow of the time_t elements (sizeof(time_t) > sizeof(long) on Win64). - add overflow protection for the return values of posix_spawnv and posix_spawnve - use the proper 64-bit capable lseek() on Win64 - use intptr_t instead of long where appropriate from Win32/64 blocks (sizeof(void*) > sizeof(long) on Win64) This closes SourceForge patch #100513.
* Trent Mick <trentm@activestate.com>:Fred Drake2000-06-291-5/+6
| | | | | | | | | | Mark Hammond provided (a long time ago) a better Win32 specific time_clock implementation in timemodule.c. The library for this implementation does not exist on Win64 (yet, at least). This patch makes Win64 fall back on the system's clock() function for time_clock(). This closes SourceForge patch #100512.
* - fixed another split problemFredrik Lundh2000-06-292-8/+18
| | | | | | | | | (those semantics are weird...) - got rid of $Id$'s (for the moment, at least). in other words, there should be no more "empty" checkins. - internal: some minor cleanups.
* - fixed splitFredrik Lundh2000-06-292-29/+38
| | | | | | | | | | | | | | (test_sre still complains about split, but that's caused by the group reset bug, not split itself) - added more mark slots (should be dynamically allocated, but 100 is better than 32. and checking for the upper limit is better than overwriting the memory ;-) - internal: renamed the cursor helper class - internal: removed some bloat from sre_compile
* Updated the comment in this file to reflect the new defaults. ThreadsBarry Warsaw2000-06-291-3/+4
| | | | | are enabled by default now unless --without-threads is given to configure.
* pyexpat notes: add the name of the archive to the ar commandJeremy Hylton2000-06-291-1/+1
|
* - renamed "tolower" hook (it happened to work withFredrik Lundh2000-06-292-20/+20
| | | | my compiler, but not on guido's box...)
* - last patch broke parse_template; fixed by changing someFredrik Lundh2000-06-291-87/+141
| | | | | | | | | | | tests in sre_patch back to previous version - fixed return value from findall - renamed a bunch of functions inside _sre (way too many leading underscores...) </F>
* - removed "alpha only" licensing restrictionFredrik Lundh2000-06-291-10/+1
| | | | | - removed some hacks that worked around 1.6 alpha bugs - removed bogus test code from sre_parse
* towards 1.6b1Fredrik Lundh2000-06-291-248/+386
|
* towards 1.6b1Fredrik Lundh2000-06-292-22/+44
|
* Improve explanation of how to build the pyexpat module.Fred Drake2000-06-291-3/+9
|
* Jack Jansen: Use include "" instead of <>; and staticforward declarationsGuido van Rossum2000-06-291-3/+3
|
* 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: 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?]
* Jack Jansen: Mac Carbon: don't include sys/types if we don't have itGuido van Rossum2000-06-281-0/+2
|
* 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.
* 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.
* Thomas Wouters <thomas@xs4all.net>:Fred Drake2000-06-281-0/+64
| | | | | | | | | | | | | This patch adds the openpty() and forkpty() library calls to posixmodule.c, when they are available on the target system. (glibc-2.1-based Linux systems, FreeBSD and BSDI at least, probably the other BSD-based systems as well.) Lib/pty.py is also rewritten to use openpty when available, but falls back to the old SGI method or the "manual" BSD open-a-pty code. Openpty() is necessary to use the Unix98 ptys under Linux 2.2, or when using non-standard tty names under (at least) BSDI, which is why I needed it, myself ;-) forkpty() is included for symmetry.
* Marc-Andre Lemburg <mal@lemburg.com>:Marc-André Lemburg2000-06-281-0/+12212
| | | | | | New ucnhash module by Bill Tutt. This module contains the hash table needed to map Unicode character names to Unicode ordinals and is loaded on-the-fly by the standard unicode-escape codec.
* Fixes for compiling on Tru64.Andrew M. Kuchling2000-06-271-8/+13
| | | | | Define a STRICT_SYSV_CURSES macro on SGI, Sun, and Tru64, to mark systems that don't support some features.
* Fix two typos (, instead of ;)Andrew M. Kuchling2000-06-271-3/+2
|
* Added support for mouse functions: mousemask(), mouseinterval(),Andrew M. Kuchling2000-06-271-0/+130
| | | | | getmouse(), ungetmouse(), and window.enclose(). wmouse_trafo() seems of marginal importance at the moment.
* Added support for passing Unicode strings to Expat handlers by default.Andrew M. Kuchling2000-06-271-485/+663
| | | | This version still includes #ifdef hackery to compile with 1.5.2.
* Release the global interpreter lock around the most importantAndrew M. Kuchling2000-06-231-12/+45
| | | | functions that might block or pause
* Added .timeout() method and .typeahead() functionAndrew M. Kuchling2000-06-211-0/+19
|
* Fixed docstring typo, reported by Skip Montanaro <skip@mojam.com>.Fred Drake2000-06-191-1/+1
|
* Patch from Michael Hudson to fix flatten recursive data structures:Andrew M. Kuchling2000-06-191-5/+8
| | | | | | | | | [mwh21@atrus build]$ ./python >>> import Tkinter >>> l = [] >>> l.append(l) >>> Tkinter._flatten(l) Segmentation fault (core dumped)
* Patch from Lorenzo M. Catucci:Andrew M. Kuchling2000-06-181-0/+5
| | | | | | I discovered the [MREMAP_MAYMOVE] symbol is only defined when _GNU_SOURCE is defined; therefore, here is the change: if we are compiling for linux, define _GNU_SOURCE before including mman.h, and all is done.
* Patch from /F:Andrew M. Kuchling2000-06-181-0/+100
| | | | | | | | | | this patch adds a fast _flatten function to the _tkinter module, and imports it from Tkinter.py (if available). this speeds up canvas operations like create_line and create_polygon. for example, a create_line with 5000 vertices runs about 50 times faster with this patch in place.