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

Commit edd9448

Browse files
author
Anselm Kruis
committed
Stackless issue #254: bpo-33608: Minor cleanup related to pending calls.
Adapt Stackless to upstream commit 5be45a6.
1 parent 98f10b8 commit edd9448

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

Include/internal/pycore_slp_pystate.h

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,11 @@ typedef struct {
4444
assert((tstate)->interp->st.initial_tstate), \
4545
(tstate)->interp->st.initial_tstate)
4646

47+
/* The complete struct is already initialized with 0.
48+
* Therefore we only need non-zero initializations.
49+
*/
4750
#define SPL_INTERPRETERSTATE_NEW(interp) \
48-
(interp)->st.cstack_chain = NULL; \
49-
(interp)->st.reduce_frame_func = NULL; \
50-
(interp)->st.error_handler = NULL; \
51-
(interp)->st.channel_hook = NULL; \
52-
(interp)->st.mem_bomb = NULL; \
53-
(interp)->st.schedule_hook = NULL; \
54-
(interp)->st.schedule_fasthook = NULL; \
55-
(interp)->st.initial_tstate = NULL; \
56-
(interp)->st.enable_softswitch = 1; \
57-
(interp)->st.pickleflags = 0;
51+
(interp)->st.enable_softswitch = 1;
5852

5953
#define SPL_INTERPRETERSTATE_CLEAR(interp) \
6054
(interp)->st.cstack_chain = NULL; /* uncounted ref */ \

0 commit comments

Comments
 (0)