Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Make DECREMENT_ADAPTIVE_COUNTER fail at compile time
  • Loading branch information
swtaarrs committed Feb 29, 2024
commit 4c4400abdecf8aefdbffec6186a95961bf0d8f52
8 changes: 4 additions & 4 deletions Python/ceval_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,10 @@ GETITEM(PyObject *v, Py_ssize_t i) {
(((COUNTER) >> ADAPTIVE_BACKOFF_BITS) == ((1 << MAX_BACKOFF_VALUE) - 1))

#ifdef Py_GIL_DISABLED
#define DECREMENT_ADAPTIVE_COUNTER(COUNTER) \
do { \
/* gh-115999 tracks progress on addressing this. */ \
Py_FatalError("The adaptive interpreter is not thread-safe"); \
#define DECREMENT_ADAPTIVE_COUNTER(COUNTER) \
do { \
/* gh-115999 tracks progress on addressing this. */ \
static_assert(0, "The specializing interpreter is not yet thread-safe"); \
} while (0);
#else
#define DECREMENT_ADAPTIVE_COUNTER(COUNTER) \
Expand Down