Skip to content

Commit cf8e8c2

Browse files
committed
py/emitglue: Change type of bit-field to explicitly unsigned mp_uint_t.
Some compilers can treat enum types as signed, in which case 3 bits is not enough to encode all mp_raw_code_kind_t values. So change the type to mp_uint_t.
1 parent 448d93a commit cf8e8c2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

py/emitglue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ typedef enum {
4040
} mp_raw_code_kind_t;
4141

4242
typedef struct _mp_raw_code_t {
43-
mp_raw_code_kind_t kind : 3;
43+
mp_uint_t kind : 3; // of type mp_raw_code_kind_t
4444
mp_uint_t scope_flags : 7;
4545
mp_uint_t n_pos_args : 11;
4646
union {

0 commit comments

Comments
 (0)