summaryrefslogtreecommitdiffstats
path: root/Objects/listobject.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-32137: The repr of deeply nested dict now raises a RecursionError ↵Miss Islington (bot)2018-02-011-3/+0
| | | | | | | | (GH-4570) (GH-4689) instead of crashing due to a stack overflow. This perhaps will fix similar problems in other extension types. (cherry picked from commit 1fb72d2ad243c965d4432b4e93884064001a2607)
* Expand the PySlice_GetIndicesEx macro. (#1023) (#1044)Serhiy Storchaka2017-04-081-4/+6
| | | (cherry picked from commit b879fe82e7e5c3f7673c9a7fa4aad42bd05445d8)
* bpo-29935: Fixed error messages in the index() method of tuple, list and ↵Serhiy Storchaka2017-03-301-2/+2
| | | | | | deque (#887) (#907) when pass indices of wrong type. (cherry picked from commit d4edfc9abffca965e76ebc5957a92031a4d6c4d4)
* replace PY_SIZE_MAX with SIZE_MAXBenjamin Peterson2016-09-071-2/+2
|
* merge 3.5Benjamin Peterson2016-09-071-6/+9
|\
| * make sure to not call memcpy with a NULL second argumentBenjamin Peterson2016-09-071-6/+9
| |
* | Issue #27662: don't use PY_SIZE_MAX for overflow checking in List_New. Patch ↵Mark Dickinson2016-08-211-11/+1
| | | | | | | | by Xiang Zhang.
* | Issue #1621: Avoid signed overflow in list and tuple operationsMartin Panter2016-07-251-8/+10
| | | | | | | | Patch by Xiang Zhang.
* | Issue #23034: The output of a special Python build with defined COUNT_ALLOCS,Serhiy Storchaka2016-07-031-0/+10
| | | | | | | | | | | | SHOW_ALLOC_COUNT or SHOW_TRACK_COUNT macros is now off by default. It can be re-enabled using the "-X showalloccount" option. It now outputs to stderr instead of stdout.
* | Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREFSerhiy Storchaka2016-04-101-1/+1
|\ \ | |/ | | | | in places where Py_DECREF was used.
* | Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-061-2/+2
|\ \ | |/
* | Issue #26494: Fixed crash on iterating exhausting iterators.Serhiy Storchaka2016-03-301-7/+13
|\ \ | |/ | | | | | | | | Affected classes are generic sequence iterators, iterators of str, bytes, bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding views and os.scandir() iterator.
| * Issue #26494: Fixed crash on iterating exhausting iterators.Serhiy Storchaka2016-03-301-7/+13
| | | | | | | | | | | | Affected classes are generic sequence iterators, iterators of str, bytes, bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding views and os.scandir() iterator.
* | Tests versus zero are more compact than tests versus -1.Raymond Hettinger2016-01-251-6/+6
| |
* | Issue #20440: Cleaning up the code by using Py_SETREF and Py_CLEAR.Serhiy Storchaka2015-12-271-8/+2
|/ | | | | Old code is correct, but with Py_SETREF and Py_CLEAR it can be cleaner. This patch doesn't fix bugs and hence there is no need to backport it.
* Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size.Serhiy Storchaka2015-12-191-1/+1
| | | | | This allows sys.getsize() to work correctly with their subclasses with __slots__ defined.
* merge 3.4 (#24044)Benjamin Peterson2015-04-231-2/+4
|\
| * merge 3.3 (#24044)Benjamin Peterson2015-04-231-2/+4
| |\
| | * merge 3.2 (#24044)Benjamin Peterson2015-04-231-2/+4
| | |\
| | | * properly handle malloc failure (closes #24044)Benjamin Peterson2015-04-231-2/+4
| | | | | | | | | | | | | | | | Patch by Christian Heimes.
* | | | merge 3.4 (#23515)Benjamin Peterson2015-02-251-1/+2
|\ \ \ \ | |/ / /
| * | | fix merge_collapse to actually maintain the invariant it purports to (closes ↵Benjamin Peterson2015-02-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #23515) See de Gouw, Stijn and Rot, Jurriaan and de Boer, Frank S and Bubel, Richard and Hähnle, Reiner "OpenJDK’s java.utils.Collection.sort() is broken: The good, the bad and the worst case"
* | | | Issue #22077: Improve index error messages for bytearrays, bytes, lists, andTerry Jan Reedy2014-08-021-2/+2
|/ / / | | | | | | | | | | | | tuples by adding 'or slices'. Added ', not <typename' for bytearrays. Original patch by Claudiu Popa.
* | | merge 3.3Benjamin Peterson2014-03-151-1/+1
|\ \ \ | |/ /
| * | avoid referencing past the bounds of an arrayBenjamin Peterson2014-03-151-1/+1
| | |
* | | merge 3.3Benjamin Peterson2014-03-151-1/+1
|\ \ \ | |/ /
| * | avoid referencing out-of-bounds memoryBenjamin Peterson2014-03-151-1/+1
| | |
* | | Make the various iterators' "setstate" sliently and consistently clip theKristján Valur Jónsson2014-03-051-0/+2
|\ \ \ | |/ / | | | | | | | | | index. This avoids the possibility of setting an iterator to an invalid state.
| * | Make the various iterators' "setstate" sliently and consistently clip theKristján Valur Jónsson2014-03-051-0/+2
| | | | | | | | | | | | | | | index. This avoids the possibility of setting an iterator to an invalid state.
* | | Close #19578: Fix list_ass_subscript(), handle list_resize() failureVictor Stinner2013-11-211-2/+3
| | | | | | | | | | | | Notify the caller of the failure (MemoryError exception).
* | | Add _PyUnicodeWriter_WriteASCIIString() functionVictor Stinner2013-11-191-8/+1
| | |
* | | Issue #19513: Disable overallocation of the PyUnicodeWriter before the last ↵Victor Stinner2013-11-191-0/+1
| | | | | | | | | | | | write
* | | Issue #19513: Simplify list_repr()Victor Stinner2013-11-181-8/+2
| | |
* | | Issue #19513: repr(list) now uses the PyUnicodeWriter API, it is faster thanVictor Stinner2013-11-181-16/+28
| | | | | | | | | | | | the PyAccu API
* | | Issue #18722: Remove uses of the "register" keyword in C code.Antoine Pitrou2013-08-131-7/+7
| | |
* | | Issue #18408: Fix list_ass_slice(), handle list_resize() failureVictor Stinner2013-07-191-3/+8
| | | | | | | | | | | | | | | I tested the patch manually by injecting a fault using gdb: list items are correctly restored on failure.
* | | Issue #18408: Fix listpop(), handle list_ass_slice() failureVictor Stinner2013-07-171-6/+4
| | |
* | | Issue #18408: Fix list.extend(), handle list_resize() failureVictor Stinner2013-07-161-2/+4
| | |
* | | Issue #18408: Fix list.pop() to handle list_resize() failure (MemoryError).Victor Stinner2013-07-081-2/+4
| | |
* | | Issue #9566: More long/Py_ssize_t fixes in tuple and list iterators (it_index)Victor Stinner2013-06-241-3/+3
| | |
* | | Issue #16148: implemented PEP 424Armin Ronacher2012-10-061-1/+1
|/ /
* | Issue #14785: Add sys._debugmallocstats() to help debug low-level memory ↵David Malcolm2012-06-221-0/+9
| | | | | | | | allocation issues
* | Rename _PyIter_GetBuiltin to _PyObject_GetBuiltin, and do not include it in ↵Antoine Pitrou2012-04-041-3/+3
| | | | | | | | the stable ABI.
* | Issue #14288: Serialization support for builtin iterators.Kristján Valur Jónsson2012-04-031-0/+80
| |
* | Issue #14387: Do not include accu.h from Python.h.Antoine Pitrou2012-03-221-0/+1
|\ \ | |/
| * Issue #14387: Do not include accu.h from Python.h.Antoine Pitrou2012-03-221-0/+1
| |
* | Issue #13389: Full garbage collection passes now clear the freelists forAntoine Pitrou2011-11-141-3/+10
| | | | | | | | | | list and dict objects. They already cleared other freelists in the interpreter.
* | Revert "Accept None as start and stop parameters for list.index() and ↵Petri Lehtinen2011-11-061-11/+3
|\ \ | |/ | | | | | | | | tuple.index()" Issue #13340.
| * Revert "Accept None as start and stop parameters for list.index() and ↵Petri Lehtinen2011-11-061-11/+3
| | | | | | | | | | | | tuple.index()" Issue #13340.
* | Issue #13350: Replace most usages of PyUnicode_Format by PyUnicode_FromFormat.Amaury Forgeot d'Arc2011-11-061-16/+2
| |