| 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 |
uint32_t next_keys_version; |
| 16 |
PyDict_WatchCallback watchers[DICT_MAX_WATCHERS]; |
| 17 |
}; |
| 18 |
|
| 19 |
#define _dict_state_INIT \ |
| 20 |
{ \ |
| 21 |
.next_keys_version = 2, \ |
| 22 |
} |
| 23 |
|
| 24 |
|
| 25 |
#ifdef __cplusplus |
| 26 |
} |
| 27 |
#endif |
| 28 |
#endif /* !Py_INTERNAL_DICT_STATE_H */ |