Serhiy Storchaka
b879fe82e7
Expand the PySlice_GetIndicesEx macro. ( #1023 )
9 years ago
Serhiy Storchaka
80ec8364f1
bpo-29748: Added the slice index converter in Argument Clinic. ( #549 )
9 years ago
Serhiy Storchaka
202fda55c2
bpo-24037: Add Argument Clinic converter `bool(accept={int})`. ( #485 )
9 years ago
Serhiy Storchaka
fdd42c481e
bpo-20185: Convert list object implementation to Argument Clinic. ( #542 )
9 years ago
Serhiy Storchaka
2e5642422f
bpo-29695: Remove bad keyword parameters in int(), bool(), float(), list() and tuple(). ( #518 )
9 years ago
Serhiy Storchaka
58d23e6806
bpo-29695: Deprecated using bad named keyword arguments in builtings: ( #486 )
int(), bool(), float(), list() and tuple(). Specify the value as a
positional argument instead.
9 years ago
Xiang Zhang
4cee049f5b
bpo-27660: remove unnecessary overflow checks in list_resize (GH-189)
9 years ago
Serhiy Storchaka
228b12edcc
Issue #28999 : Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE wherever
possible. Patch is writen with Coccinelle.
9 years ago
Serhiy Storchaka
7cf8bebb07
Issue #29331 : Simplified argument parsing in sorted() and list.sort().
9 years ago
Martin Panter
94b39ceb73
Issue #1621 : Overflow should not be possible in listextend()
9 years ago
Victor Stinner
de4ae3d486
Backed out changeset b9c9691c72c5
Issue #28858 : The change b9c9691c72c5 introduced a regression. It seems like
_PyObject_CallArg1() uses more stack memory than
PyObject_CallFunctionObjArgs().
9 years ago
Victor Stinner
27580c1fb5
Replace PyObject_CallFunctionObjArgs() with fastcall
* PyObject_CallFunctionObjArgs(func, NULL) => _PyObject_CallNoArg(func)
* PyObject_CallFunctionObjArgs(func, arg, NULL) => _PyObject_CallArg1(func, arg)
PyObject_CallFunctionObjArgs() allocates 40 bytes on the C stack and requires
extra work to "parse" C arguments to build a C array of PyObject*.
_PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate
memory on the C stack.
This change is part of the fastcall project. The change on listsort() is
related to the issue #23507 .
9 years ago
Benjamin Peterson
5a7d923e75
make sure to not call memcpy with a NULL second argument
9 years ago
Benjamin Peterson
2f8bfef158
replace PY_SIZE_MAX with SIZE_MAX
9 years ago
Mark Dickinson
5d13238f6e
Issue #27662 : don't use PY_SIZE_MAX for overflow checking in List_New. Patch by Xiang Zhang.
10 years ago
Martin Panter
b93d8637a6
Issue #1621 : Avoid signed overflow in list and tuple operations
Patch by Xiang Zhang.
10 years ago
Serhiy Storchaka
7e160ce356
Issue #23034 : The output of a special Python build with defined COUNT_ALLOCS,
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.
10 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