/
opt
/
alt
/
python27
/
include
/
python2.7
/
/opt/alt/python27/include/python2.7
mkdir
upload
Name
Size
Mode
Actions
abstract.h
45225
0644
edit
dl
rm
asdl.h
1099
0644
edit
dl
rm
ast.h
230
0644
edit
dl
rm
bitset.h
792
0644
edit
dl
rm
boolobject.h
912
0644
edit
dl
rm
bufferobject.h
922
0644
edit
dl
rm
bytearrayobject.h
1941
0644
edit
dl
rm
bytesobject.h
1152
0644
edit
dl
rm
bytes_methods.h
2804
0644
edit
dl
rm
cellobject.h
651
0644
edit
dl
rm
ceval.h
5061
0644
edit
dl
rm
classobject.h
3002
0644
edit
dl
rm
cobject.h
2930
0644
edit
dl
rm
code.h
4407
0644
edit
dl
rm
codecs.h
6171
0644
edit
dl
rm
compile.h
1065
0644
edit
dl
rm
complexobject.h
1853
0644
edit
dl
rm
cStringIO.h
2005
0644
edit
dl
rm
datetime.h
8313
0644
edit
dl
rm
descrobject.h
2480
0644
edit
dl
rm
dictobject.h
6892
0644
edit
dl
rm
dtoa.h
338
0644
edit
dl
rm
enumobject.h
253
0644
edit
dl
rm
errcode.h
1399
0644
edit
dl
rm
eval.h
557
0644
edit
dl
rm
fileobject.h
3662
0644
edit
dl
rm
floatobject.h
5625
0644
edit
dl
rm
frameobject.h
3254
0644
edit
dl
rm
funcobject.h
2995
0644
edit
dl
rm
genobject.h
891
0644
edit
dl
rm
graminit.h
1917
0644
edit
dl
rm
grammar.h
2051
0644
edit
dl
rm
import.h
2223
0644
edit
dl
rm
intobject.h
2976
0644
edit
dl
rm
intrcheck.h
274
0644
edit
dl
rm
iterobject.h
522
0644
edit
dl
rm
listobject.h
2569
0644
edit
dl
rm
longintrepr.h
3907
0644
edit
dl
rm
longobject.h
5809
0644
edit
dl
rm
marshal.h
713
0644
edit
dl
rm
memoryobject.h
2823
0644
edit
dl
rm
metagrammar.h
253
0644
edit
dl
rm
methodobject.h
3355
0644
edit
dl
rm
modsupport.h
5024
0644
edit
dl
rm
moduleobject.h
609
0644
edit
dl
rm
node.h
938
0644
edit
dl
rm
object.h
40059
0644
edit
dl
rm
objimpl.h
14338
0644
edit
dl
rm
opcode.h
4814
0644
edit
dl
rm
osdefs.h
1059
0644
edit
dl
rm
parsetok.h
1780
0644
edit
dl
rm
patchlevel.h
1450
0644
edit
dl
rm
pgen.h
253
0644
edit
dl
rm
pgenheaders.h
1180
0644
edit
dl
rm
pyarena.h
2693
0644
edit
dl
rm
pycapsule.h
1679
0644
edit
dl
rm
pyconfig-64.h
37841
0644
edit
dl
rm
pyconfig.h
162
0644
edit
dl
rm
pyctype.h
1268
0644
edit
dl
rm
pydebug.h
1322
0644
edit
dl
rm
pyerrors.h
11741
0644
edit
dl
rm
pyexpat.h
2117
0644
edit
dl
rm
pyfpe.h
8471
0644
edit
dl
rm
pygetopt.h
348
0644
edit
dl
rm
pymacconfig.h
2989
0644
edit
dl
rm
pymactoolbox.h
8628
0644
edit
dl
rm
pymath.h
7332
0644
edit
dl
rm
pymem.h
4712
0644
edit
dl
rm
pyport.h
32558
0644
edit
dl
rm
pystate.h
6403
0644
edit
dl
rm
pystrcmp.h
463
0644
edit
dl
rm
pystrtod.h
1582
0644
edit
dl
rm
Python-ast.h
21113
0644
edit
dl
rm
Python.h
4375
0644
edit
dl
rm
pythonrun.h
7234
0644
edit
dl
rm
pythread.h
1155
0644
edit
dl
rm
py_curses.h
4273
0644
edit
dl
rm
rangeobject.h
646
0644
edit
dl
rm
setobject.h
3077
0644
edit
dl
rm
sliceobject.h
1681
0644
edit
dl
rm
stringobject.h
7979
0644
edit
dl
rm
structmember.h
2901
0644
edit
dl
rm
structseq.h
862
0644
edit
dl
rm
symtable.h
3724
0644
edit
dl
rm
sysmodule.h
865
0644
edit
dl
rm
timefuncs.h
541
0644
edit
dl
rm
token.h
1799
0644
edit
dl
rm
traceback.h
697
0644
edit
dl
rm
tupleobject.h
2175
0644
edit
dl
rm
ucnhash.h
924
0644
edit
dl
rm
unicodeobject.h
52227
0644
edit
dl
rm
warnings.h
635
0644
edit
dl
rm
weakrefobject.h
2801
0644
edit
dl
rm
Edit:
/opt/alt/python27/include/python2.7/dictobject.h
(6892B)
#ifndef Py_DICTOBJECT_H #define Py_DICTOBJECT_H #ifdef __cplusplus extern "C" { #endif /* Dictionary object type -- mapping from hashable object to object */ /* The distribution includes a separate file, Objects/dictnotes.txt, describing explorations into dictionary design and optimization. It covers typical dictionary use patterns, the parameters for tuning dictionaries, and several ideas for possible optimizations. */ /* There are three kinds of slots in the table: 1. Unused. me_key == me_value == NULL Does not hold an active (key, value) pair now and never did. Unused can transition to Active upon key insertion. This is the only case in which me_key is NULL, and is each slot's initial state. 2. Active. me_key != NULL and me_key != dummy and me_value != NULL Holds an active (key, value) pair. Active can transition to Dummy upon key deletion. This is the only case in which me_value != NULL. 3. Dummy. me_key == dummy and me_value == NULL Previously held an active (key, value) pair, but that was deleted and an active pair has not yet overwritten the slot. Dummy can transition to Active upon key insertion. Dummy slots cannot be made Unused again (cannot have me_key set to NULL), else the probe sequence in case of collision would have no way to know they were once active. Note: .popitem() abuses the me_hash field of an Unused or Dummy slot to hold a search finger. The me_hash field of Unused or Dummy slots has no meaning otherwise. */ /* PyDict_MINSIZE is the minimum size of a dictionary. This many slots are * allocated directly in the dict object (in the ma_smalltable member). * It must be a power of 2, and at least 4. 8 allows dicts with no more * than 5 active entries to live in ma_smalltable (and so avoid an * additional malloc); instrumentation suggested this suffices for the * majority of dicts (consisting mostly of usually-small instance dicts and * usually-small dicts created to pass keyword arguments). */ #define PyDict_MINSIZE 8 typedef struct { /* Cached hash code of me_key. Note that hash codes are C longs. * We have to use Py_ssize_t instead because dict_popitem() abuses * me_hash to hold a search finger. */ Py_ssize_t me_hash; PyObject *me_key; PyObject *me_value; } PyDictEntry; /* To ensure the lookup algorithm terminates, there must be at least one Unused slot (NULL key) in the table. The value ma_fill is the number of non-NULL keys (sum of Active and Dummy); ma_used is the number of non-NULL, non-dummy keys (== the number of non-NULL values == the number of Active items). To avoid slowing down lookups on a near-full table, we resize the table when it's two-thirds full. */ typedef struct _dictobject PyDictObject; struct _dictobject { PyObject_HEAD Py_ssize_t ma_fill; /* # Active + # Dummy */ Py_ssize_t ma_used; /* # Active */ /* The table contains ma_mask + 1 slots, and that's a power of 2. * We store the mask instead of the size because the mask is more * frequently needed. */ Py_ssize_t ma_mask; /* ma_table points to ma_smalltable for small tables, else to * additional malloc'ed memory. ma_table is never NULL! This rule * saves repeated runtime null-tests in the workhorse getitem and * setitem calls. */ PyDictEntry *ma_table; PyDictEntry *(*ma_lookup)(PyDictObject *mp, PyObject *key, long hash); PyDictEntry ma_smalltable[PyDict_MINSIZE]; }; PyAPI_DATA(PyTypeObject) PyDict_Type; PyAPI_DATA(PyTypeObject) PyDictIterKey_Type; PyAPI_DATA(PyTypeObject) PyDictIterValue_Type; PyAPI_DATA(PyTypeObject) PyDictIterItem_Type; PyAPI_DATA(PyTypeObject) PyDictKeys_Type; PyAPI_DATA(PyTypeObject) PyDictItems_Type; PyAPI_DATA(PyTypeObject) PyDictValues_Type; #define PyDict_Check(op) \ PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_DICT_SUBCLASS) #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type) #define PyDictKeys_Check(op) (Py_TYPE(op) == &PyDictKeys_Type) #define PyDictItems_Check(op) (Py_TYPE(op) == &PyDictItems_Type) #define PyDictValues_Check(op) (Py_TYPE(op) == &PyDictValues_Type) /* This excludes Values, since they are not sets. */ # define PyDictViewSet_Check(op) \ (PyDictKeys_Check(op) || PyDictItems_Check(op)) PyAPI_FUNC(PyObject *) PyDict_New(void); PyAPI_FUNC(PyObject *) PyDict_GetItem(PyObject *mp, PyObject *key); PyAPI_FUNC(PyObject *) _PyDict_GetItemWithError(PyObject *mp, PyObject *key); PyAPI_FUNC(int) PyDict_SetItem(PyObject *mp, PyObject *key, PyObject *item); PyAPI_FUNC(int) PyDict_DelItem(PyObject *mp, PyObject *key); PyAPI_FUNC(int) _PyDict_DelItemIf(PyObject *mp, PyObject *key, int (*predicate)(PyObject *value)); PyAPI_FUNC(void) PyDict_Clear(PyObject *mp); PyAPI_FUNC(int) PyDict_Next( PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value); PyAPI_FUNC(int) _PyDict_Next( PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value, long *hash); PyAPI_FUNC(PyObject *) PyDict_Keys(PyObject *mp); PyAPI_FUNC(PyObject *) PyDict_Values(PyObject *mp); PyAPI_FUNC(PyObject *) PyDict_Items(PyObject *mp); PyAPI_FUNC(Py_ssize_t) PyDict_Size(PyObject *mp); PyAPI_FUNC(PyObject *) PyDict_Copy(PyObject *mp); PyAPI_FUNC(int) PyDict_Contains(PyObject *mp, PyObject *key); PyAPI_FUNC(int) _PyDict_Contains(PyObject *mp, PyObject *key, long hash); PyAPI_FUNC(PyObject *) _PyDict_NewPresized(Py_ssize_t minused); PyAPI_FUNC(void) _PyDict_MaybeUntrack(PyObject *mp); /* PyDict_Update(mp, other) is equivalent to PyDict_Merge(mp, other, 1). */ PyAPI_FUNC(int) PyDict_Update(PyObject *mp, PyObject *other); /* PyDict_Merge updates/merges from a mapping object (an object that supports PyMapping_Keys() and PyObject_GetItem()). If override is true, the last occurrence of a key wins, else the first. The Python dict.update(other) is equivalent to PyDict_Merge(dict, other, 1). */ PyAPI_FUNC(int) PyDict_Merge(PyObject *mp, PyObject *other, int override); /* PyDict_MergeFromSeq2 updates/merges from an iterable object producing iterable objects of length 2. If override is true, the last occurrence of a key wins, else the first. The Python dict constructor dict(seq2) is equivalent to dict={}; PyDict_MergeFromSeq(dict, seq2, 1). */ PyAPI_FUNC(int) PyDict_MergeFromSeq2(PyObject *d, PyObject *seq2, int override); PyAPI_FUNC(PyObject *) PyDict_GetItemString(PyObject *dp, const char *key); PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item); PyAPI_FUNC(int) PyDict_DelItemString(PyObject *dp, const char *key); PyAPI_FUNC(void) _PyDict_DebugMallocStats(FILE *out); #ifdef __cplusplus } #endif #endif /* !Py_DICTOBJECT_H */
Save
cmd:
run