@@ -91,7 +91,7 @@ extern "C" {
91
91
#define SLP_TASKLET_FLAGS_OFFSET_pending_irq \
92
92
(SLP_TASKLET_FLAGS_OFFSET_is_zombie + SLP_TASKLET_FLAGS_BITS_is_zombie)
93
93
94
- typedef struct _tasklet_flags {
94
+ typedef struct _slp_tasklet_flags {
95
95
signed int blocked: SLP_TASKLET_FLAGS_BITS_blocked;
96
96
unsigned int atomic: SLP_TASKLET_FLAGS_BITS_atomic;
97
97
unsigned int ignore_nesting: SLP_TASKLET_FLAGS_BITS_ignore_nesting;
@@ -101,16 +101,16 @@ typedef struct _tasklet_flags {
101
101
unsigned int pending_irq: SLP_TASKLET_FLAGS_BITS_pending_irq;
102
102
} PyTaskletFlagStruc;
103
103
104
- typedef struct _tasklet {
104
+ typedef struct _slp_tasklet {
105
105
PyObject_HEAD
106
- struct _tasklet *next;
107
- struct _tasklet *prev;
106
+ struct _slp_tasklet *next;
107
+ struct _slp_tasklet *prev;
108
108
union {
109
109
struct _frame *frame;
110
110
struct _cframe *cframe;
111
111
} f;
112
112
PyObject *tempval;
113
- struct _cstack *cstate;
113
+ struct _slp_cstack *cstate;
114
114
/* Pointer to the top of the stack of the exceptions currently
115
115
* being handled */
116
116
_PyErr_StackItem *exc_info;
@@ -119,7 +119,7 @@ typedef struct _tasklet {
119
119
*/
120
120
_PyErr_StackItem exc_state;
121
121
/* bits stuff */
122
- struct _tasklet_flags flags;
122
+ struct _slp_tasklet_flags flags;
123
123
int recursion_depth;
124
124
PyObject *def_globals;
125
125
PyObject *tsk_weakreflist;
@@ -142,15 +142,15 @@ typedef struct _tasklet {
142
142
143
143
/* ** important structures: cstack ***/
144
144
145
- typedef struct _cstack {
145
+ typedef struct _slp_cstack {
146
146
PyObject_VAR_HEAD
147
- struct _cstack *next;
148
- struct _cstack *prev;
147
+ struct _slp_cstack *next;
148
+ struct _slp_cstack *prev;
149
149
PY_LONG_LONG serial;
150
150
/* A borrowed reference to the tasklet, that owns this cstack. NULL after
151
151
* the stack has been restored. Always NULL for an initial stub.
152
152
*/
153
- struct _tasklet *task;
153
+ struct _slp_tasklet *task;
154
154
int nesting_level;
155
155
PyThreadState *tstate;
156
156
#ifdef SLP_SEH32
@@ -179,7 +179,7 @@ typedef struct _cstack {
179
179
180
180
/* ** important structures: bomb ***/
181
181
182
- typedef struct _bomb {
182
+ typedef struct _slp_bomb {
183
183
PyObject_HEAD
184
184
PyObject *curexc_type;
185
185
PyObject *curexc_value;
@@ -221,24 +221,24 @@ typedef struct _bomb {
221
221
#define SLP_CHANNEL_FLAGS_OFFSET_schedule_all \
222
222
(SLP_CHANNEL_FLAGS_OFFSET_preference + SLP_CHANNEL_FLAGS_BITS_preference)
223
223
224
- typedef struct _channel_flags {
224
+ typedef struct _slp_channel_flags {
225
225
unsigned int closing: SLP_CHANNEL_FLAGS_BITS_closing;
226
226
signed int preference: SLP_CHANNEL_FLAGS_BITS_preference;
227
227
unsigned int schedule_all: SLP_CHANNEL_FLAGS_BITS_schedule_all;
228
228
} PyChannelFlagStruc;
229
229
230
- typedef struct _channel {
230
+ typedef struct _slp_channel {
231
231
PyObject_HEAD
232
232
/* make sure that these fit tasklet's next/prev */
233
- struct _tasklet *head;
234
- struct _tasklet *tail;
233
+ struct _slp_tasklet *head;
234
+ struct _slp_tasklet *tail;
235
235
int balance;
236
- struct _channel_flags flags;
236
+ struct _slp_channel_flags flags;
237
237
PyObject *chan_weakreflist;
238
238
} PyChannelObject;
239
239
240
- struct _cframe ;
241
- typedef PyObject *(PyFrame_ExecFunc) (struct _cframe *, int , PyObject *);
240
+ struct _slp_cframe ;
241
+ typedef PyObject *(PyFrame_ExecFunc) (struct _slp_cframe *, int , PyObject *);
242
242
/*
243
243
* How to write frame execution functions:
244
244
*
@@ -259,7 +259,7 @@ typedef PyObject *(PyFrame_ExecFunc) (struct _cframe *, int, PyObject *);
259
259
260
260
/* ** important stuctures: cframe ***/
261
261
262
- typedef struct _cframe {
262
+ typedef struct _slp_cframe {
263
263
PyObject_VAR_HEAD
264
264
struct _frame *f_back; /* previous frame, or NULL */
265
265
@@ -278,18 +278,18 @@ typedef struct _cframe {
278
278
void *any2;
279
279
} PyCFrameObject;
280
280
281
- typedef struct _unwindobject {
281
+ typedef struct _slp_unwindobject {
282
282
PyObject_HEAD
283
283
} PyUnwindObject;
284
284
285
285
286
286
#else /* #ifdef SLP_BUILD_CORE */
287
287
288
- typedef struct _channel PyChannelObject;
289
- typedef struct _cframe PyCFrameObject;
290
- typedef struct _tasklet PyTaskletObject;
291
- typedef struct _unwindobject PyUnwindObject;
292
- typedef struct _bomb PyBombObject;
288
+ typedef struct _slp_channel PyChannelObject;
289
+ typedef struct _slp_cframe PyCFrameObject;
290
+ typedef struct _slp_tasklet PyTaskletObject;
291
+ typedef struct _slp_unwindobject PyUnwindObject;
292
+ typedef struct _slp_bomb PyBombObject;
293
293
294
294
#endif /* #ifdef SLP_BUILD_CORE */
295
295
0 commit comments