diff options
author | David Lechner <david@pybricks.com> | 2020-03-09 18:09:49 -0500 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-03-11 14:34:40 +1100 |
commit | 8a4ce6b79a09510fc5b970f2c019519f47852101 (patch) | |
tree | 9359da07f08325a19479e7c5badae358a6b659cf /py/objfun.c | |
parent | fccf17521aeec7438785a132434137f266474119 (diff) |
tools/codeformat.py: Eliminate need for sizeof fixup.
This eliminates the need for the sizeof regex fixup by rearranging things a
bit. All other bitfields already use the parentheses around expressions
with sizeof, so one case is fixed by following this convention.
VM_MAX_STATE_ON_STACK is the only remaining problem and it can be worked
around by changing the order of the operands.
Diffstat (limited to 'py/objfun.c')
-rw-r--r-- | py/objfun.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objfun.c b/py/objfun.c index 1afb0f8a1..3a63d8f43 100644 --- a/py/objfun.c +++ b/py/objfun.c @@ -188,7 +188,7 @@ STATIC void dump_args(const mp_obj_t *a, size_t sz) { // With this macro you can tune the maximum number of function state bytes // that will be allocated on the stack. Any function that needs more // than this will try to use the heap, with fallback to stack allocation. -#define VM_MAX_STATE_ON_STACK (11 * sizeof(mp_uint_t)) +#define VM_MAX_STATE_ON_STACK (sizeof(mp_uint_t) * 11) #define DECODE_CODESTATE_SIZE(bytecode, n_state_out_var, state_size_out_var) \ { \ |