Skip to content

Commit 15a965e

Browse files
committed
Change f_state to use a single byte.
1 parent 39d0996 commit 15a965e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Include/cpython/frameobject.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,19 @@
44
# error "this header file must not be included directly"
55
#endif
66

7-
/* These values are chosen so that all tests involve comparing to zero. */
8-
typedef enum _framestate {
7+
/* These values are chosen so that the inline functions below all
8+
* compare f_state to zero.
9+
*/
10+
enum _framestate {
911
FRAME_CREATED = -2,
1012
FRAME_SUSPENDED = -1,
1113
FRAME_EXECUTING = 0,
1214
FRAME_RETURNED = 1,
1315
FRAME_RAISED = 2,
1416
FRAME_CLEARED = 3
15-
} PyFrameState;
17+
};
18+
19+
typedef signed char PyFrameState;
1620

1721
typedef struct {
1822
int b_type; /* what kind of block this is */

0 commit comments

Comments
 (0)