Benjamin Peterson
5a7d923e75
make sure to not call memcpy with a NULL second argument
9 years ago
Serhiy Storchaka
fbb1c5ee06
Issue #26494 : Fixed crash on iterating exhausting iterators.
Affected classes are generic sequence iterators, iterators of str, bytes,
bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding
views and os.scandir() iterator.
10 years ago
Raymond Hettinger
0dceb91866
Tests versus zero are more compact than tests versus -1.
10 years ago
Serhiy Storchaka
1ed017ae92
Issue #20440 : Cleaning up the code by using Py_SETREF and Py_CLEAR.
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.
10 years ago
Serhiy Storchaka
5c4064e8bd
Issue #25421 : __sizeof__ methods of builtin types now use dynamic basic size.
This allows sys.getsize() to work correctly with their subclasses with
__slots__ defined.
10 years ago
Benjamin Peterson
0823ffb2fb
properly handle malloc failure ( closes #24044 )
Patch by Christian Heimes.
11 years ago
Benjamin Peterson
b808d590a2
fix merge_collapse to actually maintain the invariant it purports to ( closes #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"
11 years ago
Terry Jan Reedy
ffff1440d1
Issue #22077 : Improve index error messages for bytearrays, bytes, lists, and
tuples by adding 'or slices'. Added ', not <typename' for bytearrays.
Original patch by Claudiu Popa.
12 years ago
Benjamin Peterson
4a42cd48d5
avoid referencing past the bounds of an array
12 years ago
Benjamin Peterson
ef87f8cb57
avoid referencing out-of-bounds memory
12 years ago
Kristján Valur Jónsson
25dded041f
Make the various iterators' "setstate" sliently and consistently clip the
index. This avoids the possibility of setting an iterator to an invalid
state.
12 years ago
Victor Stinner
35f2803a24
Close #19578 : Fix list_ass_subscript(), handle list_resize() failure
Notify the caller of the failure (MemoryError exception).
12 years ago
Victor Stinner
4a58707a34
Add _PyUnicodeWriter_WriteASCIIString() function
12 years ago
Victor Stinner
4d3f109ad3
Issue #19513 : Disable overallocation of the PyUnicodeWriter before the last write
12 years ago
Victor Stinner
b8fb197aa0
Issue #19513 : Simplify list_repr()
12 years ago
Victor Stinner
5c733473f2
Issue #19513 : repr(list) now uses the PyUnicodeWriter API, it is faster than
the PyAccu API
12 years ago
Antoine Pitrou
9ed5f27266
Issue #18722 : Remove uses of the "register" keyword in C code.
13 years ago
Victor Stinner
2c40f640d9
Issue #18408 : Fix list_ass_slice(), handle list_resize() failure
I tested the patch manually by injecting a fault using gdb: list items are
correctly restored on failure.
13 years ago
Victor Stinner
095d99ffff
Issue #18408 : Fix listpop(), handle list_ass_slice() failure
13 years ago
Victor Stinner
32fd6eab1e
Issue #18408 : Fix list.extend(), handle list_resize() failure
13 years ago
Victor Stinner
b27cd3e5ad
Issue #18408 : Fix list.pop() to handle list_resize() failure (MemoryError).
13 years ago
Victor Stinner
7660b880a5
Issue #9566 : More long/Py_ssize_t fixes in tuple and list iterators (it_index)
13 years ago
Armin Ronacher
aa9a79d279
Issue #16148 : implemented PEP 424
13 years ago
David Malcolm
49526f48fc
Issue #14785 : Add sys._debugmallocstats() to help debug low-level memory allocation issues
14 years ago
Antoine Pitrou
a701388de1
Rename _PyIter_GetBuiltin to _PyObject_GetBuiltin, and do not include it in the stable ABI.
14 years ago
Kristján Valur Jónsson
31668b8f7a
Issue #14288 : Serialization support for builtin iterators.
14 years ago
Antoine Pitrou
0197ff97d0
Issue #14387 : Do not include accu.h from Python.h.
14 years ago
Antoine Pitrou
9a812cbc89
Issue #13389 : Full garbage collection passes now clear the freelists for
list and dict objects. They already cleared other freelists in the
interpreter.
14 years ago
Petri Lehtinen
ebfaabd663
Revert "Accept None as start and stop parameters for list.index() and tuple.index()"
Issue #13340 .
14 years ago
Petri Lehtinen
3b9d92aefe
Revert "Accept None as start and stop parameters for list.index() and tuple.index()"
Issue #13340 .
14 years ago
Amaury Forgeot d'Arc
864741b2c7
Issue #13350 : Replace most usages of PyUnicode_Format by PyUnicode_FromFormat.
14 years ago
Petri Lehtinen
c2f0a46111
Accept None as start and stop parameters for list.index() and tuple.index()
Closes #13340 .
14 years ago
Petri Lehtinen
819d8d447d
Accept None as start and stop parameters for list.index() and tuple.index()
Closes #13340 .
14 years ago
Georg Brandl
388349add2
Closes #12192 : Document that mutating list methods do not return the instance (original patch by Mike Hoy).
14 years ago
Antoine Pitrou
eeb7eea1f9
Issue #12911 : Fix memory consumption when calculating the repr() of huge tuples or lists.
This introduces a small private API for this common pattern.
The issue has been discovered thanks to Martin's huge-mem buildbot.
14 years ago
Mark Dickinson
c7d93b7614
Issue #1621 : Fix undefined behaviour from signed overflow in datetime module hashes, array and list iterations, and get_integer (stringlib/string_format.h)
14 years ago
Mark Dickinson
4ac5d2cda4
Backport issue #12973 list_repeat fix from 3.x.
14 years ago
Mark Dickinson
c0420fd42a
Issue #12973 : Fix undefined-behaviour-inducing overflow check in list_repeat.
14 years ago
Brian Curtin
dfc80e3d97
Replace Py_NotImplemented returns with the macro form Py_RETURN_NOTIMPLEMENTED.
The macro was introduced in #12724 .
15 years ago
Daniel Stutzbach
eda70b81d3
#11335 : Fix memory leak after key function failure in sort
15 years ago
Ezio Melotti
c2077b0d9b
#11565 : Fix several typos. Patch by Piotr Kasprzyk.
15 years ago
Ezio Melotti
13925008dc
#11565 : Fix several typos. Patch by Piotr Kasprzyk.
15 years ago
Daniel Stutzbach
8eda5f7cd9
#11335 : Fix memory leak when a sort key function throws an exception
15 years ago
Eli Bendersky
cbbaa96036
Issue #10516 : adding list.clear() and list.copy() methods
15 years ago
Victor Stinner
0fcab4a3ed
Issue #9566 : use Py_ssize_t instead of int
15 years ago
Martin v. Löwis
4d0d471a80
Merge branches/pep-0384.
15 years ago
Benjamin Peterson
9efdccae25
code style
15 years ago
Daniel Stutzbach
98338227a7
Issue9915: speeding up sorting with a key
15 years ago
Georg Brandl
00da4e0b5a
Remove unneeded casts to hashfunc.
15 years ago
Benjamin Peterson
0538064554
reorder and save a comparison
16 years ago