Serhiy Storchaka
b879fe82e7
Expand the PySlice_GetIndicesEx macro. ( #1023 )
9 years ago
Serhiy Storchaka
d4edfc9abf
bpo-29935: Fixed error messages in the index() method of tuple, list and deque ( #887 )
when pass indices of wrong type.
9 years ago
Serhiy Storchaka
0b5615926a
bpo-20186: Convert tuple object implementation to Argument Clinic. ( #614 )
9 years ago
Serhiy Storchaka
98e80c2bab
bpo-29737: Optimize concatenating with empty tuple. ( #524 )
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
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
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
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
Antoine Pitrou
a654510150
Issue #23629 : Fix the default __sizeof__ implementation for variable-sized objects.
11 years ago
Victor Stinner
049e509a9f
Issue #22207 : Fix "comparison between signed and unsigned integers" warning in
test checking for integer overflow on Py_ssize_t type: cast explicitly to
size_t.
12 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
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
Serhiy Storchaka
505ff755d7
Issue #20437 : Fixed 21 potential bugs when deleting objects references.
12 years ago
Victor Stinner
88a9cd9b57
Issue #19513 : repr(tuple) now uses _PyUnicodeWriter for better performances
12 years ago
Antoine Pitrou
9ed5f27266
Issue #18722 : Remove uses of the "register" keyword in C code.
13 years ago
Victor Stinner
7660b880a5
Issue #9566 : More long/Py_ssize_t fixes in tuple and list iterators (it_index)
13 years ago
Victor Stinner
2199c38729
Issue #9566 : Fix a compiler warning in tupleiter_setstate() on Windows x64
13 years ago
Victor Stinner
a2d56984c7
Issuse #17932 : Fix an integer overflow issue on Windows 64-bit in tuple
iterators: change the C type of tupleiterobject.it_index from long to
Py_ssize_t.
13 years ago
Christian Heimes
34bdeb5d81
Add a comment about *not* caching the hash value. Issue #9685 suggested to memorize the hash value, but the feature request was rejected because no speed ups were found.
13 years ago
Gregory P. Smith
a6be61ec71
Keep y a Py_hash_t instead of Py_uhash_t as it is compared with == -1 and the
compiler logic will do the right thing with just x as a Py_uhash_t. This
matches what was already done in the 3.3 version.
cleanup only - no functionality or hash values change.
13 years ago
Gregory P. Smith
27cbcd6241
Fix the internals of our hash functions to used unsigned values during hash
computation as the overflow behavior of signed integers is undefined.
In practice we require compiling everything with -fwrapv which forces overflow
to be defined as twos compliment but this keeps the code cleaner for checkers
or in the case where someone has compiled it without -fwrapv or their
compiler's equivalent.
Found by Clang trunk's Undefined Behavior Sanitizer (UBSan).
Cleanup only - no functionality or hash values change.
13 years ago
Mark Dickinson
c04ddff290
Issue #16096 : Fix several occurrences of potential signed integer overflow. Thanks Serhiy Storchaka.
13 years ago
Christian Heimes
d5a88044a3
PyTuple_Pack() was missing va_end() in its error branch which lead to a resource leak.
14 years ago
Christian Heimes
074ebced1b
PyTuple_Pack() was missing va_end() in its error branch which lead to a resource leak.
14 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
Gregory P. Smith
63e6c3222f
Consolidate the occurrances of the prime used as the multiplier when hashing
to a single #define instead of having several copies in several files.
This excludes the Modules/ tree (datetime and expat both have a copy
for their own purposes with no need for it to be the same).
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
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
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
57e683e53e
Issue #1621 : Fix undefined behaviour in bytes.__hash__, str.__hash__, tuple.__hash__, frozenset.__hash__ and set indexing operations.
15 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
Brett Cannon
b94767ff44
Issue #8914 : fix various warnings from the Clang static analyzer v254.
15 years ago
Martin v. Löwis
4d0d471a80
Merge branches/pep-0384.
15 years ago
Benjamin Peterson
8035bc5c04
follow up to #9778 : define and use an unsigned hash type
15 years ago
Benjamin Peterson
8f67d0893f
make hashes always the size of pointers; introduce Py_hash_t #9778
15 years ago
Antoine Pitrou
7f14f0d8a0
Recorded merge of revisions 81032 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r81032 | antoine.pitrou | 2010-05-09 17:52:27 +0200 (dim., 09 mai 2010) | 9 lines
Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
................
16 years ago
Antoine Pitrou
f95a1b3c53
Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
16 years ago
Antoine Pitrou
c7c96a90bc
Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
16 years ago
Antoine Pitrou
c83ea137d7
Untabify C files. Will watch buildbots.
16 years ago
Brett Cannon
fee3acb082
Remove an unneeded variable assignment.
Found using Clang's static analyzer.
16 years ago
Ezio Melotti
807e98e0af
Merged revisions 78541 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r78541 | ezio.melotti | 2010-03-01 06:08:34 +0200 (Mon, 01 Mar 2010) | 17 lines
Merged revisions 78515-78516,78522 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78515 | georg.brandl | 2010-02-28 20:19:17 +0200 (Sun, 28 Feb 2010) | 1 line
#8030 : make builtin type docstrings more consistent: use "iterable" instead of "seq(uence)", use "new" to show that set() always returns a new object.
........
r78516 | georg.brandl | 2010-02-28 20:26:37 +0200 (Sun, 28 Feb 2010) | 1 line
The set types can also be called without arguments.
........
r78522 | ezio.melotti | 2010-03-01 01:59:00 +0200 (Mon, 01 Mar 2010) | 1 line
#8030 : more docstring fix for builtin types.
........
................
16 years ago
Ezio Melotti
7f807b79d8
Merged revisions 78515-78516,78522 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78515 | georg.brandl | 2010-02-28 20:19:17 +0200 (Sun, 28 Feb 2010) | 1 line
#8030 : make builtin type docstrings more consistent: use "iterable" instead of "seq(uence)", use "new" to show that set() always returns a new object.
........
r78516 | georg.brandl | 2010-02-28 20:26:37 +0200 (Sun, 28 Feb 2010) | 1 line
The set types can also be called without arguments.
........
r78522 | ezio.melotti | 2010-03-01 01:59:00 +0200 (Mon, 01 Mar 2010) | 1 line
#8030 : more docstring fix for builtin types.
........
16 years ago