142 Commits

Author SHA1 Message Date
Serhiy Storchaka
5e79321742 bpo-30074: Fix compile warnings of _PySlice_Unpack and convert missed (#1154)
PySlice_GetIndicesEx in _ctypes.c.
2017-04-15 20:11:12 +03:00
Serhiy Storchaka
e41390aca5 bpo-27867: Expand the PySlice_GetIndicesEx macro. (#1023) (#1046)
(cherry picked from commit b879fe8)
2017-04-08 11:48:57 +03:00
Serhiy Storchaka
079f21f873 bpo-29935: Fixed error messages in the index() method of tuple and list (#887) (#907) (#910)
when pass indices of wrong type.
(cherry picked from commit d4edfc9abf)
(cherry picked from commit bf4bb2e430)
2017-03-30 20:32:18 +03:00
Serhiy Storchaka
14a7d6389f Issue #26494: Fixed crash on iterating exhausting iterators.
Affected classes are generic sequence iterators, iterators of bytearray,
list, tuple, set, frozenset, dict, OrderedDict and corresponding views.
2016-03-30 20:43:06 +03:00
Antoine Pitrou
323ab6d732 Issue #23629: Fix the default __sizeof__ implementation for variable-sized objects. 2015-03-10 22:32:00 +01:00
Serhiy Storchaka
98a9722e4a Issue #20437: Fixed 43 potential bugs when deleting objects references. 2014-02-09 13:14:04 +02:00
Christian Heimes
074ebced1b PyTuple_Pack() was missing va_end() in its error branch which lead to a resource leak. 2012-09-10 02:54:51 +02:00
Petri Lehtinen
3b9d92aefe Revert "Accept None as start and stop parameters for list.index() and tuple.index()"
Issue #13340.
2011-11-06 20:59:01 +02:00
Petri Lehtinen
819d8d447d Accept None as start and stop parameters for list.index() and tuple.index()
Closes #13340.
2011-11-05 23:18:06 +02:00
Antoine Pitrou
c83ea137d7 Untabify C files. Will watch buildbots. 2010-05-09 14:46:46 +00:00
Brett Cannon
fee3acb082 Remove an unneeded variable assignment.
Found using Clang's static analyzer.
2010-05-05 20:18:23 +00:00
Ezio Melotti
fb501123e3 #8030: more docstring fix for builtin types. 2010-02-28 23:59:00 +00:00
Antoine Pitrou
c169c781a8 Issue #7466: segmentation fault when the garbage collector is called
in the middle of populating a tuple.  Patch by Florent Xicluna.

(note: no NEWS entry for trunk since the bug was introduced in 2.7/3.1)
2009-12-12 19:13:08 +00:00
Antoine Pitrou
1fba62427c The tracking statistics were actually too pessimistic 2009-03-23 19:17:00 +00:00
Antoine Pitrou
f8387af262 Issue #4688: Add a heuristic so that tuples and dicts containing only
untrackable objects are not tracked by the garbage collector. This can
reduce the size of collections and therefore the garbage collection overhead
on long-running programs, depending on their particular use of datatypes.

(trivia: this makes the "binary_trees" benchmark from the Computer Language
Shootout 40% faster)
2009-03-23 18:41:45 +00:00
Benjamin Peterson
1706c644ae fix tuple.index() error message #5495 2009-03-15 14:38:55 +00:00
Martin v. Löwis
b90304acb9 Issue #4850: Change COUNT_ALLOCS variables to Py_ssize_t. 2009-01-07 18:40:40 +00:00
Andrew M. Kuchling
b15d6fb9a7 Docstring change: Specify exception raised 2008-10-04 01:03:42 +00:00
Neal Norwitz
e7d8be80ba Security patches from Apple: prevent int overflow when allocating memory 2008-07-31 17:17:14 +00:00
Robert Schuppenies
73e9ffc811 Fixed: sys.getsizeof does not take the actual length of the tuples into account. 2008-06-13 13:29:37 +00:00
Gregory P. Smith
dd96db63f6 This reverts r63675 based on the discussion in this thread:
http://mail.python.org/pipermail/python-dev/2008-June/079988.html

Python 2.6 should stick with PyString_* in its codebase.  The PyBytes_* names
in the spirit of 3.0 are available via a #define only.  See the email thread.
2008-06-09 04:58:54 +00:00
Christian Heimes
593daf545b Renamed PyString to PyBytes 2008-05-26 12:51:38 +00:00
Christian Heimes
3b718a79af Implemented Martin's suggestion to clear the free lists during the garbage collection of the highest generation. 2008-02-14 12:47:33 +00:00
Raymond Hettinger
55285ef44c Return ints instead of longs for tuple.count() and tuple.index(). 2008-02-07 02:12:52 +00:00
Raymond Hettinger
5b07ebce86 Issue 2025: Add tuple.count() and tuple.index() to follow the ABC in collections.Sequence. 2008-02-07 00:54:20 +00:00