Commit Graph

1979 Commits

Author SHA1 Message Date
Tim Peters
ca6919c180 SF bug 839548: Bug in type's GC handling causes segfaults.
Also SF patch 843455.

This is a critical bugfix, backported from 2.4 development.
I don't intend to backport beyond 2.3 maint.  The bugs this fixes
have been there since weakrefs were introduced.
2003-11-20 22:13:51 +00:00
Tim Peters
8e81b7efad subtype_dealloc(): A more complete fix for critical bug 840829 +
expanded the test case with a piece that needs the more-complete fix.

I don't intend to backport this beyond 2.3 maint.  It's a critical
bugfix, and should be backported to 2.2, 2.1, ..., if more releases in
those lines get made.
2003-11-13 22:48:42 +00:00
Tim Peters
695461f200 Backport of fix for SF bug 840829, memory corruption in some cases of
weakref callbacks.

This is a critical bugfix.  It's already been fixed on the trunk (2.4
development).  I don't intend to backport it to the 22 line, but if a
2.2.4 ever gets released, this should be in it.
2003-11-13 01:17:55 +00:00
Walter Dörwald
218f9abe45 Backport checkin:
Fix a bug in the memory reallocation code of PyUnicode_TranslateCharmap().
charmaptranslate_makespace() allocates more memory than required for the
next replacement but didn't remember that fact, so memory size was growing
exponentially every time a replacement string is longer that one character.
This fixes SF bug #828737.
2003-10-24 15:05:29 +00:00
Fred Drake
c7cd9cff3c Avoid confusing name for the 3rd argument to str.replace().
This closes SF bug #827260.
2003-10-22 02:57:23 +00:00
Jeremy Hylton
2e39d5755d Backport removal of bogus Py_DECREF() and indentation fix. 2003-10-21 18:15:44 +00:00
Walter Dörwald
4958f2741a Backport checkin:
Fix a bunch of typos in documentation, docstrings and comments.
(From SF patch #810751)
2003-10-20 14:34:48 +00:00
Martin v. Löwis
ee52452721 Patch #825679: Clarify semantics of .isfoo on empty strings. 2003-10-18 09:54:38 +00:00
Martin v. Löwis
661598f4bc Patch #809535: Mention behaviour of seek on text files. 2003-10-18 09:37:12 +00:00
Raymond Hettinger
5307bc50ea Backport fix to SF bug #820397: __nonzero__() returns 1/0 2003-10-12 23:41:21 +00:00
Raymond Hettinger
6b560bc648 SF patch #820195: make object.__contains__() returns True or False instead
of 1 or 0.

Backport Guido's fix to the default __contains__() and to proxy_has_key()
so they will properly return booleans instead of integers.
2003-10-09 20:51:07 +00:00
Jeremy Hylton
77ecfdd171 Backport Tim's portability improvement and comments. 2003-09-17 03:22:27 +00:00
Jeremy Hylton
6687ded893 Backport: Double-fix of crash in Unicode freelist handling. 2003-09-16 20:30:03 +00:00
Raymond Hettinger
bd40b91238 Fix leak in classobject.c. The leak surfaced on the error exit when
hashing a class that does not define __hash__ but does define a
comparison.
2003-09-16 07:13:56 +00:00
Raymond Hettinger
5ae2511c06 Backport Neal's fix for bug #789402 -- a memory leak in fileobject.c 2003-09-16 05:29:50 +00:00
Martin v. Löwis
8dc455fe59 Only release buffer after file has been closed. Fixes #800824. 2003-09-07 20:43:24 +00:00
Raymond Hettinger
046595e496 SF bug #800796: Difference between hash() and __hash__()
slice(5).__hash__() now raises a TypeError.
2003-09-05 14:38:30 +00:00
Martin v. Löwis
41add1706d Patch #788249: Pass an explicit buffer to setvbuf in PyFile_SetBufSize().
Fixes #603724.
2003-09-04 19:02:20 +00:00
Raymond Hettinger
a15a3a2cbb SF patch #798467: Update docstring of has_key for bool changes
(Contributed by George Yoshida.)
2003-09-01 22:17:18 +00:00
Raymond Hettinger
90ee21989b Remove 'e.g.' from error message 2003-08-30 23:58:20 +00:00
Raymond Hettinger
eb85c6617b SF bug #795506: Wrong handling of string format code for float values.
Added missing support for '%F' as had been documented.
2003-08-27 05:08:19 +00:00
Walter Dörwald
4c1392a368 Backport checkin:
Fix refcounting leak in charmaptranslate_lookup()
2003-08-15 16:52:33 +00:00
Walter Dörwald
906bb770c8 Backport checkin:
Fix another refcounting leak in PyUnicode_EncodeCharmap().
2003-08-15 16:27:32 +00:00
Walter Dörwald
90de7fe3dc Backport checkin:
Fix another refcounting leak (in PyUnicode_DecodeUnicodeEscape()).
2003-08-15 15:01:26 +00:00
Michael W. Hudson
62748a10f7 Backport my fix to my fix:
My last fix left n used unitialized in tha a==b case.
Fix, by not using n at all in that case.
2003-08-15 12:26:05 +00:00