2022-11-16 13:37:29 -04:00
|
|
|
#ifndef Py_INTERNAL_DICT_STATE_H
|
|
|
|
#define Py_INTERNAL_DICT_STATE_H
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef Py_BUILD_CORE
|
|
|
|
# error "this header requires Py_BUILD_CORE define"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define DICT_MAX_WATCHERS 8
|
2024-02-02 08:14:34 -04:00
|
|
|
#define DICT_WATCHED_MUTATION_BITS 4
|
2022-11-16 13:37:29 -04:00
|
|
|
|
|
|
|
struct _Py_dict_state {
|
2023-03-08 21:04:16 -04:00
|
|
|
uint32_t next_keys_version;
|
2022-11-16 13:37:29 -04:00
|
|
|
PyDict_WatchCallback watchers[DICT_MAX_WATCHERS];
|
|
|
|
};
|
|
|
|
|
2023-05-10 10:28:40 -03:00
|
|
|
#define _dict_state_INIT \
|
|
|
|
{ \
|
|
|
|
.next_keys_version = 2, \
|
|
|
|
}
|
|
|
|
|
2022-11-16 13:37:29 -04:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* !Py_INTERNAL_DICT_STATE_H */
|