Skip to content

Commit 513cdd9

Browse files
committed
gh-115999: Add PyCodeObject.co_tlbc to the debug offsets
1 parent 4709417 commit 513cdd9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Include/internal/pycore_debug_offsets.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,11 @@ extern "C" {
5252
#ifdef Py_GIL_DISABLED
5353
# define _Py_Debug_gilruntimestate_enabled offsetof(struct _gil_runtime_state, enabled)
5454
# define _Py_Debug_Free_Threaded 1
55+
# define _Py_Debug_code_object_co_tlbc offsetoff(PyCodeObject, co_tlbc)
5556
#else
5657
# define _Py_Debug_gilruntimestate_enabled 0
5758
# define _Py_Debug_Free_Threaded 0
59+
# define _Py_Debug_code_object_co_tlbc 0
5860
#endif
5961

6062

@@ -123,6 +125,7 @@ typedef struct _Py_DebugOffsets {
123125
uint64_t localsplusnames;
124126
uint64_t localspluskinds;
125127
uint64_t co_code_adaptive;
128+
uint64_t co_tlbc;
126129
} code_object;
127130

128131
// PyObject offset;
@@ -277,6 +280,7 @@ typedef struct _Py_DebugOffsets {
277280
.localsplusnames = offsetof(PyCodeObject, co_localsplusnames), \
278281
.localspluskinds = offsetof(PyCodeObject, co_localspluskinds), \
279282
.co_code_adaptive = offsetof(PyCodeObject, co_code_adaptive), \
283+
.co_tlbc = _Py_Debug_code_object_co_tlbc, \
280284
}, \
281285
.pyobject = { \
282286
.size = sizeof(PyObject), \

0 commit comments

Comments
 (0)