Martin v. Löwis
21645fc073
Don't try to use unsupported DB versions.
2002-11-19 08:30:08 +00:00
Martin v. Löwis
6aa4a1f29c
Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185.
2002-11-19 08:09:52 +00:00
Neil Schemenauer
47ec6c0790
Don't use PyNumber_Float() since it's is nearly useless. Instead, rely on
...
PyFloat_AsDouble to generate a good error message.
2002-11-18 16:02:29 +00:00
Walter Dörwald
08c4cc4127
Use PyInt_AsLong instead of PyInt_AS_LONG after the call to
...
PyNumber_Int, because now PyNumber_Int might return a long,
and PyInt_AsLong can handle that, whereas PyInt_AS_LONG can't.
This closes SF bug #629989 .
2002-11-12 11:42:20 +00:00
Neal Norwitz
addfe0c09c
Make private functions static so we don't pollute the namespace
2002-11-10 14:33:26 +00:00
Martin v. Löwis
774348c8d6
Fix typo.
2002-11-09 19:54:06 +00:00
Tim Peters
6ee6db81c2
bz2_compress/bz2_decompress: more casting away LONG_LONG for
...
_PyString_Resize calls.
2002-11-09 04:33:36 +00:00
Tim Peters
39185d622d
BZ2Decomp_decompress(): Fixed more long vs LONG_LONG confusions.
2002-11-09 04:31:38 +00:00
Tim Peters
2858e5e84b
BZ2Comp_flush(): Fixed more int vs LONG_LONG confusions.
2002-11-09 04:30:08 +00:00
Tim Peters
f29f0c6a78
BZ2Comp_compress(): Explicitly cast the LONG_LONG size argument to
...
_PyString_Resize to int.
2002-11-09 04:28:17 +00:00
Tim Peters
07f075cebb
BZ2Comp_compress(): changed decl of totalout to LONG_LONG, since it's
...
solely used to hold LONG_LONG values, and the compiler rightfully warns
about potential data loss otherwise.
2002-11-09 04:26:02 +00:00
Tim Peters
a17c0c4509
Repaired signed-vs-unsigned mismatch.
2002-11-09 04:23:31 +00:00
Tim Peters
e32280987c
This couldn't compile on WIndows, due to hardcoded "long long". Repaired.
2002-11-09 04:21:44 +00:00
Gustavo Niemeyer
49ea7be7e9
* Modules/bz2module.c
...
(BZ2File_dealloc): Call Util_DropReadAhead().
(*): Included aesthetic changes by Neal Norwitz.
2002-11-08 14:31:49 +00:00
Michael W. Hudson
019a78e76d
Assorted patches from Armin Rigo:
...
[ 617309 ] getframe hook (Psyco #1 )
[ 617311 ] Tiny profiling info (Psyco #2 )
[ 617312 ] debugger-controlled jumps (Psyco #3 )
These are forward ports from 2.2.2.
2002-11-08 12:53:11 +00:00
Thomas Heller
1f043e28f4
Enforce valid filemode. Fixes SF Bug #623464 .
2002-11-07 16:00:59 +00:00
Gustavo Niemeyer
c523b04b0f
Fixed sre bug "[ #581080 ] Provoking infinite scanner loops".
...
This bug happened because: 1) the scanner_search and scanner_match methods
were not checking the buffer limits before increasing the current pointer;
and 2) SRE_SEARCH was using "if (ptr == end)" as a loop break, instead of
"if (ptr >= end)".
* Modules/_sre.c
(SRE_SEARCH): Check for "ptr >= end" to break loops, so that we don't
hang forever if a pointer passing the buffer limit is used.
(scanner_search,scanner_match): Don't increment the current pointer
if we're going to pass the buffer limit.
* Misc/NEWS
Mention the fix.
2002-11-07 03:28:56 +00:00
Andrew M. Kuchling
7e23f00948
[Patch #633635 from David M. Cooke]
...
Make keyname raise ValueError if passed -1, avoiding a segfault
Make getkey() match the docs and raise an exception in nodelay mode
The return type of getch() is int, not chtype
2002-11-06 14:15:36 +00:00
Gustavo Niemeyer
4e7be06a65
Fixed bug #470582 , using a modified version of patch #527371 ,
...
from Greg Chapman.
* Modules/_sre.c
(lastmark_restore): New function, implementing algorithm to restore
a state to a given lastmark. In addition to the similar algorithm used
in a few places of SRE_MATCH, restore lastindex when restoring lastmark.
(SRE_MATCH): Replace lastmark inline restoring by lastmark_restore(),
function. Also include it where missing. In SRE_OP_MARK, set lastindex
only if i > lastmark.
* Lib/test/re_tests.py
* Lib/test/test_sre.py
Included regression tests for the fixed bugs.
* Misc/NEWS
Mention fixes.
2002-11-06 14:06:53 +00:00
Gustavo Niemeyer
7d7930bb3f
* bzmodule.c
...
More fixes of XDECREF'd values not initialized.
2002-11-05 18:41:53 +00:00
Neal Norwitz
18142c0ca7
Fix SF #633935 , test_bz2 fails
...
Needed to init ret since it was Py_XDECREF()d on error.
All regressions pass in debug build for me.
2002-11-05 18:17:32 +00:00
Gustavo Niemeyer
f8ca8364c9
Patch implementing bz2 module.
...
* setup.py
(PyBuildExt.detect_modules): Included bz2 module detection.
* Modules/bz2module.c
* Lib/test/test_bz2.py
* Doc/lib/libbz2.tex
Included files implementing, testing, and documenting bz2 module.
* Doc/Makefile.deps
* Doc/lib/lib.tex
Include references to libbz2.tex.
* Misc/NEWS
(Library): Mention distutils' c++ linkage patch, and new bz2 module.
2002-11-05 16:50:05 +00:00
Neal Norwitz
662390681e
SF #633013 , Fix NIS causing interpreter core dump
...
Prevent the lengths passed to PyString_FromStringAndSize()
from being negative in some cases.
2002-11-04 23:21:09 +00:00
Neal Norwitz
39d22e5693
Use O_NONBLOCK rather than O_NDELAY, so we get POSIX non-blocking I/O.
...
On HPUX, Solaris, Tru64 (Dec UNIX), and IRIX (I think),
O_NONBLOCK is the POSIX version of non-blocking I/O
which is what we want.
On Linux and FreeBSD (at least), O_NONBLOCK and O_NDELAY are the same.
So this change should have no negative effect on those platforms.
Tested on Linux, Solaris, HPUX.
Thanks to Anders Qvist for diagnosing this problem.
2002-11-02 19:55:21 +00:00
Neal Norwitz
94a83fdc15
Fix SF #632624 , test_resource failure on alpha/64bit
...
Return PyLongs instead ot PyInts.
On alphas, 9223372036854775807 became -1.
2002-11-02 17:46:24 +00:00
Martin v. Löwis
d631ebe20b
Remove extra argument in mknod. Fixes #632628 .
2002-11-02 17:42:33 +00:00
Walter Dörwald
0ae2981dec
Add docstrings to register, lookup, register_error
...
and lookup_error. This closes SF patch #630622 .
2002-10-31 13:36:29 +00:00
Andrew M. Kuchling
3adefccdcb
Use personal e-mail address
2002-10-30 21:08:34 +00:00
Martin v. Löwis
566f6afe9a
Patch #512981 : Update readline input stream on sys.stdin/out change.
2002-10-26 14:39:10 +00:00
Martin v. Löwis
c9d07dfc87
Remove duplicate definitions of _XOPEN_SOURCE_EXTENDED.
2002-10-26 13:36:13 +00:00
Martin v. Löwis
9def6a3a77
Update to Unicode 3.2 database.
2002-10-18 16:11:54 +00:00
Fred Drake
5134a54df9
Fix minor whitespace nit, for consistency with Python's C style rules.
2002-10-17 20:37:50 +00:00
Martin v. Löwis
60a5d72908
Patch #623780 : Replace obsolete struct macros.
2002-10-16 20:28:25 +00:00
Martin v. Löwis
f607bdaa77
Add PyStructSequence_UnnamedField. Add stat_float_times.
...
Use integers in stat tuple, optionally floats in named fields.
2002-10-16 18:27:39 +00:00
Guido van Rossum
1e700d24e9
posix_execve(): add missing argument for "et" format in PyArg_Parse()
...
call. This caused mysterious crashes (hard to debug because it was
happening in a child process).
2002-10-16 16:52:11 +00:00
Neal Norwitz
c18b308229
Fix a few docstrings, remove extra commas
2002-10-11 22:19:42 +00:00
Neal Norwitz
98a355d0b3
SF #621948 , update docstring for md5 by David M. Cooke. Will backport.
2002-10-11 21:53:01 +00:00
Martin v. Löwis
dbe3f76270
Patch #569139 : Implementation of major, minor and makedev.
2002-10-10 14:27:30 +00:00
Guido van Rossum
60c8a3aba8
GNU readline() mistakenly sets the LC_CTYPE locale.
...
This is evil. Only the user or the app's main() should do this!
We must save and restore the locale around the rl_initialize() call.
2002-10-09 21:27:33 +00:00
Martin v. Löwis
114619e1ed
Apply file system default encoding to exec and spawn path and arguments.
2002-10-07 06:44:21 +00:00
Tim Peters
92e4dd8657
s/_alloca/alloca/g; Windows doesn't need the former, at least not unless
...
__STDC__ is defined (or something like that ...).
2002-10-05 01:47:34 +00:00
Mark Hammond
d389036069
Trivial fix to the pep277 checkin: ensure that exceptions always have a filename attribute (previously did only when string filenames were passed, but not when unicode)
2002-10-03 07:24:48 +00:00
Mark Hammond
c2e85bd4e2
Patch 594001: PEP 277 - Unicode file name support for Windows NT.
2002-10-03 05:10:39 +00:00
Martin v. Löwis
3c6d6f2ff7
Support UCS-4 builds.
2002-10-01 18:50:56 +00:00
Martin v. Löwis
71e25a0e06
Eliminate constness warnings with Tcl 8.4.
2002-10-01 18:08:06 +00:00
Martin v. Löwis
6bfa2e6892
Drop support for Tk 8.0 and 8.1.
2002-10-01 17:48:31 +00:00
Martin v. Löwis
21ee4091e1
Patch #615069 : Fix build problems on SCO Open Server 5. Backported to 2.2.
2002-09-30 16:19:48 +00:00
Guido van Rossum
9b1a80baf4
Patch for the DEC Alpha under Linux, by Lee Busby.
2002-09-26 16:52:02 +00:00
Thomas Heller
7bdabe67a3
I did fix too much - including winsock.h is sufficient.
2002-09-24 17:03:26 +00:00
Thomas Heller
106f4c7ba7
On Windows, call WSAGetLastError() to retrieve the error number.
...
Bugfix candidate, will backport to release22-maint myself.
2002-09-24 16:51:00 +00:00