Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Avoid comparing the result of a ``sys.monitoring`` callback after

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be a user-facing news entry. Users care about crashes (which could happen here), not about RC :)
Let's rephrase it.

decrementing its reference count.
3 changes: 2 additions & 1 deletion Python/instrumentation.c
Original file line number Diff line number Diff line change
Expand Up @@ -989,8 +989,9 @@ call_one_instrument(
if (res == NULL) {
return -1;
}
int is_disable = (res == &_PyInstrumentation_DISABLE);
Py_DECREF(res);
return (res == &_PyInstrumentation_DISABLE);
return is_disable;
}

static const int8_t MOST_SIGNIFICANT_BITS[16] = {
Expand Down
Loading