Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
5c670acb
Commit
5c670acb
authored
Jan 24, 2015
by
Damien George
Browse files
py: Be more machine-portable with size of bit fields.
parent
4c1a7e0d
Changes
2
Hide whitespace changes
Inline
Side-by-side
py/mpz.h
View file @
5c670acb
...
...
@@ -69,7 +69,7 @@ typedef int32_t mpz_dbl_dig_signed_t;
typedef
struct
_mpz_t
{
mp_uint_t
neg
:
1
;
mp_uint_t
fixed_dig
:
1
;
mp_uint_t
alloc
:
30
;
mp_uint_t
alloc
:
BITS_PER_WORD
-
2
;
mp_uint_t
len
;
mpz_dig_t
*
dig
;
}
mpz_t
;
...
...
py/parse.c
View file @
5c670acb
...
...
@@ -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
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment