summaryrefslogtreecommitdiffstats
path: root/Objects/odictobject.c
Commit message (Collapse)AuthorAgeFilesLines
* Issues #29311, #29289: Fixed and improved docstrings for dict and OrderedDictSerhiy Storchaka2017-01-241-12/+11
| | | | methods.
* Issue #29289: Argument Clinic generates reasonable name for the parameter ↵Serhiy Storchaka2017-01-191-9/+9
| | | | "default".
* Convert some OrderedDict methods to Argument ClinicVictor Stinner2017-01-171-87/+84
| | | | | | | | | Issue #29289. Convert methods: * fromkeys() class method * setdefault() * popitem() * move_to_end()
* Merge doc fixes from 3.6Martin Panter2017-01-141-1/+1
|\
| * Merge doc fixes from 3.5Martin Panter2017-01-141-1/+1
| |\
| | * 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 #28959: Added private macro PyDict_GET_SIZE for retrieving the size of ↵Serhiy Storchaka2016-12-161-2/+1
| | | | | | | | | | | | dict.
* | | Issue #28818: Simplify lookdict functionsINADA Naoki2016-12-071-2/+2
| | |
* | | Use _PyObject_CallNoArg()Victor Stinner2016-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | Replace: PyObject_CallFunctionObjArgs(callable, NULL) with: _PyObject_CallNoArg(callable)
* | | Backed out changeset b9c9691c72c5Victor Stinner2016-12-041-1/+1
| | | | | | | | | | | | | | | | | | Issue #28858: The change b9c9691c72c5 introduced a regression. It seems like _PyObject_CallArg1() uses more stack memory than PyObject_CallFunctionObjArgs().
* | | Replace PyObject_CallFunctionObjArgs() with fastcallVictor Stinner2016-12-011-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Merge from 3.5.Serhiy Storchaka2016-10-301-7/+22
|\ \ | |/
| * Backed out changeset 9f7505019767 (issue #27275).Serhiy Storchaka2016-10-301-7/+22
| |
* | Issue #27275: Fixed implementation of pop() and popitem() methods inSerhiy Storchaka2016-10-251-22/+7
|\ \ | |/ | | | | subclasses of accelerated OrderedDict.
| * Issue #27275: Fixed implementation of pop() and popitem() methods inSerhiy Storchaka2016-10-251-22/+7
| | | | | | | | subclasses of accelerated OrderedDict.
* | Issue #27576: Fix call order in OrderedDict.__init__().Eric Snow2016-09-091-2/+15
| |
* | Issue #24254: Drop cls.__definition_order__.Eric Snow2016-09-081-15/+0
| |
* | fix spellingBenjamin Peterson2016-09-081-1/+1
| |
* | Implement compact dictVictor Stinner2016-09-081-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | Issue #27350: `dict` implementation is changed like PyPy. It is more compact and preserves insertion order. _PyDict_Dummy() function has been removed. Disable test_gdb: python-gdb.py is not updated yet to the new structure of compact dictionaries (issue #28023). Patch written by INADA Naoki.
* | Issue #24254: Preserve class attribute definition order.Eric Snow2016-09-051-0/+15
| |
* | Merge spelling and grammar fixes from 3.5Martin Panter2016-08-051-1/+1
|\ \ | |/
| * Fix spelling and grammar in documentation and code commentsMartin Panter2016-08-041-1/+1
| |
* | odict: Remove useless ";" after function definitionVictor Stinner2016-06-081-9/+9
| | | | | | | | Fix a "gcc -pendatic" warning.
* | Issue #25949: __dict__ for an OrderedDict instance is now created only whenSerhiy Storchaka2016-02-081-16/+7
|/ | | | needed.
* Issue #25935: Garbage collector now breaks reference loops with OrderedDict.Serhiy Storchaka2016-01-191-13/+14
|
* Issue #25914: Fixed and simplified OrderedDict.__sizeof__.Serhiy Storchaka2015-12-221-21/+1
|
* Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size.Serhiy Storchaka2015-12-191-2/+0
| | | | | This allows sys.getsize() to work correctly with their subclasses with __slots__ defined.
* Issue #25462: The hash of the key now is calculated only once in mostSerhiy Storchaka2015-11-131-35/+83
| | | | operations in C implementation of OrderedDict.
* Issue #25410: Made testing that od_fast_nodes and dk_entries are in sync moreSerhiy Storchaka2015-11-061-4/+8
| | | | reliable.
* Issue #24726: Revert setting the value on the dict ifSerhiy Storchaka2015-11-061-1/+7
| | | | _odict_add_new_node() fails.
* Issue #25558: Refactoring OrderedDict iteration.Serhiy Storchaka2015-11-061-40/+31
|
* Issue #25449: Fixed a crash and leaking NULL in repr() of OrderedDict thatSerhiy Storchaka2015-11-041-2/+13
| | | | was mutated by direct calls of dict methods.
* Issue #25449: Iterating OrderedDict with keys with unstable hash now raisesSerhiy Storchaka2015-11-041-0/+2
| | | | | | KeyError in C implementations as well as in Python implementation. Added tests for OrderedDict subclasses.
* Issue #25395: Fixed crash when highly nested OrderedDict structures wereSerhiy Storchaka2015-11-011-3/+14
| | | | garbage collected.
* Issue #25410: C implementation of OrderedDict now uses type(self) instead ofSerhiy Storchaka2015-10-221-31/+14
| | | | self.__class__ in __repr__() and __reduce__() for simplicity and reliability.
* Issue #25410: Fixed a memory leak in OrderedDict in the case when key's hashSerhiy Storchaka2015-10-201-1/+1
| | | | calculation fails.
* Issue #25410: Cleaned up and fixed minor bugs in C implementation of ↵Serhiy Storchaka2015-10-181-158/+72
| | | | OrderedDict.
* Issue #25406: Fixed a bug in C implementation of OrderedDict.move_to_end()Serhiy Storchaka2015-10-141-21/+10
| | | | | that caused segmentation fault or hang in iterating after moving several items to the start of ordered dict.
* odictobject.c: fix compiler warningVictor Stinner2015-09-181-1/+1
| | | | | PyObject_Length() returns a P_ssize_t, not an int. Use a Py_ssize_t to avoid overflow.
* Issue #24992: Fix error handling and a race condition (related to garbageVictor Stinner2015-09-031-18/+22
| | | | | | collection) in collections.OrderedDict constructor. Patch reviewed by Serhiy Storchaka.
* Issue #24667: Resize odict in all cases that the underlying dict resizes.Eric Snow2015-08-071-7/+10
|
* repair my irrational excuberanceBenjamin Peterson2015-06-071-54/+57
|
* remove unnecessary braces and indentationBenjamin Peterson2015-06-071-58/+57
|
* fix refleak when keys() failsBenjamin Peterson2015-06-041-2/+6
|
* Issue #24369: Defend against key-changes during iteration.Eric Snow2015-06-041-13/+19
|
* Issue #24377: Fix a ref leak in OrderedDict.__repr__.Eric Snow2015-06-031-1/+1
|
* Issue #24362: Simplify the C OrderedDict fast nodes resize logic.Eric Snow2015-06-031-34/+40
|
* Issue #24368: Support keyword arguments in OrderedDict methods.Eric Snow2015-06-031-23/+49
|
* Issue #24359: Check for changed OrderedDict size during iteration.Eric Snow2015-06-021-0/+10
|
* Issue #24348: Drop superfluous increfs/decrefs.Eric Snow2015-06-021-33/+13
|