Commit Graph

13733 Commits

Author SHA1 Message Date
Peter Schneider-Kamp 7a11671e8b fixed inconsistent use of tab and spaces 2000-07-11 11:24:41 +00:00
Andrew M. Kuchling d3cf692c38 Add test of resize() method of mmap objects 2000-07-11 10:45:28 +00:00
Andrew M. Kuchling e0d0090e76 Docstring changes. 2000-07-11 10:38:24 +00:00
Marc-André Lemburg 566d8a64eb Jeremy Hylton:
better error message for unicode coercion failure
2000-07-11 09:47:04 +00:00
Barry Warsaw 771d0675b6 string_join(): Some cleaning up of reference counting. In the
seqlen==1 clause, before returning item, we need to DECREF seq.  In
the res=PyString... failure clause, we need to goto finally to also
decref seq (and the DECREF of res in finally is changed to a
XDECREF).  Also, we need to DECREF seq just before the
PyUnicode_Join() return.
2000-07-11 04:58:12 +00:00
Jeremy Hylton 20f41b6456 add more tests of string.join variants to run_method_tests 2000-07-11 03:31:55 +00:00
Jeremy Hylton 4904829dbf fix two refcount bugs in new string_join implementation:
1. PySequence_Fast_GET_ITEM is a macro and borrows a reference
2. The seq returned from PySequence_Fast must be decref'd
2000-07-11 03:28:17 +00:00
Tim Peters dc0c031ad8 Now that prototypes are in scope, the compiler gives legit wngs
about int size mismatches at two calls to s_rand.  Stuffed in
casts to make the code do what it did before but w/o warnings --
although unclear that's correct!
2000-07-10 22:41:30 +00:00
Jeremy Hylton 194e43e953 two changes to string_join:
implementation -- use PySequence_Fast interface to iterate over elements
interface -- if instance object reports wrong length, ignore it;
   previous version raised an IndexError if reported length was too high
2000-07-10 21:30:28 +00:00
Fredrik Lundh 663809ed83 -- removed get_default compatibility kludge
-- added a few extra comments to locale.py
2000-07-10 19:32:19 +00:00
Fredrik Lundh dde6164402 - changed hash calculation for unicode strings. the new
value is calculated from the character values, in a way
  that makes sure an 8-bit ASCII string and a unicode string
  with the same contents get the same hash value.

  (as a side effect, this also works for ISO Latin 1 strings).

  for more details, see the python-dev discussion.
2000-07-10 18:27:47 +00:00
Eric S. Raymond 417c489def Give ConfigParser the capability to set as well as read options, and to write
a representation of the configuration state in .ini format that can be read
back in by a future read() call.  Thus this class is now a back end
for .ini editors as well as parsers.

This patch is complete and tested, but exposes a bug in the ConfigParser
implementation which I have not yet fixed.  Because case information is
discarded during parsing, the output of write() has its case smashed.

I wrote this for a SourceForge interface script called forgetool.
Documentation for the new entry points included.
2000-07-10 18:11:00 +00:00
Peter Schneider-Kamp 3e3175b5e7 ANSI-fication (fixed on parameter list I messed up in the patch) 2000-07-10 17:25:37 +00:00
Peter Schneider-Kamp 8bc8f0d036 ANSI-fication 2000-07-10 17:15:07 +00:00
Peter Schneider-Kamp 3646366f4c ANSI-fication, added #ifdef construction in mpz_coerce 2000-07-10 17:14:00 +00:00
Jeremy Hylton f82b04ecbb factor out test definitions to string_tests module
test_string and test_userstring run same tests for string methods
2000-07-10 17:08:42 +00:00
Jeremy Hylton fd54757336 add isalpha and isalnum methods 2000-07-10 17:07:17 +00:00
Peter Schneider-Kamp cb27c35aa6 ANSI-fication, not really tested, but should (hopefully) compile 2000-07-10 17:06:38 +00:00
Peter Schneider-Kamp 6a85027a97 ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
have already been checked in)

