Coverage Report

Created: 2026-07-16 07:04

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/cpython3/Include/cpython/dictobject.h
Line
Count
Source
1
#ifndef Py_CPYTHON_DICTOBJECT_H
2
#  error "this header file must not be included directly"
3
#endif
4
5
typedef struct _dictkeysobject PyDictKeysObject;
6
typedef struct _dictvalues PyDictValues;
7
8
/* The ma_values pointer is NULL for a combined table
9
 * or points to an array of PyObject* for a split table
10
 */
11
typedef struct {
12
    PyObject_HEAD
13
14
    /* Number of items in the dictionary */
15
    Py_ssize_t ma_used;
16
17
    /* This is a private field for CPython's internal use.
18
     * Bits 0-7 are for dict watchers.
19
     * Bits 8-11 are for the watched mutation counter (used by tier2 optimization)
20
     * Bits 12-31 are currently unused
21
     * Bits 32-63 are a unique id in the free threading build (used for per-thread refcounting)
22
     */
23
    uint64_t _ma_watcher_tag;
24
25
    PyDictKeysObject *ma_keys;
26
27
    /* If ma_values is NULL, the table is "combined": keys and values
28
       are stored in ma_keys.
29
30
       If ma_values is not NULL, the table is split:
31
       keys are stored in ma_keys and values are stored in ma_values */
32
    PyDictValues *ma_values;
33
} PyDictObject;
34
35
// frozendict
36
PyAPI_DATA(PyTypeObject) PyFrozenDict_Type;
37
16.4M
#define PyFrozenDict_Check(op) PyObject_TypeCheck((op), &PyFrozenDict_Type)
38
1.09M
#define PyFrozenDict_CheckExact(op) Py_IS_TYPE((op), &PyFrozenDict_Type)
39
40
#define PyAnyDict_CheckExact(ob) \
41
10.7M
    (PyDict_CheckExact(ob) || PyFrozenDict_CheckExact(ob))
42
#define PyAnyDict_Check(ob) \
43
26.6M
    (PyDict_Check(ob) || PyFrozenDict_Check(ob))
44
45
PyAPI_FUNC(PyObject *) _PyDict_GetItem_KnownHash(PyObject *mp, PyObject *key,
46
                                                 Py_hash_t hash);
47
// PyDict_GetItemStringRef() can be used instead
48
Py_DEPRECATED(3.14) PyAPI_FUNC(PyObject *) _PyDict_GetItemStringWithError(PyObject *, const char *);
49
PyAPI_FUNC(PyObject *) PyDict_SetDefault(
50
    PyObject *mp, PyObject *key, PyObject *defaultobj);
