summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Removed a prototype which is not used in socketmodule.cMarc-André Lemburg2000-07-071-1/+0
| | | | Patch by T. Wouters.
* Fix bug #392, reported by Jonathan Giddy <jon@dstc.edu.au>:Fred Drake2000-07-061-2/+4
| | | | | | | | | | | | In posixmodule.c:posix_fork, the function PyOS_AfterFork is called for both the parent and the child, despite the docs stating that it should be called in the new (child) process. This causes problems in the parent since the forking thread becomes the main thread according to the signal module. Calling PyOS_AfterFork() only in the child fixes this. Changed for both fork() and forkpty().
* Python 2.0 is not supposed to use string exceptions in the standard libraryFred Drake2000-07-063-3/+3
| | | | | & extensions, so create exceptions in extension modules using the PyErr_NewException() API.
* added read_history_file and write_history_fileSkip Montanaro2000-07-061-0/+50
| | | | XXX should perhaps support history truncation as well
* Removed unused variables.Andrew M. Kuchling2000-07-061-3/+4
| | | | Added two functions that were left out of the method definition table.
* don't prepend "$(srcdir)/" to paths beginning with "$" since they are likelySkip Montanaro2000-07-061-0/+1
| | | | to be absolute.
* Add more "volatile" decls to stop gcc -Wall warnings.Tim Peters2000-07-051-2/+2
| | | | | | | | Somebody w/ gcc please check that the wngs are gone! There are cheaper (at runtime) ways to prevent the wngs, but they're obscure and delicate. I'm going for the easy Big Hammer here under the theory that PCRE will be replaced by SRE anyway.
* maintenance release:Fredrik Lundh2000-07-051-32/+31
| | | | | | | | - reorganized some code to get rid of -Wall and -W4 warnings - fixed default argument handling for sub/subn/split methods (reported by Peter Schneider-Kamp).
* Remove definition of _GNU_SOURCE, since Python.h now does it for usAndrew M. Kuchling2000-07-051-5/+0
|
* Modified the encode interfaces of all builtin codecs to acceptMarc-André Lemburg2000-07-051-50/+105
| | | | | any object which can be converted to Unicode by means of PyUnicode_FromObject().
* pyexpat.errors is a *strange* module!Fred Drake2000-07-041-14/+15
| | | | | | | | | It gets initialized when pyexpat is imported, and is only accessible as an attribute of pyexpat; it cannot be imported itself. This allows it to at least be importable after pyexpat itself has been imported by adding it to sys.modules, so it is not quite as strange. This arrangement needs to be better thought out.
* Remove warning about local variable possibly being using uninitialized;Fred Drake2000-07-041-1/+1
| | | | noted by Marc-Andre Lemburg <mal@lemburg.com>.
* Fixes for compilation problems on Tru64 reported by Mark FavasAndrew M. Kuchling2000-07-041-16/+16
|
* Fixed symbol search for defining NSIG. It now also checks _NSIGMarc-André Lemburg2000-07-041-5/+9
| | | | | | | which some C libs define (e.g. glibc). Added a fallback default value for NSIG which hopefully provides enough room for signal slots.
* Typo repair in docstring -- my fault.Tim Peters2000-07-031-1/+1
|
* Mac only: two epoch problem workarounds are no longer needed for GUSIJack Jansen2000-07-031-2/+2
| | | | >= 2.0.5. One still is:-(
* - fixed grouping error bugFredrik Lundh2000-07-032-16/+36
| | | | - changed "group" operator to "groupref"
* - added lookbehind support (?<=pattern), (?<!pattern).Fredrik Lundh2000-07-032-63/+86
| | | | | | | | | | | | | | | | | the pattern must have a fixed width. - got rid of array-module dependencies; the match pro- gram is now stored inside the pattern object, rather than in an extra string buffer. - cleaned up a various of potential leaks, api abuses, and other minors in the engine module. - use mal's new isalnum macro, rather than my own work- around. - untabified test_sre.py. seems like I removed a couple of trailing spaces in the process...
* ANSI-fication, remove Py_PROTO, etc.Fred Drake2000-07-031-84/+74
| | | | | | | Revise math_1(), math_2(), stub-generating macros, and function tables to use PyArg_ParseTuple() and properly provide the function name for error message generation. Fix pow() docstring for MPW 3.1; had said "power" instead of "pow".
* Andrew Kuchling <akuchlin@mems-exchange.org>:Fred Drake2000-07-031-1/+1
| | | | Typo in string literal: execpt --> except
* - experimental: added two new attributes to the match object:Fredrik Lundh2000-07-022-12/+29
| | | | | | | | "lastgroup" is the name of the last matched capturing group, "lastindex" is the index of the same group. if no group was matched, both attributes are set to None. the (?P#) feature will be removed in the next relase.
* Repair docs for math.frexp (they were wrong).Tim Peters2000-07-021-1/+3
| | | | Reported on c.l.py by Kirill Simonov.
* - actually enabled charset anchors in the engine (still notFredrik Lundh2000-07-023-19/+44
| | | | | | | | | | used by the code generator) - changed max repeat value in engine (to match earlier array fix) - added experimental "which part matched?" mechanism to sre; see http://hem.passagen.se/eff/2000_07_01_bot-archive.htm#416954 or python-dev for details.
* -- use charset bitmaps where appropriate. this gives a 5-10%Fredrik Lundh2000-07-022-35/+66
| | | | | | | | | speedup for some tests, including the python tokenizer. -- added support for an optional charset anchor to the engine (currently unused by the code generator). -- removed workaround for array module bug.
* - fixed "{ in any other context" bugFredrik Lundh2000-07-011-1/+4
| | | | - minor comment touchups in the C module
* today's SRE update:Fredrik Lundh2000-07-011-4/+11
| | | | | | | | -- changed 1.6 to 2.0 in the file headers -- fixed ISALNUM macro for the unicode locale. this solution isn't perfect, but the best I can do with Python's current unicode database.
* 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)