Skip to content
Merged
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
6 changes: 6 additions & 0 deletions Modules/_asynciomodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ typedef struct {
/* Counter for autogenerated Task names */
uint64_t task_name_counter;

/* Pointer to the asyncio debug offset to avoid it to be optimized away
by the compiler */
void *debug_offsets;
Copy link
Member

Choose a reason for hiding this comment

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

Then we'd even do not need the __attribute__((used)) any longer in the GENERATE_DEBUG_SECTION macros.
But it doesn't hurt either - so let's keep it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I still prefer to keep it


} asyncio_state;

static inline asyncio_state *
Expand Down Expand Up @@ -4320,6 +4324,8 @@ module_init(asyncio_state *state)
goto fail;
}

state->debug_offsets = &_AsyncioDebug;

Py_DECREF(module);
return 0;

Expand Down
Loading