diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-26 10:47:29 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-26 10:47:29 +0100 |
commit | 6d3c5e4301df363055dc256e6692c610e4d0b918 (patch) | |
tree | a07a18ed1a13d50990cf0e43a2a3c919cb14240d /stmhal/extint.c | |
parent | d139c489bab6b58906868e3fc8383ea813a122d4 (diff) | |
download | micropython-6d3c5e4301df363055dc256e6692c610e4d0b918.tar.gz micropython-6d3c5e4301df363055dc256e6692c610e4d0b918.zip |
Add ARRAY_SIZE macro, and use it where possible.
Diffstat (limited to 'stmhal/extint.c')
-rw-r--r-- | stmhal/extint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stmhal/extint.c b/stmhal/extint.c index ede4f39515..2c576648b4 100644 --- a/stmhal/extint.c +++ b/stmhal/extint.c @@ -245,7 +245,7 @@ STATIC const mp_arg_parse_t pyb_extint_make_new_accepted_args[] = { { MP_QSTR_pull, MP_ARG_PARSE_REQUIRED | MP_ARG_PARSE_INT, {.u_int = 0} }, { MP_QSTR_callback, MP_ARG_PARSE_REQUIRED | MP_ARG_PARSE_OBJ, {.u_obj = MP_OBJ_NULL} }, }; -#define PYB_EXTINT_MAKE_NEW_NUM_ARGS (sizeof(pyb_extint_make_new_accepted_args) / sizeof(pyb_extint_make_new_accepted_args[0])) +#define PYB_EXTINT_MAKE_NEW_NUM_ARGS ARRAY_SIZE(pyb_extint_make_new_accepted_args) STATIC mp_obj_t extint_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const mp_obj_t *args) { // type_in == extint_obj_type |