Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit a05f330

Browse files
author
Anselm Kruis
committed
Stackless issue #152: fix clang warnings caused by commit 0727a8e.
The commit used a C11 feature. Unfortunately only clang emits a warning.
1 parent a307121 commit a05f330

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

Stackless/core/stackless_tstate.h

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,23 @@
1313
#endif
1414
#endif
1515

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+
2124
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. */
2326
PyObject * reduce_frame_func; /* a function used to pickle frames */
2427
PyObject * error_handler; /* the Stackless error handler */
2528
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 */
2730
PyObject * schedule_hook; /* the schedule callback function */
2831
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 */
3033
uint8_t enable_softswitch; /* the flag which decides whether we try to use soft switching */
3134
uint8_t pickleflags; /* flags for pickling / unpickling */
3235
} PyStacklessInterpreterState;
@@ -152,7 +155,6 @@ typedef struct _sts {
152155
we use Py_CLEAR, since it clears the pointer before deallocating.
153156
*/
154157

155-
struct _ts; /* Forward */
156158

157159
void slp_kill_tasks_with_stacks(struct _ts *tstate);
158160

0 commit comments

Comments
 (0)