File tree 1 file changed +10
-7
lines changed
1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -119,25 +119,28 @@ typedef enum {
119
119
PyObject *prefix##_result; \
120
120
PyObject *prefix##_source_tb; \
121
121
PyObject *prefix##_cancel_msg; \
122
- fut_state prefix##_state; \
123
- int prefix##_log_tb; \
124
- int prefix##_blocking; \
125
122
PyObject *prefix##_weakreflist; \
126
- PyObject *prefix##_cancelled_exc;
123
+ PyObject *prefix##_cancelled_exc; \
124
+ fut_state prefix##_state; \
125
+ /* These bitfields need to be at the end of the struct
126
+ so that these and bitfields from TaskObj are contiguous.
127
+ */ \
128
+ unsigned prefix ##_log_tb : 1 ; \
129
+ unsigned prefix ##_blocking : 1 ;
127
130
128
131
typedef struct {
129
132
FutureObj_HEAD (fut )
130
133
} FutureObj ;
131
134
132
135
typedef struct {
133
136
FutureObj_HEAD (task )
137
+ unsigned task_must_cancel : 1 ;
138
+ unsigned task_log_destroy_pending : 1 ;
139
+ int task_num_cancels_requested ;
134
140
PyObject * task_fut_waiter ;
135
141
PyObject * task_coro ;
136
142
PyObject * task_name ;
137
143
PyObject * task_context ;
138
- int task_must_cancel ;
139
- int task_log_destroy_pending ;
140
- int task_num_cancels_requested ;
141
144
} TaskObj ;
142
145
143
146
typedef struct {
You can’t perform that action at this time.
0 commit comments