summaryrefslogtreecommitdiffstats
path: root/Objects/dict-common.h
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/dict-common.h')
-rw-r--r--Objects/dict-common.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/Objects/dict-common.h b/Objects/dict-common.h
new file mode 100644
index 0000000..2912eb9
--- /dev/null
+++ b/Objects/dict-common.h
@@ -0,0 +1,22 @@
+#ifndef Py_DICT_COMMON_H
+#define Py_DICT_COMMON_H
+
+typedef struct {
+ /* Cached hash code of me_key. */
+ Py_hash_t me_hash;
+ PyObject *me_key;
+ PyObject *me_value; /* This field is only meaningful for combined tables */
+} PyDictKeyEntry;
+
+typedef PyDictKeyEntry *(*dict_lookup_func)
+(PyDictObject *mp, PyObject *key, Py_hash_t hash, PyObject ***value_addr);
+
+struct _dictkeysobject {
+ Py_ssize_t dk_refcnt;
+ Py_ssize_t dk_size;
+ dict_lookup_func dk_lookup;
+ Py_ssize_t dk_usable;
+ PyDictKeyEntry dk_entries[1];
+};
+
+#endif