summaryrefslogtreecommitdiff
path: root/Modules/_collectionsmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-31095: fix potential crash during GC (GH-2974) (#3196)INADA Naoki2017-09-261-0/+4
| | | (cherry picked from commit a6296d34a478b4f697ea9db798146195075d496c)
* bpo-29935: Fixed error messages in the index() method of tuple, list and ↵Serhiy Storchaka2017-03-301-2/+2
| | | | | | | deque (#887) (#907) (#909) when pass indices of wrong type. (cherry picked from commit d4edfc9abffca965e76ebc5957a92031a4d6c4d4) (cherry picked from commit bf4bb2e43030661e568d5d4b046e8b9351cc164c)
* Fix grammar, typos and markup in documentation and code commentsMartin Panter2017-01-141-1/+1
| | | | | | * Indent versionchanged at method level, not class level * Mark up ``--help`` to avoid generating an en dash * Use forward slash in Unix command line with a dollar sign ($) prompt
* Issue #26194: Inserting into a full deque to raise an IndexErrorRaymond Hettinger2016-02-011-5/+2
|
* Issue #26194: Fix undefined behavior for deque.insert() when len(d) == maxlenRaymond Hettinger2016-01-261-0/+7
|
* merge 3.4Benjamin Peterson2016-01-011-2/+0
|\
| * merge 3.3Benjamin Peterson2016-01-011-2/+0
| |\
| | * remove some copyright notices supserseded by the toplevel onesBenjamin Peterson2016-01-011-2/+0
| | |
* | | 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.
* | | Issue #25523: Further a-to-an corrections new in 3.5Martin Panter2015-11-021-1/+1
| | |
* | | Backport early-out 91259f061cfb to reduce the cost of bb1a2944bcb6Raymond Hettinger2015-10-061-1/+5
| | |
* | | Issue #25135: Avoid possible reentrancy issues in deque_clear.Raymond Hettinger2015-09-261-3/+59
| | |
* | | Prevent reentrant badness by deferring the decrefs as long as possible.Raymond Hettinger2015-09-051-6/+10
| | |
* | | Issue #24913: Fix overrun error in deque.index().Raymond Hettinger2015-08-261-0/+2
| | |
* | | mergeRaymond Hettinger2015-07-201-1/+1
|\ \ \ | |/ /
| * | Issue #19663: Improve error message for defaultdict.Raymond Hettinger2015-07-201-1/+1
| | |
| * | Defer deleted item decref until after the deque is restored to a consistent ↵Raymond Hettinger2015-05-021-6/+6
| | | | | | | | | | | | state.
* | | Issue #16991: Add a C implementation of collections.OrderedDict.Eric Snow2015-05-291-0/+3
| | |
* | | fix refleak in deque_concatBenjamin Peterson2015-04-041-2/+8
| | |
* | | Issue 23793: Add deque support for __add__(), __mul__(), and __imul__().Raymond Hettinger2015-03-311-10/+123
| | |
* | | Fix typoRaymond Hettinger2015-03-241-1/+1
| | |
* | | Minor code and comment cleanups.Raymond Hettinger2015-03-241-21/+18
| | |
* | | Improve and fix-up comments.Raymond Hettinger2015-03-241-25/+46
| | |
* | | Issue 23744: Minor speed-up for deque.__bool__().Raymond Hettinger2015-03-231-1/+24
| | |
* | | Minor nit. Make the rotate() success/fail tests consistent.Raymond Hettinger2015-03-211-3/+3
| | |
* | | For safety, wait to decref deleted values until the deque state has been ↵Raymond Hettinger2015-03-211-4/+4
| | | | | | | | | | | | restored.
* | | Fix minor formatting nits and remove unnecessary comment.Raymond Hettinger2015-03-211-4/+3
| | |
* | | Issue 23704: Add index(), copy(), and insert() to deques. Register deques ↵Raymond Hettinger2015-03-211-0/+91
| | | | | | | | | | | | as a MutableSequence.
* | | Issue 23705: Improve the performance of __contains__ checks for deques.Raymond Hettinger2015-03-201-1/+33
| | |
* | | Minor neatening-up. Make assignments in same order a struct fields. ↵Raymond Hettinger2015-03-021-12/+12
| | | | | | | | | | | | Line-up comments.
* | | Switch the state variable to unsigned for defined wrap-around behavior.Raymond Hettinger2015-03-021-3/+3
| | |
* | | Minor beautification. Move struct definitions to the top. Fix-up a comment.Raymond Hettinger2015-03-021-15/+15
| | |
* | | Minor code beautification. Replace macro with in-lineable functions.Raymond Hettinger2015-03-021-20/+35
| | |
* | | Beautify and better document the use of the size_t cast for bounds checking.Raymond Hettinger2015-03-021-6/+12
| | |
* | | Issue #23553: Use an unsigned cast to tighten-up the bounds checking logic.Raymond Hettinger2015-03-011-2/+2
| | |
* | | Need a (size_t) cast instead of (unsigned) to be big enough for a Py_ssize_t.Raymond Hettinger2015-02-281-6/+12
| | |
* | | Use unsigned division and modulo for item assignment as well.Raymond Hettinger2015-02-281-4/+5
| | |
* | | Convert one more division to unsigned arithmetic to speed-up deque_item().Raymond Hettinger2015-02-281-1/+3
| | |
* | | Line missed in last checkinRaymond Hettinger2015-02-271-1/+0
| | |
* | | Since the index is always non-negative, use faster unsigned division and modulo.Raymond Hettinger2015-02-271-3/+5
| | |
* | | Bump the blocksize up from 62 to 64 to speed up the modulo calculation.Raymond Hettinger2015-02-261-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the old comment suggesting that it was desireable to have blocksize+2 as a multiple of the cache line length. That would have made sense only if the block structure start point was always aligned to a cache line boundary. However, the memory allocations are 16 byte aligned, so we don't really have control over whether the struct spills across cache line boundaries.
* | | Update copyright.Raymond Hettinger2015-02-101-1/+1
| | |
* | | Optimization guides suggest copying memory in an ascending direction when ↵Raymond Hettinger2015-02-011-3/+3
| | | | | | | | | | | | possible.
* | | Add comment and make minor code clean-up to improve clarity.Raymond Hettinger2014-05-181-3/+13
| | |
* | | Issue #21101: Eliminate double hashing in the C code for collections.Counter().Raymond Hettinger2014-05-031-3/+14
| | |
* | | Add implementation notesRaymond Hettinger2014-04-231-1/+32
|/ /
* | merge 3.3 (#20250)Benjamin Peterson2014-01-131-1/+3
|\ \ | |/
| * correct defaultdict signature in docstring (closes #20250)Benjamin Peterson2014-01-131-1/+3
| | | | | | | | Patch from Andrew Barnert.
* | Issue #19512: _count_elements() of _collections reuses PyId_get identifierVictor Stinner2013-11-061-1/+1
| | | | | | | | instead of literal "get" string
* | mergeRaymond Hettinger2013-10-041-14/+15
|\ \ | |/