File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,9 +34,13 @@ typedef struct {
3434 char * entries [1 ];
3535} _PyCodeArray ;
3636
37+ #define _PyCode_DEF_UNIQUE_ID () \
38+ Py_ssize_t _co_unique_id; /* ID used for per-thread refcounting */
39+
3740#define _PyCode_DEF_THREAD_LOCAL_BYTECODE () \
3841 _PyCodeArray *co_tlbc;
3942#else
43+ #define _PyCode_DEF_UNIQUE_ID ()
4044#define _PyCode_DEF_THREAD_LOCAL_BYTECODE ()
4145#endif
4246
@@ -101,7 +105,7 @@ typedef struct {
101105 _PyCoCached * _co_cached ; /* cached co_* attributes */ \
102106 uintptr_t _co_instrumentation_version ; /* current instrumentation version */ \
103107 struct _PyCoMonitoringData * _co_monitoring ; /* Monitoring data */ \
104- Py_ssize_t _co_unique_id ; /* ID used for per-thread refcounting */ \
108+ _PyCode_DEF_UNIQUE_ID () \
105109 int _co_firsttraceable ; /* index of first traceable instruction */ \
106110 /* Scratch space for extra data relating to the code object. \
107111 Type is a void* to keep the format private in codeobject.c to force \
You can’t perform that action at this time.
0 commit comments