summaryrefslogtreecommitdiffstats
path: root/Include/dictobject.h
Commit message (Collapse)AuthorAgeFilesLines
* Untabify C files. Will watch buildbots.Antoine Pitrou2010-05-091-32/+32
|
* Issue #1967: Backport dictionary views.Alexandre Vassalotti2010-01-111-0/+12
|
* Issue #4688: Add a heuristic so that tuples and dicts containing onlyAntoine Pitrou2009-03-231-0/+1
| | | | | | | | | 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)
* #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and ↵Christian Heimes2007-12-191-2/+2
| | | | Py_REFCNT. Macros for b/w compatibility are available.
* Give meaning to the oparg for BUILD_MAP: estimated size of the dictionary.Raymond Hettinger2007-12-181-0/+1
| | | | | | | | | | | 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.
* PEP 3123: Provide forward compatibility with Python 3.0, while keepingMartin v. Löwis2007-07-211-2/+2
| | | | | backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
* Variation of patch # 1624059 to speed up checking if an object is a subclassNeal Norwitz2007-02-251-1/+2
| | | | | | | | | | | | | | | | | | of some of the common builtin types. Use a bit in tp_flags for each common builtin type. Check the bit to determine if any instance is a subclass of these common types. The check avoids a function call and O(n) search of the base classes. The check is done in the various Py*_Check macros rather than calling PyType_IsSubtype(). All the bits are set in tp_flags when the type is declared in the Objects/*object.c files because PyType_Ready() is not called for all the types. Should PyType_Ready() be called for all types? If so and the change is made, the changes to the Objects/*object.c files can be reverted (remove setting the tp_flags). Objects/typeobject.c would also have to be modified to add conditions for Py*_CheckExact() in addition to each the PyType_IsSubtype check.
* Extend work on revision 52962: Eliminate redundant calls to PyObject_Hash().Raymond Hettinger2007-02-191-0/+3
|
* Convert relevant dict internals to Py_ssize_t.Tim Peters2006-05-301-5/+9
| | | | | | I don't have a box with nearly enough RAM, or an OS, that could get close to tickling this, though (requires a dict w/ at least 2**31 entries).
* Merge ssize_t branch.Martin v. Löwis2006-02-151-2/+2
|
* Fix name problem in previous checkin: Dict not ListJeremy Hylton2003-12-261-1/+1
|
* At 2.2, the Py<type>_Check() family of API functions (macros) changedAndrew MacIntyre2003-12-261-0/+1
| | | | | | | | | | | | semantics to include subtypes. Most concrete object APIs then had a Py<type>_CheckExact() macro added to test for an object's type not including subtypes. The PyDict_CheckExact() macro wasn't created at that time, so I've added it for API completeness/symmetry - even though nobody has complained about its absence in the time since 2.2 was released. Not a backport candidate.
* reverting 2.29: the patch was Ok, but the commit msg wrongAndrew MacIntyre2003-12-261-1/+0
|
* The semantics of PyList_Check() and PyDict_Check() changed at 2.2, alongAndrew MacIntyre2003-12-261-0/+1
| | | | | | | | | with most other concrete object checks, but the docs weren't brought into line. PyList_CheckExact() was added at 2.2 but never documented. backport candidate.
* Expose dict_contains() and PyDict_Contains() with is about 10% fasterRaymond Hettinger2003-11-251-0/+1
| | | | | | | than PySequence_Contains() and more clearly applicable to dicts. Apply the new function in setobject.c where __contains__ checking is ubiquitous.
* Add a reference to dictnotes.txt. It does no good if you don't know it'sRaymond Hettinger2003-05-031-0/+6
| | | | there or where to find it.
* Constify char* API. Fixes #651363. 2.2 candidate.Martin v. Löwis2002-12-111-3/+3
|
* Excise DL_EXPORT from Include.Mark Hammond2002-08-121-19/+19
| | | | Thanks to Skip Montanaro and Kalle Svensson for the patches.
* Get rid of USE_CACHE_ALIGNED. It has no function anymore.Jack Jansen2002-04-111-3/+0
|
* SF bug #491415 PyDict_UpdateFromSeq2() unusedTim Peters2001-12-111-1/+19
| | | | | | | PyDict_UpdateFromSeq2(): removed it. PyDict_MergeFromSeq2(): made it public and documented it. PyDict_Merge() docs: updated to reveal <wink> that the second argument can be any mapping object.
* Add PyDict_Merge(a, b, override):Guido van Rossum2001-08-101-0/+1
| | | | | | PyDict_Merge(a, b, 1) is the same as PyDict_Update(a, b). PyDict_Merge(a, b, 0) does something similar but leaves existing items unchanged.
* Merge of descr-branch back into trunk.Tim Peters2001-08-021-1/+76
|
* REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum2000-09-011-9/+0
| | | | This should match the situation in the 1.6b1 tree.
* Removed Py_PROTO and switched to ANSI C declarations in the dictTim Peters2000-07-041-14/+14
| | | | | | | implementation. This was really to test whether my new CVS+SSH setup is more usable than the old one -- and turns out it is (for whatever reason, it was impossible to do a commit before that involved more than one directory).
* Change copyright notice - 2nd try.Guido van Rossum2000-06-301-6/+0
|
* Change copyright notice.Guido van Rossum2000-06-301-21/+6
|
* Add PyDict_Copy() function to C API for dicts. It returns a newJeremy Hylton2000-03-301-0/+2
| | | | dictionary that contains the same key/value pairs as p.
* Add DL_IMPORT(returntype) for all officially exported functions.Guido van Rossum1998-12-041-14/+14
|
* Subsumed mappingobject.h in dictobject.h.Guido van Rossum1997-05-131-3/+21
|
* New permission notice, includes CNRI.Guido van Rossum1996-10-251-13/+20
|
* new names for lots of new functionsGuido van Rossum1995-01-171-14/+0
|
* The great renaming, phase two: all header files have been updated toGuido van Rossum1995-01-121-9/+9
| | | | | | | use the new names exclusively, and the linker will see the new names. Files that import "Python.h" also only see the new names. Files that import "allobjects.h" will continue to be able to use the old names, due to the inclusion (in allobjects.h) of "rename2.h".
* Added 1995 copyright.Guido van Rossum1995-01-041-2/+2
| | | | | | object.h: made sizes and refcnts signed ints. stringobject.h: make getstrsize() signed int. methodobject.h: add METH_VARARGS and METH_FREENAME flag bit definitions.
* Merge alpha100 branch back to main trunkGuido van Rossum1994-08-011-1/+1
|
* * Added support for X11 modules.Guido van Rossum1993-07-281-0/+11
| | | | | | | * Makefile: change location of FORMS library. * posixmodule.c: turn #if 0 into #ifdef MSDOS (stuff in unistd.h or not) * Almost all .h files: added CPP magic to avoid duplicate inclusions and to support inclusion from C++.
* Several changes in one:Guido van Rossum1993-05-191-3/+0
| | | | | | | | | | | | | | | | (1) dictionaries/mappings now have attributes values() and items() as well as keys(); at the C level, use the new function mappinggetnext() to iterate over a dictionary. (2) "class C(): ..." is now illegal; you must write "class C: ...". (3) Class objects now know their own name (finally!); and minor improvements to the way how classes, functions and methods are represented as strings. (4) Added an "access" statement and semantics. (This is still experimental -- as long as you don't use the keyword 'access' nothing should be changed.)
* * Changed all copyright messages to include 1993.Guido van Rossum1993-03-291-19/+14
| | | | | | | | | | | | | | | | | * Stubs for faster implementation of local variables (not yet finished) * Added function name to code object. Print it for code and function objects. THIS MAKES THE .PYC FILE FORMAT INCOMPATIBLE (the version number has changed accordingly) * Print address of self for built-in methods * New internal functions getattro and setattro (getattr/setattr with string object arg) * Replaced "dictobject" with more powerful "mappingobject" * New per-type functio tp_hash to implement arbitrary object hashing, and hashobject() to interface to it * Added built-in functions hash(v) and hasattr(v, 'name') * classobject: made some functions static that accidentally weren't; added __hash__ special instance method to implement hash() * Added proper comparison for built-in methods and functions
* Copyright for 1992 addedGuido van Rossum1992-04-051-1/+1
|
* Added/moved dict2 interfaces.Guido van Rossum1991-08-161-1/+3
|
* Export getdict2key() interface.Guido van Rossum1991-06-071-0/+1
|
* Added declaration for dict2insert.Guido van Rossum1991-04-031-0/+2
|
* Added copyright notice.Guido van Rossum1991-02-191-0/+24
|
* Added getdictkeys() prototype.Guido van Rossum1990-10-301-0/+1
|
* Remove dict2 interface -- it's now static.Guido van Rossum1990-10-141-6/+0
|
* Initial revisionGuido van Rossum1990-10-141-0/+25