Skip to content

Commit 370180d

Browse files
committed
[3.15] gh-158539: Use portable static assertion messages
1 parent 35144d8 commit 370180d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎Modules/_remote_debugging/threads.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@
2323
/* Derive unexported offsets from adjacent fields to keep the debug-offset
2424
* table compatible across patch releases. */
2525
static_assert(offsetof(PyThreadState, exc_info) ==
26-
offsetof(PyThreadState, current_exception) + sizeof(uintptr_t));
26+
offsetof(PyThreadState, current_exception) + sizeof(uintptr_t),
27+
"exc_info must immediately follow current_exception");
2728
static_assert(offsetof(_PyErr_StackItem, previous_item) ==
28-
offsetof(_PyErr_StackItem, exc_value) + sizeof(uintptr_t));
29+
offsetof(_PyErr_StackItem, exc_value) + sizeof(uintptr_t),
30+
"previous_item must immediately follow exc_value");
2931

3032
/* ============================================================================
3133
* THREAD ITERATION FUNCTIONS

0 commit comments

Comments
 (0)