summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Rationalize use of limits.h, moving the inclusion to Python.h.Fred Drake2000-09-267-32/+5
| | | | | | | | 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.
* fix bug #114290: when interpreter's argv[0] has a relative path makeJeremy Hylton2000-09-251-2/+19
| | | | | it absolute by joining it with getcwd result. avoid including unnecessary ./ in path but do not test for ../ (more complicated)
* Add missing prototypes for the benefit of SunOS 4.1.4 */Guido van Rossum2000-09-251-0/+7
|
* For the benefit of SunOS 4.1.4, define MS_SYNC as 0 when it'sGuido van Rossum2000-09-251-0/+6
| | | | | | undefined. ccording to MvL, this is safe: the MS_SYNC flag means that msync() returns when all I/O operations are scheduled; without it, it waits until they are complete, which is acceptable behavior.
* unicode database compression, step 2:Fredrik Lundh2000-09-254-4313/+4564
| | | | | | | | | | - fixed attributions - moved decomposition data to a separate table, in preparation for step 3 (which won't happen before 2.0 final, promise!) - use relative paths in the generator script I have a lot more stuff in the works for 2.1, but let's leave that for another day...
* Repaired damaged string.Tim Peters2000-09-241-1/+1
|
* xmlparse_ExternalEntityParserCreate(): Add required cast to return toFred Drake2000-09-241-1/+1
| | | | avoid compiler warnings.
* unicode database compression, step 1:Fredrik Lundh2000-09-241-11/+1
| | | | | - use unidb compression for the unicodedata module. on Windows, the new unidatabase module is 120k, down from nearly 600k.
* unicode database compression, step 1:Fredrik Lundh2000-09-243-65715/+4398
| | | | | - use unidb compression for the unicodedata module. on Windows, the new unidatabase module is 120k, down from nearly 600k.
* Added ExternalEntityParserCreate method (patch 101635).Lars Gustäbel2000-09-241-0/+66
|
* Change the name of the exception from "pyexpat.error" toFred Drake2000-09-231-12/+13
| | | | | | | | "xml.parsers.expat.error", so it will reflect the public name of the exception rather than the internal name. Also change some of the initialization to use the new PyModule_Add*() convenience functions.
* Fix some long/"l" int/"i" mismatches. Fixes bug #113779.Neil Schemenauer2000-09-221-2/+2
|
* It's better to test for __hpux rather than __hppa, and hpux or hppa isGuido van Rossum2000-09-221-1/+1
| | | | unnecessary. Sez edg@SF
* Hopefully fix the problem with undeclared fdatasync() on HP-UX thatGuido van Rossum2000-09-221-0/+5
| | | | | | | was reported twice so far. Someone with access to HP-UX, please test this! (Is '__hppa' or 'hppa' really the correct symbol to test for?)
* Address Bug #115057: add a --with-suffix option to set the EXEGuido van Rossum2000-09-221-4/+4
| | | | | variable in the Makefiles from the configure script. Usefil for Cygwin and Mac OS X builds.
* - Add DEBUG_SAVEALL option. When enabled all garbage objects found by theNeil Schemenauer2000-09-221-27/+39
| | | | | | | collector will be saved in gc.garbage. This is useful for debugging a program that creates reference cycles. - Fix else statements in gcmodule.c to conform to Python coding standards.
* When PyInt_FromLong() returns NULL, you do not need to checkFred Drake2000-09-221-4/+2
| | | | | PyErr_Occurred(). Removed the extra test and setting of a bogus exception.
* Implemented new os.startfile function, unique to Windows, exposing aTim Peters2000-09-221-0/+33
| | | | | | | | | | | | | | | | subset of Win32 ShellExecute's functionality. Guido wants this because IDLE's Help -> Docs function currently crashes his machine because of a conflict between his version of Norton AntiVirus (6.10.20) and MS's _popen. Docs for startfile are being mailed to Fred (or just read the docstring -- it tells the whole story). Changed webbrowser.py to use os.startfile instead of os.popen on Windows. Changed IDLE's EditorWindow.py to pass an absolute path for the docs (hardcoding ShellExecute's "directory" arg to "." as used to be done let IDLE work, but made the startfile command exceedingly obscure for other uses -- the MS docs are terrible, of course, & still not sure I understand it). Note that Windows Python must link with shell32.lib now! That's where ShellExecute lives.
* Fix for SF bug 115051: Dodgy use of PyTuple_SET_ITEM in pyexpat.cTim Peters2000-09-221-2/+1
|
* Remove debugging print. ;(Fred Drake2000-09-221-2/+0
|
* Added a true unicode_internal_encode function and fixed theMarc-André Lemburg2000-09-211-9/+43
| | | | | unicode_internal_decode function to support Unicode objects directly rather than by generating a copy of the object.
* Remove memory leaks of strings/Unicode objects passed into the characterFred Drake2000-09-211-58/+21
| | | | | | | | | | data and default handlers -- a new reference was being passed to Py_BuildValue() for the "O" format character; using "N" plugs the leak. Fixed two other (minor) leaks that occurred on various error conditions. Removed uses of the UNLESS macro, which makes code hard to read, and is Evil.
* - fixed yet another gcc -pedantic warningFredrik Lundh2000-09-211-16/+47
| | | | | - added experimental "expand" method to match objects - don't use the buffer interface on unicode strings
* Use PyOS_setsig() instead of signal(). Also remove redundant spacesGuido van Rossum2000-09-211-15/+15
| | | | from the FreeBSD code.
* Add a definition of rl_library_version. Reported by jpettit@sourceforge.Guido van Rossum2000-09-201-0/+1
|
* Randall Hopper: Add fpectl functionality patch for FreeBSD.Guido van Rossum2000-09-191-0/+15
|
* Implement readlines function. Closes Bug #110686.Martin v. Löwis2000-09-191-0/+36
|
* Make better use of GNU Pth -- patch by Andy Dustman.Guido van Rossum2000-09-191-0/+9
| | | | | | | | | | | | | | | I can't test this, so I'm just checking it in with blind faith in Andy. I've tested that it doesn't broeak a non-Pth build on Linux. Changes include: - There's a --with-pth configure option. - Instead of _GNU_PTH, we test for HAVE_PTH. - Better signal handling. - (The config.h.in file is regenerated in a slightly different order.)
* Add invert() and __invert__() as aliases for inv()/__inv__().Fred Drake2000-09-171-11/+16
| | | | | | | | Add contains() as alias for __contains__(). Make PyArg_ParseTuple() formats include the function name. Based on patch by Denis S. Otkidach <ods@users.sourceforge.net>, this closes SourceForge patch #101390.
* arraymodule: Fix SF bug 113960.Tim Peters2000-09-161-18/+23
| | | | | | | | | | | | | | reverse() didn't work at all due to bad arg check. Fixed that. Added Brad Chapman to ACKS file, as the proud new owner of two implicitly copyrighted lines of Python source code <wink>. Repaired buffer_info's total lack of arg-checking. Replaced memmove by memcpy in reverse() guts, as memmove is often slower and the memory areas are guaranteed disjoint. Replaced poke-and-hope unchecked decl of tmp buffer size by assert-checked larger tmp buffer. Got rid of inconsistent spaces before open paren in docstrings. Added reverse() sanity tests to test_array.py.
* Use PyOS_setsig() instead of directly calling signal() or sigaction().Guido van Rossum2000-09-161-5/+12
| | | | | | | This fixes the first half of bug #110611: the immediate exit when ^C is hit when readline and threads are configured. Also added a new module variable, readline.library_version.
* Use typedef PyOS_sighandler_t and APIs PyOS_getsig() andGuido van Rossum2000-09-161-25/+12
| | | | | | | PyOS_setsig(), instead of directly calling signal() or sigaction(). This fixes the second half of bug #110611: the mysterious ignoring of the first ^C when readline isn't used.
* Fixed legit gripe from c.l.py that math.fmod docs aren't confusing enough.Tim Peters2000-09-161-1/+2
| | | | FRED, please check my monkey-see-monkey-do Tex fiddling!
* Add a constant "library" to the module which names the library used,Fred Drake2000-09-151-10/+80
| | | | | | | | | | | | based on the available headers. Update comments on the filename extensions used to reflect library differences. Added get() and setdefault() methods to the dbm object. Added docstrings, convert all methods to PyArg_ParseTuple() so that error messages will have the method names.
* Some systems need -lucb to compile the mmap module. Add a comment toFred Drake2000-09-151-1/+4
| | | | | | this effect. This address one aspect of SourceForge bug #113797.
* Py_Main(), usage(), usage_mid: Add -h and -V flags to print the usageBarry Warsaw2000-09-151-8/+32
| | | | | message and Python version number and exit immediately. Closes patch #101496.
* Use symbolic constants for allowable short ranges.Martin v. Löwis2000-09-151-4/+7
|
* Closes SF bug 113894: on Windows, things like os.listdir("k:") andTim Peters2000-09-151-9/+7
| | | | | | glob.glob("k:*py") (i.e., a raw drive letter + colon at the start) were using the root of the drive rather than the expected Windows behavior of using the drive's "current directory".
* Check range for bytes and shorts. Closes bug #110845.Martin v. Löwis2000-09-151-2/+42
|
* Trent Mick points out that the BSD DB also provides an ndbm compatibilityFred Drake2000-09-151-0/+2
| | | | layer. If that is available, consider that as an option as well.
* Use the configure support to determine which ndbm.h header to include.Fred Drake2000-09-141-0/+10
|
* Add several dl.RTLD_ constants. Closes bug 110842.Martin v. Löwis2000-09-131-2/+38
|
* Simplify some of the code. Use PyErr_Format() instead of sprintf(), etc.Fred Drake2000-09-121-186/+122
| | | | Reduces lines of code and compiled object size.
* General cleanup in preparation for a bugfix: removed unused code, uselessTim Peters2000-09-101-65/+27
| | | | | | | | declarations, added some comments where I had to think too hard to understand what was happening, and changed the primary internal get/set functions to assert they're passed objects of the correct type instead of doing runtime tests for that (it's an internal error that "should never happen", so it's good enough to check it only in the debug build).
* autodetect presence of libdb - this allows bsddbmodule to be builtSkip Montanaro2000-09-081-1/+1
| | | | | automatically if dbopen is found in libc or libdb. This closes patch #101420
* Oops. Jim's fix didn't. This one does -- I tested it a bit betterGuido van Rossum2000-09-071-4/+19
| | | | this time!
* Simple fix from Jin Fulton to avoid returning a half-initializedGuido van Rossum2000-09-071-2/+2
| | | | | | module when e.g. copy_reg.py doesn't exist. This caused a core dump. This closes SF bug 112944.
* compromise value for threshold0: not too high, not too lowJeremy Hylton2000-09-051-1/+1
|
* Instead of printing all 9 lines of copyright info, printGuido van Rossum2000-09-051-1/+4
| | | | "Type \"copyright\", \"credits\" or \"license\" for more information."
* return -1 for undefined groups (as implemented in 1.5.2) instead ofFredrik Lundh2000-09-021-16/+4
| | | | None (as documented) from start/end/span. closes bug #113254