51
52
/* Get the number of items of a dictionary. */
53
1.11M
static inline Py_ssize_t PyDict_GET_SIZE(PyObject *op) {
54
1.11M
    PyDictObject *mp;
55
1.11M
    assert(PyAnyDict_Check(op));
56
1.11M
    mp = _Py_CAST(PyDictObject*, op);
57
#ifdef Py_GIL_DISABLED
58
    return _Py_atomic_load_ssize_relaxed(&mp->ma_used);
59
#else
60
1.11M
    return mp->ma_used;
61
1.11M
#endif
62
1.11M
}
Unexecuted instantiation: exceptions.c:PyDict_GET_SIZE
Unexecuted instantiation: genericaliasobject.c:PyDict_GET_SIZE
listobject.c:PyDict_GET_SIZE
Line
Count
Source
53
1.08M
static inline Py_ssize_t PyDict_GET_SIZE(PyObject *op) {
54
1.08M
    PyDictObject *mp;
55
1.08M
    assert(PyAnyDict_Check(op));
56
1.08M
    mp = _Py_CAST(PyDictObject*, op);
57
#ifdef Py_GIL_DISABLED
58
    return _Py_atomic_load_ssize_relaxed(&mp->ma_used);
59
#else
60
1.08M
    return mp->ma_used;
61
1.08M
#endif
62
1.08M
}
Unexecuted instantiation: longobject.c:PyDict_GET_SIZE
Unexecuted instantiation: dictobject.c:PyDict_GET_SIZE
Unexecuted instantiation: moduleobject.c:PyDict_GET_SIZE
Unexecuted instantiation: object.c:PyDict_GET_SIZE
Unexecuted instantiation: obmalloc.c:PyDict_GET_SIZE
Unexecuted instantiation: picklebufobject.c:PyDict_GET_SIZE
Unexecuted instantiation: rangeobject.c:PyDict_GET_SIZE
Unexecuted instantiation: sentinelobject.c:PyDict_GET_SIZE
setobject.c:PyDict_GET_SIZE
Line
Count
Source
53
19.3k
static inline Py_ssize_t PyDict_GET_SIZE(PyObject *op) {
54
19.3k
    PyDictObject *mp;
55
19.3k
    assert(PyAnyDict_Check(op));
56
19.3k
    mp = _Py_CAST(PyDictObject*, op);
57
#ifdef Py_GIL_DISABLED
58
    return _Py_atomic_load_ssize_relaxed(&mp->ma_used);
59
#else
60
19.3k
    return mp->ma_used;
61
19.3k
#endif
62
19.3k
}
Unexecuted instantiation: sliceobject.c:PyDict_GET_SIZE
Unexecuted instantiation: structseq.c:PyDict_GET_SIZE
Unexecuted instantiation: templateobject.c:PyDict_GET_SIZE
Unexecuted instantiation: tupleobject.c:PyDict_GET_SIZE
typeobject.c:PyDict_GET_SIZE
Line
Count
Source
53
35
static inline Py_ssize_t PyDict_GET_SIZE(PyObject *op) {
54
35
    PyDictObject *mp;
55
35
    assert(PyAnyDict_Check(op));
56
35
    mp = _Py_CAST(PyDictObject*, op);
57
#ifdef Py_GIL_DISABLED
58
    return _Py_atomic_load_ssize_relaxed(&mp->ma_used);
59
#else
60
35
    return mp->ma_used;
61
35
#endif
62
35
}
Unexecuted instantiation: typevarobject.c:PyDict_GET_SIZE
Unexecuted instantiation: unicode_formatter.c:PyDict_GET_SIZE
Unexecuted instantiation: unicode_writer.c:PyDict_GET_SIZE
Unexecuted instantiation: unicodectype.c:PyDict_GET_SIZE
Unexecuted instantiation: unicodeobject.c:PyDict_GET_SIZE
Unexecuted instantiation: unionobject.c:PyDict_GET_SIZE
Unexecuted instantiation: weakrefobject.c:PyDict_GET_SIZE
Unexecuted instantiation: _warnings.c:PyDict_GET_SIZE
Unexecuted instantiation: bltinmodule.c:PyDict_GET_SIZE
ceval.c:PyDict_GET_SIZE
Line
Count
Source
53
129
static inline Py_ssize_t PyDict_GET_SIZE(PyObject *op) {
54
129
    PyDictObject *mp;
55
129
    assert(PyAnyDict_Check(op));
56
129
    mp = _Py_CAST(PyDictObject*, op);
57
#ifdef Py_GIL_DISABLED
58
    return _Py_atomic_load_ssize_relaxed(&mp->ma_used);
59
#else
60
129
    return mp->ma_used;
61
129
#endif
62
129
}
Unexecuted instantiation: codecs.c:PyDict_GET_SIZE
Unexecuted instantiation: codegen.c:PyDict_GET_SIZE
compile.c:PyDict_GET_SIZE
Line
Count
Source
53
90
static inline Py_ssize_t PyDict_GET_SIZE(PyObject *op) {
54
90
    PyDictObject *mp;
55
90
    assert(PyAnyDict_Check(op));
56
90
    mp = _Py_CAST(PyDictObject*, op);
57
#ifdef Py_GIL_DISABLED
58
    return _Py_atomic_load_ssize_relaxed(&mp->ma_used);
59
#else
60
90
    return mp->ma_used;
61
90
#endif
62
90
}
Unexecuted instantiation: context.c:PyDict_GET_SIZE
Unexecuted instantiation: errors.c:PyDict_GET_SIZE
flowgraph.c:PyDict_GET_SIZE
Line
Count
Source
53
260
static inline Py_ssize_t PyDict_GET_SIZE(PyObject *op) {
54
260
    PyDictObject *mp;
55
260
    assert(PyAnyDict_Check(op));
56
260
    mp = _Py_CAST(PyDictObject*, op);
57
#ifdef Py_GIL_DISABLED
58
    return _Py_atomic_load_ssize_relaxed(&mp->ma_used);
59
#else
60
260
    return mp->ma_used;
61
260
#endif
62
260
}
Unexecuted instantiation: frame.c:PyDict_GET_SIZE
Unexecuted instantiation: future.c:PyDict_GET_SIZE
Unexecuted instantiation: gc.c:PyDict_GET_SIZE
Unexecuted instantiation: gc_gil.c:PyDict_GET_SIZE
getargs.c:PyDict_GET_SIZE
Line
Count
Source
53
159
static inline Py_ssize_t PyDict_GET_SIZE(PyObject *op) {
54
159
    PyDictObject *mp;
55
159
    assert(PyAnyDict_Check(op));
56
159
    mp = _Py_CAST(PyDictObject*, op);
57
#ifdef Py_GIL_DISABLED
58
    return _Py_atomic_load_ssize_relaxed(&mp->ma_used);
59
#else
60
159
    return mp->ma_used;
61
159
#endif
62
159
}
Unexecuted instantiation: ceval_gil.c:PyDict_GET_SIZE
Unexecuted instantiation: hamt.c:PyDict_GET_SIZE
Unexecuted instantiation: hashtable.c:PyDict_GET_SIZE
Unexecuted instantiation: import.c:PyDict_GET_SIZE
Unexecuted instantiation: importdl.c:PyDict_GET_SIZE
Unexecuted instantiation: initconfig.c:PyDict_GET_SIZE
Unexecuted instantiation: instrumentation.c:PyDict_GET_SIZE
Unexecuted instantiation: instruction_sequence.c:PyDict_GET_SIZE
Unexecuted instantiation: intrinsics.c:PyDict_GET_SIZE
Unexecuted instantiation: legacy_tracing.c:PyDict_GET_SIZE
Unexecuted instantiation: lock.c:PyDict_GET_SIZE
Unexecuted instantiation: marshal.c:PyDict_GET_SIZE
Unexecuted instantiation: modsupport.c:PyDict_GET_SIZE
Unexecuted instantiation: mysnprintf.c:PyDict_GET_SIZE
Unexecuted instantiation: parking_lot.c:PyDict_GET_SIZE
Unexecuted instantiation: preconfig.c:PyDict_GET_SIZE
Unexecuted instantiation: pyarena.c:PyDict_GET_SIZE
Unexecuted instantiation: pyctype.c:PyDict_GET_SIZE
Unexecuted instantiation: pyhash.c:PyDict_GET_SIZE
Unexecuted instantiation: pylifecycle.c:PyDict_GET_SIZE
Unexecuted instantiation: pystate.c:PyDict_GET_SIZE
Unexecuted instantiation: pythonrun.c:PyDict_GET_SIZE
Unexecuted instantiation: pytime.c:PyDict_GET_SIZE
Unexecuted instantiation: qsbr.c:PyDict_GET_SIZE
Unexecuted instantiation: bootstrap_hash.c:PyDict_GET_SIZE
Unexecuted instantiation: specialize.c:PyDict_GET_SIZE
Unexecuted instantiation: slots.c:PyDict_GET_SIZE
Unexecuted instantiation: slots_generated.c:PyDict_GET_SIZE
Unexecuted instantiation: structmember.c:PyDict_GET_SIZE
Unexecuted instantiation: symtable.c:PyDict_GET_SIZE
Unexecuted instantiation: sysmodule.c:PyDict_GET_SIZE
Unexecuted instantiation: thread.c:PyDict_GET_SIZE
Unexecuted instantiation: traceback.c:PyDict_GET_SIZE
Unexecuted instantiation: tracemalloc.c:PyDict_GET_SIZE
Unexecuted instantiation: getopt.c:PyDict_GET_SIZE
Unexecuted instantiation: pystrcmp.c:PyDict_GET_SIZE
Unexecuted instantiation: pystrtod.c:PyDict_GET_SIZE
Unexecuted instantiation: dtoa.c:PyDict_GET_SIZE
Unexecuted instantiation: fileutils.c:PyDict_GET_SIZE
Unexecuted instantiation: suggestions.c:PyDict_GET_SIZE
Unexecuted instantiation: perf_trampoline.c:PyDict_GET_SIZE
Unexecuted instantiation: perf_jit_trampoline.c:PyDict_GET_SIZE
Unexecuted instantiation: jit_unwind.c:PyDict_GET_SIZE
Unexecuted instantiation: remote_debugging.c:PyDict_GET_SIZE
Unexecuted instantiation: dynload_shlib.c:PyDict_GET_SIZE
Unexecuted instantiation: config.c:PyDict_GET_SIZE
Unexecuted instantiation: gcmodule.c:PyDict_GET_SIZE
Unexecuted instantiation: _asynciomodule.c:PyDict_GET_SIZE
Unexecuted instantiation: atexitmodule.c:PyDict_GET_SIZE
Unexecuted instantiation: faulthandler.c:PyDict_GET_SIZE
Unexecuted instantiation: posixmodule.c:PyDict_GET_SIZE
Unexecuted instantiation: signalmodule.c:PyDict_GET_SIZE
Unexecuted instantiation: _tracemalloc.c:PyDict_GET_SIZE
Unexecuted instantiation: _suggestions.c:PyDict_GET_SIZE
Unexecuted instantiation: _datetimemodule.c:PyDict_GET_SIZE
Unexecuted instantiation: _codecsmodule.c:PyDict_GET_SIZE
Unexecuted instantiation: _collectionsmodule.c:PyDict_GET_SIZE
Unexecuted instantiation: _iomodule.c:PyDict_GET_SIZE
Unexecuted instantiation: iobase.c:PyDict_GET_SIZE
Unexecuted instantiation: fileio.c:PyDict_GET_SIZE
Unexecuted instantiation: bytesio.c:PyDict_GET_SIZE
Unexecuted instantiation: bufferedio.c:PyDict_GET_SIZE
textio.c:PyDict_GET_SIZE
Line
Count
Source
53
3
static inline Py_ssize_t PyDict_GET_SIZE(PyObject *op) {
54
3
    PyDictObject *mp;
55
3
    assert(PyAnyDict_Check(op));
56
3
    mp = _Py_CAST(PyDictObject*, op);
57
#ifdef Py_GIL_DISABLED
58
    return _Py_atomic_load_ssize_relaxed(&mp->ma_used);
59
#else
60
3
    return mp->ma_used;
61
3
#endif
62
3
}
Unexecuted instantiation: stringio.c:PyDict_GET_SIZE
Unexecuted instantiation: itertoolsmodule.c:PyDict_GET_SIZE
sre.c:PyDict_GET_SIZE
Line
Count
Source
53
2.25k
static inline Py_ssize_t PyDict_GET_SIZE(PyObject *op) {
54
2.25k
    PyDictObject *mp;
55
2.25k
    assert(PyAnyDict_Check(op));
56
2.25k
    mp = _Py_CAST(PyDictObject*, op);
57
#ifdef Py_GIL_DISABLED
58
    return _Py_atomic_load_ssize_relaxed(&mp->ma_used);
59
#else
60
2.25k
    return mp->ma_used;
61
2.25k
#endif
62
2.25k
}
Unexecuted instantiation: _sysconfig.c:PyDict_GET_SIZE
Unexecuted instantiation: _threadmodule.c:PyDict_GET_SIZE
Unexecuted instantiation: timemodule.c:PyDict_GET_SIZE
Unexecuted instantiation: _typesmodule.c:PyDict_GET_SIZE
Unexecuted instantiation: _typingmodule.c:PyDict_GET_SIZE
Unexecuted instantiation: _weakref.c:PyDict_GET_SIZE
Unexecuted instantiation: _abc.c:PyDict_GET_SIZE
_functoolsmodule.c:PyDict_GET_SIZE
Line
Count
Source
53
3
static inline Py_ssize_t PyDict_GET_SIZE(PyObject *op) {
54
3
    PyDictObject *mp;
55
3
    assert(PyAnyDict_Check(op));
56
3
    mp = _Py_CAST(PyDictObject*, op);
57
#ifdef Py_GIL_DISABLED
58
    return _Py_atomic_load_ssize_relaxed(&mp->ma_used);
59
#else
60
3
    return mp->ma_used;
61
3
#endif
62
3
}
Unexecuted instantiation: _localemodule.c:PyDict_GET_SIZE
Unexecuted instantiation: _opcode.c:PyDict_GET_SIZE
Unexecuted instantiation: _operator.c:PyDict_GET_SIZE
Unexecuted instantiation: symtablemodule.c:PyDict_GET_SIZE
Unexecuted instantiation: pwdmodule.c:PyDict_GET_SIZE
Unexecuted instantiation: getpath.c:PyDict_GET_SIZE
Unexecuted instantiation: frozen.c:PyDict_GET_SIZE
Unexecuted instantiation: getbuildinfo.c:PyDict_GET_SIZE
Unexecuted instantiation: peg_api.c:PyDict_GET_SIZE
Unexecuted instantiation: file_tokenizer.c:PyDict_GET_SIZE
Unexecuted instantiation: helpers.c:PyDict_GET_SIZE
Unexecuted instantiation: myreadline.c:PyDict_GET_SIZE
Unexecuted instantiation: abstract.c:PyDict_GET_SIZE
Unexecuted instantiation: boolobject.c:PyDict_GET_SIZE
Unexecuted instantiation: bytes_methods.c:PyDict_GET_SIZE
Unexecuted instantiation: bytearrayobject.c:PyDict_GET_SIZE
Unexecuted instantiation: bytesobject.c:PyDict_GET_SIZE
call.c:PyDict_GET_SIZE
Line
Count
Source
53
4.31k
static inline Py_ssize_t PyDict_GET_SIZE(PyObject *op) {
54
4.31k
    PyDictObject *mp;
55
4.31k
    assert(PyAnyDict_Check(op));
56
4.31k
    mp = _Py_CAST(PyDictObject*, op);
57
#ifdef Py_GIL_DISABLED
58
    return _Py_atomic_load_ssize_relaxed(&mp->ma_used);
59
#else
60
4.31k
    return mp->ma_used;
61
4.31k
#endif
62
4.31k
}
Unexecuted instantiation: capsule.c:PyDict_GET_SIZE
Unexecuted instantiation: cellobject.c:PyDict_GET_SIZE
Unexecuted instantiation: classobject.c:PyDict_GET_SIZE
Unexecuted instantiation: codeobject.c:PyDict_GET_SIZE
Unexecuted instantiation: complexobject.c:PyDict_GET_SIZE
Unexecuted instantiation: descrobject.c:PyDict_GET_SIZE
Unexecuted instantiation: enumobject.c:PyDict_GET_SIZE
Unexecuted instantiation: genobject.c:PyDict_GET_SIZE
Unexecuted instantiation: fileobject.c:PyDict_GET_SIZE
Unexecuted instantiation: floatobject.c:PyDict_GET_SIZE
Unexecuted instantiation: frameobject.c:PyDict_GET_SIZE
Unexecuted instantiation: funcobject.c:PyDict_GET_SIZE
Unexecuted instantiation: interpolationobject.c:PyDict_GET_SIZE
Unexecuted instantiation: iterobject.c:PyDict_GET_SIZE
Unexecuted instantiation: lazyimportobject.c:PyDict_GET_SIZE
Unexecuted instantiation: odictobject.c:PyDict_GET_SIZE
Unexecuted instantiation: memoryobject.c:PyDict_GET_SIZE
Unexecuted instantiation: methodobject.c:PyDict_GET_SIZE
Unexecuted instantiation: namespaceobject.c:PyDict_GET_SIZE
Unexecuted instantiation: unicode_format.c:PyDict_GET_SIZE
Unexecuted instantiation: _contextvars.c:PyDict_GET_SIZE
Unexecuted instantiation: Python-ast.c:PyDict_GET_SIZE
Unexecuted instantiation: Python-tokenize.c:PyDict_GET_SIZE
Unexecuted instantiation: asdl.c:PyDict_GET_SIZE
assemble.c:PyDict_GET_SIZE
Line
Count
Source
53
40
static inline Py_ssize_t PyDict_GET_SIZE(PyObject *op) {
54
40
    PyDictObject *mp;
55
40
    assert(PyAnyDict_Check(op));
56
40
    mp = _Py_CAST(PyDictObject*, op);
57
#ifdef Py_GIL_DISABLED
58
    return _Py_atomic_load_ssize_relaxed(&mp->ma_used);
59
#else
60
40
    return mp->ma_used;
61
40
#endif
62
40
}
Unexecuted instantiation: ast.c:PyDict_GET_SIZE
Unexecuted instantiation: ast_preprocess.c:PyDict_GET_SIZE
Unexecuted instantiation: ast_unparse.c:PyDict_GET_SIZE
Unexecuted instantiation: critical_section.c:PyDict_GET_SIZE
Unexecuted instantiation: crossinterp.c:PyDict_GET_SIZE
Unexecuted instantiation: getcopyright.c:PyDict_GET_SIZE
Unexecuted instantiation: getplatform.c:PyDict_GET_SIZE
Unexecuted instantiation: getversion.c:PyDict_GET_SIZE
Unexecuted instantiation: optimizer.c:PyDict_GET_SIZE
Unexecuted instantiation: pathconfig.c:PyDict_GET_SIZE
Unexecuted instantiation: pymath.c:PyDict_GET_SIZE
Unexecuted instantiation: pystrhex.c:PyDict_GET_SIZE
Unexecuted instantiation: pegen.c:PyDict_GET_SIZE
Unexecuted instantiation: pegen_errors.c:PyDict_GET_SIZE
Unexecuted instantiation: parser.c:PyDict_GET_SIZE
Unexecuted instantiation: buffer.c:PyDict_GET_SIZE
Unexecuted instantiation: lexer.c:PyDict_GET_SIZE
Unexecuted instantiation: number.c:PyDict_GET_SIZE
Unexecuted instantiation: state.c:PyDict_GET_SIZE
Unexecuted instantiation: string.c:PyDict_GET_SIZE
Unexecuted instantiation: readline_tokenizer.c:PyDict_GET_SIZE
Unexecuted instantiation: string_tokenizer.c:PyDict_GET_SIZE
Unexecuted instantiation: utf8_tokenizer.c:PyDict_GET_SIZE
Unexecuted instantiation: getcompiler.c:PyDict_GET_SIZE
Unexecuted instantiation: mystrtoul.c:PyDict_GET_SIZE
Unexecuted instantiation: token.c:PyDict_GET_SIZE
Unexecuted instantiation: action_helpers.c:PyDict_GET_SIZE
Unexecuted instantiation: string_parser.c:PyDict_GET_SIZE
63
1.11M
#define PyDict_GET_SIZE(op) PyDict_GET_SIZE(_PyObject_CAST(op))
64
65
PyAPI_FUNC(int) PyDict_ContainsString(PyObject *mp, const char *key);
66
67
PyAPI_FUNC(PyObject *) _PyDict_NewPresized(Py_ssize_t minused);
68
69
PyAPI_FUNC(int) PyDict_Pop(PyObject *dict, PyObject *key, PyObject **result);
70
PyAPI_FUNC(int) PyDict_PopString(PyObject *dict, const char *key, PyObject **result);
71
72
// Use PyDict_Pop() instead
73
Py_DEPRECATED(3.14) PyAPI_FUNC(PyObject *) _PyDict_Pop(
74
    PyObject *dict,
75
    PyObject *key,
76
    PyObject *default_value);
