summaryrefslogtreecommitdiffstats
path: root/Objects/tupleobject.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #26494: Fixed crash on iterating exhausting iterators.Serhiy Storchaka2016-03-301-1/+1
| | | | | | Affected classes are generic sequence iterators, iterators of str, bytes, bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding views and os.scandir() iterator.
* Issue #23629: Fix the default __sizeof__ implementation for variable-sized ↵Antoine Pitrou2015-03-101-12/+0
|\ | | | | | | objects.
| * Issue #23629: Fix the default __sizeof__ implementation for variable-sized ↵Antoine Pitrou2015-03-101-12/+0
| | | | | | | | objects.
* | Issue #22207: Fix "comparison between signed and unsigned integers" warning inVictor Stinner2014-08-171-1/+1
| | | | | | | | | | test checking for integer overflow on Py_ssize_t type: cast explicitly to size_t.
* | Issue #22077: Improve index error messages for bytearrays, bytes, lists, andTerry Jan Reedy2014-08-021-1/+1
|/ | | | | tuples by adding 'or slices'. Added ', not <typename' for bytearrays. Original patch by Claudiu Popa.
* Make the various iterators' "setstate" sliently and consistently clip theKristján Valur Jónsson2014-03-051-2/+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-2/+2
| | | | | | | | | | index. This avoids the possibility of setting an iterator to an invalid state.
* | Issue #20437: Fixed 22 potential bugs when deleting objects references.Serhiy Storchaka2014-02-091-4/+2
|\ \ | |/
| * Issue #20437: Fixed 21 potential bugs when deleting objects references.Serhiy Storchaka2014-02-091-4/+2
| |
* | Issue #19513: repr(tuple) now uses _PyUnicodeWriter for better performancesVictor Stinner2013-11-191-27/+37
| |
* | Issue #18722: Remove uses of the "register" keyword in C code.Antoine Pitrou2013-08-131-24/+24
| |
* | Issue #9566: More long/Py_ssize_t fixes in tuple and list iterators (it_index)Victor Stinner2013-06-241-2/+2
| |
* | Issue #9566: Fix a compiler warning in tupleiter_setstate() on Windows x64Victor Stinner2013-06-241-1/+1
| |
* | Issuse #17932: Fix an integer overflow issue on Windows 64-bit in tupleVictor Stinner2013-06-041-1/+1
| | | | | | | | | | iterators: change the C type of tupleiterobject.it_index from long to Py_ssize_t.
* | Add a comment about *not* caching the hash value. Issue #9685 suggested to ↵Christian Heimes2013-01-071-0/+3
|/ | | | memorize the hash value, but the feature request was rejected because no speed ups were found.
* Fix the internals of our hash functions to used unsigned values during hashGregory P. Smith2012-12-111-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | computation as the overflow behavior of signed integers is undefined. NOTE: This change is smaller compared to 3.2 as much of this cleanup had already been done. I added the comment that my change in 3.2 added so that the code would match up. Otherwise this just adds or synchronizes appropriate UL designations on some constants to be pedantic. 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.
| * Fix the internals of our hash functions to used unsigned values during hashGregory P. Smith2012-12-111-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Issue #16096: Fix several occurrences of potential signed integer overflow. ↵Mark Dickinson2012-10-061-8/+4
| | | | | | | | Thanks Serhiy Storchaka.
* | PyTuple_Pack() was missing va_end() in its error branch which lead to a ↵Christian Heimes2012-09-101-1/+3
|\ \ | |/ | | | | resource leak.
| * PyTuple_Pack() was missing va_end() in its error branch which lead to a ↵Christian Heimes2012-09-101-1/+3
| | | | | | | | resource leak.
* | Issue #14785: Add sys._debugmallocstats() to help debug low-level memory ↵David Malcolm2012-06-221-0/+16
| | | | | | | | allocation issues
* | Rename _PyIter_GetBuiltin to _PyObject_GetBuiltin, and do not include it in ↵Antoine Pitrou2012-04-041-2/+2
| | | | | | | | the stable ABI.
* | Issue #14288: Serialization support for builtin iterators.Kristján Valur Jónsson2012-04-031-0/+31
| |
* | 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
| |
* | Consolidate the occurrances of the prime used as the multiplier when hashing.Gregory P. Smith2012-01-141-1/+1
|\ \ | |/
| * Consolidate the occurrances of the prime used as the multiplier when hashingGregory P. Smith2012-01-141-1/+1
| | | | | | | | | | | | | | 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).
* | Revert "Accept None as start and stop parameters for list.index() and ↵Petri Lehtinen2011-11-061-11/+4
|\ \ | |/ | | | | | | | | tuple.index()" Issue #13340.
| * Revert "Accept None as start and stop parameters for list.index() and ↵Petri Lehtinen2011-11-061-11/+4
| | | | | | | | | | | | tuple.index()" Issue #13340.
* | Accept None as start and stop parameters for list.index() and tuple.index().Petri Lehtinen2011-11-051-4/+11
|\ \ | |/ | | | | Closes #13340.
| * Accept None as start and stop parameters for list.index() and tuple.index()Petri Lehtinen2011-11-051-4/+11
| | | | | | | | Closes #13340.
* | Issue #12911: Fix memory consumption when calculating the repr() of huge ↵Antoine Pitrou2011-10-061-39/+36
|\ \ | |/ | | | | | | | | | | 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.
| * Issue #12911: Fix memory consumption when calculating the repr() of huge ↵Antoine Pitrou2011-10-061-39/+36
| | | | | | | | | | | | | | 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.
* | Issue #1621: Fix undefined behaviour in bytes.__hash__, str.__hash__, ↵Mark Dickinson2011-09-241-4/+5
| | | | | | | | tuple.__hash__, frozenset.__hash__ and set indexing operations.
* | Replace Py_NotImplemented returns with the macro form Py_RETURN_NOTIMPLEMENTED.Brian Curtin2011-08-111-4/+2
| | | | | | | | The macro was introduced in #12724.
* | Issue #8914: fix various warnings from the Clang static analyzer v254.Brett Cannon2011-02-221-1/+1
|/
* Merge branches/pep-0384.Martin v. Löwis2010-12-031-1/+1
|
* follow up to #9778: define and use an unsigned hash typeBenjamin Peterson2010-10-231-2/+2
|
* make hashes always the size of pointers; introduce Py_hash_t #9778Benjamin Peterson2010-10-171-2/+2
|
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-736/+736
| | | | | | | | | | 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. ........
* Merged revisions 78515-78516,78522 via svnmerge fromEzio Melotti2010-03-011-4/+4
| | | | | | | | | | | | | | | | | | 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. ........
* Merged revisions 76763 via svnmerge fromAntoine Pitrou2009-12-121-1/+2
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76763 | antoine.pitrou | 2009-12-12 20:13:08 +0100 (sam., 12 déc. 2009) | 7 lines 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) ........
* Merged revisions 70550 via svnmerge fromAntoine Pitrou2009-03-231-3/+3
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r70550 | antoine.pitrou | 2009-03-23 20:17:00 +0100 (lun., 23 mars 2009) | 3 lines The tracking statistics were actually too pessimistic ........
* Merged revisions 70546 via svnmerge fromAntoine Pitrou2009-03-231-0/+54
| | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r70546 | antoine.pitrou | 2009-03-23 19:41:45 +0100 (lun., 23 mars 2009) | 9 lines 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) ........
* Merged revisions ↵Benjamin Peterson2009-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 70342,70385-70387,70389-70390,70392-70393,70395,70400,70405-70406,70418,70438,70464,70468 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r70342 | georg.brandl | 2009-03-13 14:03:58 -0500 (Fri, 13 Mar 2009) | 1 line #5486: typos. ........ r70385 | benjamin.peterson | 2009-03-15 09:38:55 -0500 (Sun, 15 Mar 2009) | 1 line fix tuple.index() error message #5495 ........ r70386 | georg.brandl | 2009-03-15 16:32:06 -0500 (Sun, 15 Mar 2009) | 1 line #5496: fix docstring of lookup(). ........ r70387 | georg.brandl | 2009-03-15 16:37:16 -0500 (Sun, 15 Mar 2009) | 1 line #5493: clarify __nonzero__ docs. ........ r70389 | georg.brandl | 2009-03-15 16:43:38 -0500 (Sun, 15 Mar 2009) | 1 line Fix a small nit in the error message if bool() falls back on __len__ and it returns the wrong type: it would tell the user that __nonzero__ should return bool or int. ........ r70390 | georg.brandl | 2009-03-15 16:44:43 -0500 (Sun, 15 Mar 2009) | 1 line #5491: clarify nested() semantics. ........ r70392 | georg.brandl | 2009-03-15 16:46:00 -0500 (Sun, 15 Mar 2009) | 1 line #5488: add missing struct member. ........ r70393 | georg.brandl | 2009-03-15 16:47:42 -0500 (Sun, 15 Mar 2009) | 1 line #5478: fix copy-paste oversight in function signature. ........ r70395 | georg.brandl | 2009-03-15 16:51:48 -0500 (Sun, 15 Mar 2009) | 1 line #5276: document IDLESTARTUP and .Idle.py. ........ r70400 | georg.brandl | 2009-03-15 16:59:37 -0500 (Sun, 15 Mar 2009) | 3 lines Fix markup in re docs and give a mail address in regex howto, so that the recommendation to send suggestions to the author can be followed. ........ r70405 | georg.brandl | 2009-03-15 17:11:07 -0500 (Sun, 15 Mar 2009) | 7 lines Move the previously local import of threading to module level. This is cleaner and avoids lockups in obscure cases where a Queue is instantiated while the import lock is already held by another thread. OKed by Tim Peters. ........ r70406 | hirokazu.yamamoto | 2009-03-15 17:43:14 -0500 (Sun, 15 Mar 2009) | 1 line Added skip for old MSVC. ........ r70418 | georg.brandl | 2009-03-16 14:42:03 -0500 (Mon, 16 Mar 2009) | 1 line Add token markup. ........ r70438 | benjamin.peterson | 2009-03-17 15:29:51 -0500 (Tue, 17 Mar 2009) | 1 line I thought this was begging for an example ........ r70464 | benjamin.peterson | 2009-03-18 15:58:09 -0500 (Wed, 18 Mar 2009) | 1 line a much better example ........ r70468 | benjamin.peterson | 2009-03-18 22:04:31 -0500 (Wed, 18 Mar 2009) | 1 line close files after comparing them ........
* Issue #1717: rename tp_compare to tp_reserved. I'll change theMark Dickinson2009-02-021-2/+2
| | | | | type of tp_compare in a separate commit, for ease of reversion should things go wrong.
* Merged revisions 68381 via svnmerge fromBenjamin Peterson2009-01-111-2/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r68381 | martin.v.loewis | 2009-01-07 12:40:40 -0600 (Wed, 07 Jan 2009) | 2 lines Issue #4850: Change COUNT_ALLOCS variables to Py_ssize_t. ........
* merge from trunkBenjamin Peterson2008-10-111-1/+3
|
* Closes release blocker #3627.Neal Norwitz2008-08-241-2/+3
| | | | | | | | | | | | | Merged revisions 65335 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk TESTED=./python -E -tt ./Lib/test/regrtest.py -uall (both debug and opt) ........ r65335 | neal.norwitz | 2008-07-31 10:17:14 -0700 (Thu, 31 Jul 2008) | 1 line Security patches from Apple: prevent int overflow when allocating memory ........
* Merged revisions ↵Amaury Forgeot d'Arc2008-06-171-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 64119,64147,64150,64165,64219-64221,64229-64230,64233,64235,64253,64278,64280,64301,64303,64320,64328,64338-64339 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r64119 | andrew.kuchling | 2008-06-11 14:53:14 +0200 (mer., 11 juin 2008) | 1 line Note PEP 371 section ........ r64147 | benjamin.peterson | 2008-06-11 22:04:30 +0200 (mer., 11 juin 2008) | 2 lines update ACKS and NEWs for multiprocessing ........ r64150 | georg.brandl | 2008-06-11 22:28:06 +0200 (mer., 11 juin 2008) | 2 lines Can we agree to put dots at entry ends? Thanks. ........ r64165 | armin.rigo | 2008-06-12 11:50:58 +0200 (jeu., 12 juin 2008) | 3 lines Sounds obvious, but I didn't even realize that you can put non-string keys in type dictionaries without using this locals() hack. ........ r64219 | neal.norwitz | 2008-06-13 08:00:46 +0200 (ven., 13 juin 2008) | 1 line Check for memory alloc failure ........ r64220 | neal.norwitz | 2008-06-13 08:02:26 +0200 (ven., 13 juin 2008) | 3 lines Fix some memory dealloc problems when exceptions occur. It caused: "Fatal Python error: UNREF invalid object" in the DoubleTest. ........ r64221 | neal.norwitz | 2008-06-13 08:03:25 +0200 (ven., 13 juin 2008) | 3 lines Fix typo in method name. The LT class implemented less than. The LE class should implement less than or equal to (as the code does). ........ r64229 | georg.brandl | 2008-06-13 15:26:54 +0200 (ven., 13 juin 2008) | 2 lines Clarification. ........ r64230 | robert.schuppenies | 2008-06-13 15:29:37 +0200 (ven., 13 juin 2008) | 2 lines Fixed: sys.getsizeof does not take the actual length of the tuples into account. ........ r64233 | benjamin.peterson | 2008-06-13 17:11:50 +0200 (ven., 13 juin 2008) | 2 lines platform.uname now tries to fill empty values even when os.uname is present ........ r64235 | benjamin.peterson | 2008-06-13 17:41:09 +0200 (ven., 13 juin 2008) | 1 line set svn:ignore on multiprocessing ........ r64253 | andrew.kuchling | 2008-06-13 21:38:18 +0200 (ven., 13 juin 2008) | 1 line Typo fixes ........ r64278 | martin.v.loewis | 2008-06-14 16:24:47 +0200 (sam., 14 juin 2008) | 2 lines Disable UAC by default. ........ r64280 | gregory.p.smith | 2008-06-14 19:34:09 +0200 (sam., 14 juin 2008) | 3 lines silence the test when it is skipped on some platforms. should fix a buildbot. ........ r64301 | georg.brandl | 2008-06-15 21:54:36 +0200 (dim., 15 juin 2008) | 2 lines Forward-port new test from r64300. ........ r64303 | raymond.hettinger | 2008-06-16 03:42:40 +0200 (lun., 16 juin 2008) | 1 line Issue 3116: fix quadratic behavior in marshal.dumps(). ........ r64320 | georg.brandl | 2008-06-16 23:00:47 +0200 (lun., 16 juin 2008) | 2 lines Add Jesse Noller to the developers list. ........ r64328 | georg.brandl | 2008-06-17 11:01:35 +0200 (mar., 17 juin 2008) | 2 lines Split the HTML index. ........ r64338 | vinay.sajip | 2008-06-17 13:02:14 +0200 (mar., 17 juin 2008) | 1 line Bug #3126: StreamHandler and FileHandler check before calling "flush" and "close" that the stream object has these, using hasattr (thanks to bobf for the patch). ........ r64339 | vinay.sajip | 2008-06-17 13:04:02 +0200 (mar., 17 juin 2008) | 1 line Updated with fix for #3126. ........