Debian Codegraph @

Include/internal/pycore_dict_state.h

raw
1 #ifndef Py_INTERNAL_DICT_STATE_H
2 #define Py_INTERNAL_DICT_STATE_H
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6
7 #ifndef Py_BUILD_CORE
8 # error "this header requires Py_BUILD_CORE define"
9 #endif
10
11 #define DICT_MAX_WATCHERS 8
12 #define DICT_WATCHED_MUTATION_BITS 4
13
14 struct _Py_dict_state {
15 /*Global counter used to set ma_version_tag field of dictionary.
16 * It is incremented each time that a dictionary is created and each
17 * time that a dictionary is modified. */
18 uint64_t global_version;
19 uint32_t next_keys_version;
20 PyDict_WatchCallback watchers[DICT_MAX_WATCHERS];
21 };
22
23 #define _dict_state_INIT \
24 { \
25 .next_keys_version = 2, \
26 }
27
28
29 #ifdef __cplusplus
30 }
31 #endif
32 #endif /* !Py_INTERNAL_DICT_STATE_H */