summaryrefslogtreecommitdiffstats
path: root/Include/dictobject.h
Commit message (Collapse)AuthorAgeFilesLines
* gh-106004: PyDict_GetItemRef() should only be in the limited API 3.13 ↵Serhiy Storchaka2023-07-251-0/+2
| | | | (GH-107229)
* gh-106004: Add PyDict_GetItemRef() function (#106005)Victor Stinner2023-07-211-0/+9
| | | | | * Add PyDict_GetItemRef() and PyDict_GetItemStringRef() functions. Add these functions to the stable ABI version 3.13. * Add unit tests on the PyDict C API in test_capi.
* gh-87347: Add parenthesis around PyXXX_Check() arguments (#92815)Victor Stinner2022-06-161-4/+4
|
* bpo-45434: Remove useless space in includes (GH-28963)Victor Stinner2021-10-141-1/+1
| | | Micro-optimize spaces!
* bpo-41845: Move PyObject_GenericGetDict() back into the limited API (GH22646)Zackery Spytz2020-10-191-0/+3
| | | | It was moved out of the limited API in 7d95e4072169911b228c9e42367afb5f17fd3db0. This change re-enables it from 3.10, to avoid generating invalid extension modules for earlier versions.
* bpo-39573: Add Py_IS_TYPE() function (GH-18488)Dong-hee Na2020-02-131-1/+1
| | | Co-Author: Neil Schemenauer <nas-github@arctrix.com>
* bpo-35134: Create Include/cpython/dictobject.h (GH-10732)Victor Stinner2018-11-261-119/+31
| | | | | | * Move dictobject.h code surrounded by "#ifndef Py_LIMITED_API" to a new Include/cpython/dictobject.h header file. * Add PyAPI_FUNC() to _PyDictView_New(). * Reorganize dictobject.h: move views and iterators at the end.
* bpo-33462: Add __reversed__ to dict and dict views (GH-6827)Rémi Lapeyre2018-11-061-0/+3
|
* bpo-15695: Add PyAPI_FUNC() to _PyDict_SizeOf() declaration. (#639)Serhiy Storchaka2017-03-121-1/+1
|
* Issue #28969: Fixed race condition in C implementation of functools.lru_cache.Serhiy Storchaka2017-01-121-0/+1
|\ | | | | | | | | KeyError could be raised when cached function with full cache was simultaneously called from differen threads with the same uncached arguments.
| * Issue #28969: Fixed race condition in C implementation of functools.lru_cache.Serhiy Storchaka2017-01-121-0/+1
| |\ | | | | | | | | | | | | KeyError could be raised when cached function with full cache was simultaneously called from differen threads with the same uncached arguments.
| | * Issue #28969: Fixed race condition in C implementation of functools.lru_cache.Serhiy Storchaka2017-01-121-0/+1
| | | | | | | | | | | | | | | KeyError could be raised when cached function with full cache was simultaneously called from differen threads with the same uncached arguments.
* | | Issue #28427: old keys should not remove new values fromAntoine Pitrou2016-12-271-0/+2
|\ \ \ | |/ / | | | | | | WeakValueDictionary when collecting from another thread.
| * | Issue #28427: old keys should not remove new values fromAntoine Pitrou2016-12-271-0/+2
| |\ \ | | |/ | | | | | | WeakValueDictionary when collecting from another thread.
| | * Issue #28427: old keys should not remove new values fromAntoine Pitrou2016-12-271-0/+2
| | | | | | | | | | | | WeakValueDictionary when collecting from another thread.
* | | Issue #28959: Added private macro PyDict_GET_SIZE for retrieving the size of ↵Serhiy Storchaka2016-12-161-0/+2
|/ / | | | | | | dict.
* | Issue #28544: Pass `PyObject*` to _PyDict_Pop, not `PyDictObject*`Yury Selivanov2016-10-281-1/+1
| |
* | Issue #28544: Fix compilation of _asynciomodule.c on WindowsYury Selivanov2016-10-281-1/+1
| |
* | Issue #27358: Optimized merging var-keyword arguments and improved errorSerhiy Storchaka2016-10-021-0/+6
| | | | | | | | message when pass a non-mapping as a var-keyword argument.
* | Add _PyDict_CheckConsistency()Victor Stinner2016-09-141-1/+1
| | | | | | | | | | | | | | | | Issue #28127: Add a function to check that a dictionary remains consistent after any change. By default, tables are not checked, only basic attributes. Define DEBUG_PYDICT (ex: gcc -D DEBUG_PYDICT) to also check dictionary "content".
* | Issue #26900: Excluded underscored names and other private API from limited API.Serhiy Storchaka2016-09-111-1/+5
| |
* | Add a new private version to the builtin dict typeVictor Stinner2016-09-081-0/+4
| | | | | | | | | | | | | | Issue #26058: Add a new private version to the builtin dict type, incremented at each dictionary creation and at each dictionary change. Implementation of the PEP 509.
* | Add documentation to the dict implementationVictor Stinner2016-09-081-0/+9
|/ | | | Issue #27350.
* Issue #25914: Fixed and simplified OrderedDict.__sizeof__.Serhiy Storchaka2015-12-221-1/+1
|
* Issue #24483: C implementation of functools.lru_cache() now calculates key'sSerhiy Storchaka2015-10-021-0/+4
| | | | hash only once.
* Issue #16991: Use PyObject_TypeCheck instead of PyObject_IsInstance.Eric Snow2015-05-301-3/+3
|
* Issue #16991: Add a C implementation of collections.OrderedDict.Eric Snow2015-05-301-3/+12
|
* PEP 448: additional unpacking generalizations (closes #2292)Benjamin Peterson2015-05-061-0/+4
| | | | Patch by Neil Girdhar.
* do not expose known hash api in stable APIBenjamin Peterson2014-05-031-0/+4
|
* Issue 21101: Internal API for dict getitem and setitem where the hash value ↵Raymond Hettinger2014-05-031-0/+4
| | | | is known.
* Issue #19526: Exclude all new API from the stable ABI.Martin v. Löwis2014-01-031-0/+2
|
* Issue #19512, #19526: Exclude the new _PyDict_DelItemId() function from theVictor Stinner2013-11-081-2/+3
| | | | stable ABI
* Issue #19512: Add a new _PyDict_DelItemId() function, similar toVictor Stinner2013-11-061-0/+1
| | | | PyDict_DelItemString() but using an identifier for the key
* Add PyDict_SetDefault. (closes #17327)Benjamin Peterson2013-03-081-0/+2
| | | | Patch by Stefan Behnel and I.
* Issue #14785: Add sys._debugmallocstats() to help debug low-level memory ↵David Malcolm2012-06-221-0/+1
| | | | allocation issues
* Account for shared keys in type's __sizeof__ (#13903).Martin v. Loewis2012-04-241-0/+1
|
* Implement PEP 412: Key-sharing dictionaries (closes #13903)Benjamin Peterson2012-04-231-68/+18
| | | | Patch from Mark Shannon.
* Issue #2377: Make importlib the implementation of __import__().Brett Cannon2012-04-141-0/+2
| | | | | | | importlib._bootstrap is now frozen into Python/importlib.h and stored as _frozen_importlib in sys.modules. Py_Initialize() loads the frozen code along with sys and imp and then uses _frozen_importlib._install() to set builtins.__import__() w/ _frozen_importlib.__import__().
* Issue #14383: Add _PyDict_GetItemId() and _PyDict_SetItemId() functionsVictor Stinner2012-03-261-0/+2
| | | | | These functions simplify the usage of static constant Unicode strings. Generalize the usage of _Py_Identifier in ceval.c and typeobject.c.
* Issue #13389: Full garbage collection passes now clear the freelists forAntoine Pitrou2011-11-141-0/+2
| | | | | list and dict objects. They already cleared other freelists in the interpreter.
* Merge branches/pep-0384.Martin v. Löwis2010-12-031-0/+6
|
* make hashes always the size of pointers; introduce Py_hash_t #9778Benjamin Peterson2010-10-171-8/+5
|
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-32/+32
| | | | | | | | | | 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. ........
* prevent the dict constructor from accepting non-string keyword args #8419Benjamin Peterson2010-04-241-0/+1
| | | | | This adds PyArg_ValidateKeywordArguments, which checks that keyword arguments are all strings, using an optimized method if possible.
* Merged revisions 70546 via svnmerge fromAntoine Pitrou2009-03-231-0/+1
| | | | | | | | | | | | | | | | 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) ........
* Added missing prototype for PyDict_GetItemWithError().Alexandre Vassalotti2008-06-011-0/+1
|
* #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT.Christian Heimes2007-12-191-5/+5
|
* Merged revisions 59541-59561 via svnmerge fromChristian Heimes2007-12-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r59544 | raymond.hettinger | 2007-12-18 01:13:45 +0100 (Tue, 18 Dec 2007) | 1 line Add more namedtuple() test cases. Neaten the code and comments. ........ r59545 | christian.heimes | 2007-12-18 04:38:03 +0100 (Tue, 18 Dec 2007) | 3 lines Fixed for #1601: IDLE not working correctly on Windows (Py30a2/IDLE30a1) Amaury's ideas works great. Should we build the Python core with WINVER=0x0500 and _WIN32_WINNT=0x0500, too? ........ r59546 | christian.heimes | 2007-12-18 10:00:13 +0100 (Tue, 18 Dec 2007) | 1 line Make it a bit easier to test Tcl/Tk and idle from a build dir. ........ r59547 | christian.heimes | 2007-12-18 10:12:10 +0100 (Tue, 18 Dec 2007) | 1 line Removed several unused files from the PCbuild9 directory. They are relics from the past. ........ r59548 | raymond.hettinger | 2007-12-18 19:26:18 +0100 (Tue, 18 Dec 2007) | 29 lines Speed-up dictionary constructor by about 10%. New opcode, STORE_MAP saves the compiler from awkward stack manipulations and specializes for dicts using PyDict_SetItem instead of PyObject_SetItem. Old disassembly: 0 BUILD_MAP 0 3 DUP_TOP 4 LOAD_CONST 1 (1) 7 ROT_TWO 8 LOAD_CONST 2 ('x') 11 STORE_SUBSCR 12 DUP_TOP 13 LOAD_CONST 3 (2) 16 ROT_TWO 17 LOAD_CONST 4 ('y') 20 STORE_SUBSCR New disassembly: 0 BUILD_MAP 0 3 LOAD_CONST 1 (1) 6 LOAD_CONST 2 ('x') 9 STORE_MAP 10 LOAD_CONST 3 (2) 13 LOAD_CONST 4 ('y') 16 STORE_MAP ........ r59549 | thomas.heller | 2007-12-18 20:00:34 +0100 (Tue, 18 Dec 2007) | 2 lines Issue #1642: Fix segfault in ctypes when trying to delete attributes. ........ r59551 | guido.van.rossum | 2007-12-18 21:10:42 +0100 (Tue, 18 Dec 2007) | 2 lines Issue #1645 by Alberto Bertogli. Fix a comment. ........ r59553 | raymond.hettinger | 2007-12-18 22:24:09 +0100 (Tue, 18 Dec 2007) | 12 lines Give meaning to the oparg for BUILD_MAP: estimated size of the dictionary. Allows dictionaries to be pre-sized (upto 255 elements) saving time lost to re-sizes with their attendant mallocs and re-insertions. Has zero effect on small dictionaries (5 elements or fewer), a slight benefit for dicts upto 22 elements (because they had to resize once anyway), and more benefit for dicts upto 255 elements (saving multiple resizes during the build-up and reducing the number of collisions on the first insertions). Beyond 255 elements, there is no addional benefit. ........ r59554 | christian.heimes | 2007-12-18 22:56:09 +0100 (Tue, 18 Dec 2007) | 1 line Fixed #1649: IDLE error: dictionary changed size during iteration ........ r59557 | raymond.hettinger | 2007-12-18 23:21:27 +0100 (Tue, 18 Dec 2007) | 1 line Simplify and speedup _asdict() for named tuples. ........ r59558 | christian.heimes | 2007-12-19 00:22:54 +0100 (Wed, 19 Dec 2007) | 3 lines Applied patch #1635: Float patch for inf and nan on Windows (and other platforms). The patch unifies float("inf") and repr(float("inf")) on all platforms. ........ r59559 | raymond.hettinger | 2007-12-19 00:51:15 +0100 (Wed, 19 Dec 2007) | 1 line Users demand iterable input for named tuples. The author capitulates. ........ r59560 | raymond.hettinger | 2007-12-19 01:21:06 +0100 (Wed, 19 Dec 2007) | 1 line Beef-up tests for dict literals ........ r59561 | raymond.hettinger | 2007-12-19 01:27:21 +0100 (Wed, 19 Dec 2007) | 1 line Zap a duplicate line ........
* Added all PyTypeObjects to the appropriate header files.Christian Heimes2007-11-291-0/+13
| | | | Before the patch a lot of internal types weren't available in the header files. The patch exposes the new iterators, views and some other types to all C modules. I've also renamed some of the types and tp_names.
* Merged revisions 56467-56482 via svnmerge fromMartin v. Löwis2007-07-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/p3yk ................ r56477 | martin.v.loewis | 2007-07-21 09:04:38 +0200 (Sa, 21 Jul 2007) | 11 lines Merged revisions 56466-56476 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r56476 | martin.v.loewis | 2007-07-21 08:55:02 +0200 (Sa, 21 Jul 2007) | 4 lines PEP 3123: Provide forward compatibility with Python 3.0, while keeping backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT. ........ ................ r56478 | martin.v.loewis | 2007-07-21 09:47:23 +0200 (Sa, 21 Jul 2007) | 2 lines PEP 3123: Use proper C inheritance for PyObject. ................ r56479 | martin.v.loewis | 2007-07-21 10:06:55 +0200 (Sa, 21 Jul 2007) | 3 lines Add longintrepr.h to Python.h, so that the compiler can see that PyFalse is really some kind of PyObject*. ................ r56480 | martin.v.loewis | 2007-07-21 10:47:18 +0200 (Sa, 21 Jul 2007) | 2 lines Qualify SHIFT, MASK, BASE. ................ r56482 | martin.v.loewis | 2007-07-21 19:10:57 +0200 (Sa, 21 Jul 2007) | 2 lines Correctly refer to _ob_next. ................