summaryrefslogtreecommitdiff
path: root/py/parse.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-01-24 23:12:58 +0000
committerDamien George <damien.p.george@gmail.com>2015-01-24 23:12:58 +0000
commit5c670acb1fdd04dcb9c220fee7cbeeb6b0c440e5 (patch)
tree4265962a5e3bb021bdc8cc7d511efce887cf50f9 /py/parse.c
parent4c1a7e0d6a561be5871bb0d36b724f529e55c21d (diff)
py: Be more machine-portable with size of bit fields.
Diffstat (limited to 'py/parse.c')
-rw-r--r--py/parse.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/py/parse.c b/py/parse.c
index dc2780c7e..881a11e73 100644
--- a/py/parse.c
+++ b/py/parse.c
@@ -108,9 +108,9 @@ STATIC const rule_t *rules[] = {
};
typedef struct _rule_stack_t {
- mp_uint_t src_line : 24;
- mp_uint_t rule_id : 8;
- mp_uint_t arg_i : 32; // what should the bit-size be?
+ mp_uint_t src_line : BITS_PER_WORD - 8; // maximum bits storing source line number
+ mp_uint_t rule_id : 8; // this must be large enough to fit largest rule number
+ mp_uint_t arg_i; // this dictates the maximum nodes in a "list" of things
} rule_stack_t;
typedef struct _parser_t {