|
13 | 13 | #endif
|
14 | 14 | #endif
|
15 | 15 |
|
16 |
| -typedef struct _cstack PyCStackObject; |
17 |
| -typedef struct _bomb PyBombObject; |
18 |
| -typedef struct _tasklet PyTaskletObject; |
19 |
| -typedef int (slp_schedule_hook_func) (PyTaskletObject *from, PyTaskletObject *to); |
20 |
| -typedef struct _ts PyThreadState; |
| 16 | +/* forward declarations */ |
| 17 | +struct _cstack; |
| 18 | +struct _bomb; |
| 19 | +struct _tasklet; |
| 20 | +struct _ts; |
| 21 | + |
| 22 | +typedef int (slp_schedule_hook_func) (struct _tasklet *from, struct _tasklet *to); |
| 23 | + |
21 | 24 | typedef struct {
|
22 |
| - PyCStackObject * cstack_chain; /* the chain of all C-stacks of this interpreter. This is an uncounted/borrowed ref. */ |
| 25 | + struct _cstack * cstack_chain; /* the chain of all C-stacks of this interpreter. This is an uncounted/borrowed ref. */ |
23 | 26 | PyObject * reduce_frame_func; /* a function used to pickle frames */
|
24 | 27 | PyObject * error_handler; /* the Stackless error handler */
|
25 | 28 | PyObject * channel_hook; /* the channel callback function */
|
26 |
| - PyBombObject * mem_bomb; /* a permanent bomb to use for memory errors */ |
| 29 | + struct _bomb * mem_bomb; /* a permanent bomb to use for memory errors */ |
27 | 30 | PyObject * schedule_hook; /* the schedule callback function */
|
28 | 31 | slp_schedule_hook_func * schedule_fasthook; /* the fast C-only schedule_hook */
|
29 |
| - PyThreadState * initial_tstate; /* recording the main thread state */ |
| 32 | + struct _ts * initial_tstate; /* recording the main thread state */ |
30 | 33 | uint8_t enable_softswitch; /* the flag which decides whether we try to use soft switching */
|
31 | 34 | uint8_t pickleflags; /* flags for pickling / unpickling */
|
32 | 35 | } PyStacklessInterpreterState;
|
@@ -152,7 +155,6 @@ typedef struct _sts {
|
152 | 155 | we use Py_CLEAR, since it clears the pointer before deallocating.
|
153 | 156 | */
|
154 | 157 |
|
155 |
| -struct _ts; /* Forward */ |
156 | 158 |
|
157 | 159 | void slp_kill_tasks_with_stacks(struct _ts *tstate);
|
158 | 160 |
|
|
0 commit comments