UNTESTED!
2000-07-10 17:04:33 +00:00
Fredrik Lundh 10723347c6 - stupid typo. 2000-07-10 16:38:09 +00:00
Guido van Rossum c716684df8 Add linker flag -export-dynamic so symbols in libpython*.a are exported. 2000-07-10 16:22:12 +00:00
Fredrik Lundh 44328e60df -- get rid of a compiler warning on unix. (as reported
for #100836, but implemented in a different way)
2000-07-10 15:59:30 +00:00
Guido van Rossum 1bbddd085c Added the line 'Testing UTF-16 code point order comparisons... done."
to match addition to test_unicode.py.
2000-07-10 15:06:06 +00:00
Guido van Rossum 964f123346 Adapted for Python 2.0 under RH Linux. 2000-07-10 14:35:12 +00:00
Jeremy Hylton fb8849c4a5 remove prints of file objects from _test 2000-07-10 14:28:25 +00:00
Jeremy Hylton a5ae490584 expect message "no regression test case for method 'encode' 2000-07-10 14:14:40 +00:00
Andrew M. Kuchling a48dbde93b Patch from Joe Eaton <jeaton@hostway.net> (SF#100741) to fix following problem:
There is a silly bug in the fall-back dumbdbm.py database package in
  the Python 1.5.2 standard distro. This bug causes any changes to an
  existing item to generate a new key, even when the key already
  exists.  After many updates, the .dir file used by dumbdbm grows to
  a huge size, and can cause filesystem problems.
2000-07-10 13:56:35 +00:00
Peter Schneider-Kamp 39e0e5a180 ANSI-fication 2000-07-10 13:12:27 +00:00
Peter Schneider-Kamp 7d0c71ac8c ANSI-fication 2000-07-10 13:05:29 +00:00
Peter Schneider-Kamp 286da3b46a ANSI-fying
added excplicit node * parameter to termvalid argument in
validate_two_chain_ops of parsermodule.c (as proposed by fred)
2000-07-10 12:43:58 +00:00
Peter Schneider-Kamp 41c36ffe83 ANSI-fication 2000-07-10 12:29:26 +00:00
Peter Schneider-Kamp 416d413527 ANSI-fication 2000-07-10 12:15:54 +00:00
Peter Schneider-Kamp e89b15691e ANSI-fication 2000-07-10 12:04:18 +00:00
Peter Schneider-Kamp c4bc0e0895 ANSI-fication 2000-07-10 11:56:03 +00:00
Peter Schneider-Kamp 0659b4af46 ANSI-fication 2000-07-10 10:49:30 +00:00
Peter Schneider-Kamp 3707efef9b ANSI-fication 2000-07-10 10:03:58 +00:00
Peter Schneider-Kamp a788a7f0fb ANSI-fication 2000-07-10 09:57:19 +00:00
Peter Schneider-Kamp fe74263cec ANSI-fication 2000-07-10 09:55:32 +00:00
Peter Schneider-Kamp 8235f1c834 ANSI-fication 2000-07-10 09:43:24 +00:00
Peter Schneider-Kamp f1ca898d85 ANSI-fication 2000-07-10 09:31:34 +00:00
Peter Schneider-Kamp faaad372ec ANSI-fication (and test if committing files works now) 2000-07-10 09:26:41 +00:00
Sjoerd Mullender f985064781 Better error handling of bad entity references. Before when an & in
an attribute value was not escaped, you could get two syntax errors:
one about a missing semicolon and one about an unknown entity.  Now
you get only one about a bogus ampersand.
2000-07-10 08:09:48 +00:00
Vladimir Marangozov b16714b4d0 Initialize the return value in collect_generations() since it is updated
conditionally in the code.
2000-07-10 05:37:39 +00:00
Vladimir Marangozov 14a4d88a2e Remove the "1" that Tim sticked to the preprocessor symbol for unknown reasons
(cf. the rest of the headers in the distribution)
2000-07-10 04:59:49 +00:00
Vladimir Marangozov d8a933248e A small comment fix just to make sure I got my cvs/ssh setup right. 2000-07-10 04:30:56 +00:00
Fred Drake 859bad00cb Guido said include these in the Great ANSI-fication, so here they are! 2000-07-10 04:20:57 +00:00
Fredrik Lundh 9ac81f69b2 - changed the nt.popen2 return values back to
(write, read, ...), based on feedback from GvR.

- added tuple-swapping code to popen2.py

- fixed some runaway indentation in posixmodule.c
2000-07-09 23:35:24 +00:00
Fredrik Lundh 0466132ee4 - repaired locale.py for non-windows platforms. the try/except
checked for the wrong exception.  my fault.  sorry.
  (first reported by Alex Coventry)
2000-07-09 23:16:10 +00:00
Barry Warsaw b78165566e Exception__str__(): In case 1, be sure to decref the tmp local
variable.  This crushes another memory leak.  Slight rewrite
included.
2000-07-09 22:27:10 +00:00
Barry Warsaw a1ae88432d Use TQSQ (triple quoted single quote) module docstring for better
font-locking.  This complets the merge with Mailman's version.
2000-07-09 21:24:31 +00:00