summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2023-07-28 09:53:33 (GMT)
committerGitHub <noreply@github.com>2023-07-28 09:53:33 (GMT)
commit0902afbae29ef88bf9d212a7e11f9f17b6cbdeb5 (patch)
treeeeada04f808fc41bfeb35fb8ac87dd3297c9a037 /Include
parent3b1a4c18426c78a2fda0d59728bfe9eb92889722 (diff)
downloadcpython-0902afbae29ef88bf9d212a7e11f9f17b6cbdeb5.zip
cpython-0902afbae29ef88bf9d212a7e11f9f17b6cbdeb5.tar.gz
cpython-0902afbae29ef88bf9d212a7e11f9f17b6cbdeb5.tar.bz2
[3.12] GH-106895: Raise a `ValueError` when attempting to disable events that cannot be disabled. (GH-107337) (GH-107351)
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_instruments.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Include/internal/pycore_instruments.h b/Include/internal/pycore_instruments.h
index cfa5d09..ccccd54 100644
--- a/Include/internal/pycore_instruments.h
+++ b/Include/internal/pycore_instruments.h
@@ -28,7 +28,8 @@ extern "C" {
#define PY_MONITORING_EVENT_BRANCH 8
#define PY_MONITORING_EVENT_STOP_ITERATION 9
-#define PY_MONITORING_INSTRUMENTED_EVENTS 10
+#define PY_MONITORING_IS_INSTRUMENTED_EVENT(ev) \
+ ((ev) <= PY_MONITORING_EVENT_STOP_ITERATION)
/* Other events, mainly exceptions */