summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Restore strict checking of socket address values; addresses passed toFred Drake2000-07-011-15/+21
| | | | | | | the bind(), connect(), and connect_ex() methods must be a single parameter. Originally part of 1.98, reverted in 1.100.
* Jack Jansen, Mac patch:Guido van Rossum2000-07-011-0/+3
| | | | Include limits.h if we have it.
* clean up warnings in Win32 build of mmapmodule.cGuido van Rossum2000-07-011-6/+6
|
* In b_setitem(), instead of the platform dependent CHAR_MIN andGuido van Rossum2000-07-011-2/+2
| | | | | | | | | | | | | CHAR_MAX, use hardcoded -128 and 127. This may seem strange, unless you realize that we're talking about signed bytes here! Bytes are always 8 bits and 2's complement. CHAR_MIN and CHAR_MAX are properties of the char data type, which is guaranteed to hold at least 8 bits anyway. Otherwise you'd get failing tests on platforms where unsigned char is the default (e.g. AIX). Thanks, Vladimir Marangozov, for finding this nit!
* Change copyright notice.Guido van Rossum2000-07-011-26/+6
|
* Change copyright notice - 2nd try.Guido van Rossum2000-06-3045-270/+0
|
* Change copyright notice.Guido van Rossum2000-06-3050-1094/+344
|
* Fix another error on AIX by using a proper cast.Guido van Rossum2000-06-301-2/+2
|
* Crude way to fix a problem on AIX: #undef STAT before defining it.Guido van Rossum2000-06-301-0/+1
|
* -- changed $ to match before a trailing newline, evenFredrik Lundh2000-06-301-1/+3
| | | | if the multiline flag isn't given.
* Setup.thread.in was misnamed so it has been replaced byBarry Warsaw2000-06-301-5/+4
| | | | | Setup.config.in. The latter contains all configure-time selectable modules; currently thread and gc.
* Add Setup.configBarry Warsaw2000-06-301-0/+1
|
* Removed the comment about the thread module.Barry Warsaw2000-06-301-2/+0
|
* Setup.thread => Setup.configBarry Warsaw2000-06-301-2/+2
|
* 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.