Skip to content

Commit 1835fbb

Browse files
committed
Fix GENERATE_DEBUG_SECTION for clangcl on Windows
1 parent 7473c60 commit 1835fbb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Include/internal/pycore_debug_offsets.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ extern "C" {
2323
declaration \
2424
_GENERATE_DEBUG_SECTION_LINUX(name)
2525

26-
#if defined(MS_WINDOWS) && !defined(__clang__)
26+
// Please note that section names are truncated to eight bytes
27+
// on Windows!
28+
#if defined(MS_WINDOWS)
2729
#define _GENERATE_DEBUG_SECTION_WINDOWS(name) \
2830
_Pragma(Py_STRINGIFY(section(Py_STRINGIFY(name), read, write))) \
2931
__declspec(allocate(Py_STRINGIFY(name)))

Modules/_asynciomodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ typedef struct _Py_AsyncioModuleDebugOffsets {
116116
} asyncio_thread_state;
117117
} Py_AsyncioModuleDebugOffsets;
118118

119-
GENERATE_DEBUG_SECTION(AsyncioDebug, Py_AsyncioModuleDebugOffsets AsyncioDebug)
119+
GENERATE_DEBUG_SECTION(AsyncioDebug, Py_AsyncioModuleDebugOffsets _AsyncioDebug)
120120
= {.asyncio_task_object = {
121121
.size = sizeof(TaskObj),
122122
.task_name = offsetof(TaskObj, task_name),

0 commit comments

Comments
 (0)