summaryrefslogtreecommitdiff
path: root/Include/internal/pycore_interp.h
diff options
context:
space:
mode:
authormpage <mpage@cs.stanford.edu>2022-11-22 04:06:44 -0800
committerGitHub <noreply@github.com>2022-11-22 13:06:44 +0100
commit3db0a21f731cec28a89f7495a82ee2670bce75fe (patch)
tree4a4cc72b265076d18d9dd4ec22d9e5013425cffc /Include/internal/pycore_interp.h
parent20d9749a0f9b9fa6946019f04a54b6287d16588e (diff)
downloadcpython-git-3db0a21f731cec28a89f7495a82ee2670bce75fe.tar.gz
gh-91053: Add an optional callback that is invoked whenever a function is modified (#98175)
Diffstat (limited to 'Include/internal/pycore_interp.h')
-rw-r--r--Include/internal/pycore_interp.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/internal/pycore_interp.h b/Include/internal/pycore_interp.h
index 437bf74b77..532b284990 100644
--- a/Include/internal/pycore_interp.h
+++ b/Include/internal/pycore_interp.h
@@ -17,6 +17,7 @@ extern "C" {
#include "pycore_dict_state.h" // struct _Py_dict_state
#include "pycore_exceptions.h" // struct _Py_exc_state
#include "pycore_floatobject.h" // struct _Py_float_state
+#include "pycore_function.h" // FUNC_MAX_WATCHERS
#include "pycore_genobject.h" // struct _Py_async_gen_state
#include "pycore_gc.h" // struct _gc_runtime_state
#include "pycore_list.h" // struct _Py_list_state
@@ -171,6 +172,11 @@ struct _is {
// Initialized to _PyEval_EvalFrameDefault().
_PyFrameEvalFunction eval_frame;
+ PyDict_WatchCallback dict_watchers[DICT_MAX_WATCHERS];
+ PyFunction_WatchCallback func_watchers[FUNC_MAX_WATCHERS];
+ // One bit is set for each non-NULL entry in func_watchers
+ uint8_t active_func_watchers;
+
Py_ssize_t co_extra_user_count;
freefunc co_extra_freefuncs[MAX_CO_EXTRA_USERS];