77
78
/* Dictionary watchers */
79
80
#define PY_FOREACH_DICT_EVENT(V) \
81
0
    V(ADDED)                     \
82
0
    V(MODIFIED)                  \
83
0
    V(DELETED)                   \
84
0
    V(CLONED)                    \
85
0
    V(CLEARED)                   \
86
0
    V(DEALLOCATED)
87
88
typedef enum {
89
    #define PY_DEF_EVENT(EVENT) PyDict_EVENT_##EVENT,
90
    PY_FOREACH_DICT_EVENT(PY_DEF_EVENT)
91
    #undef PY_DEF_EVENT
92
} PyDict_WatchEvent;
93
94
// Callback to be invoked when a watched dict is cleared, dealloced, or modified.
95
// In clear/dealloc case, key and new_value will be NULL. Otherwise, new_value will be the
96
// new value for key, NULL if key is being deleted.
97
typedef int(*PyDict_WatchCallback)(PyDict_WatchEvent event, PyObject* dict, PyObject* key, PyObject* new_value);
98
99
// Register/unregister a dict-watcher callback
100
PyAPI_FUNC(int) PyDict_AddWatcher(PyDict_WatchCallback callback);
101
PyAPI_FUNC(int) PyDict_ClearWatcher(int watcher_id);
102
103
// Mark given dictionary as "watched" (callback will be called if it is modified)
104
PyAPI_FUNC(int) PyDict_Watch(int watcher_id, PyObject* dict);
105
PyAPI_FUNC(int) PyDict_Unwatch(int watcher_id, PyObject* dict);
106
107
// Create a frozendict. Create an empty dictionary if iterable is NULL.
108
PyAPI_FUNC(PyObject*) PyFrozenDict_New(PyObject *iterable);