diff options
| author | Jeff Epler <jepler@gmail.com> | 2021-02-18 16:10:57 -0600 |
|---|---|---|
| committer | Jeff Epler <jepler@gmail.com> | 2021-02-18 16:10:57 -0600 |
| commit | ffae89b1914272cdb5978a0837991e33732bbe59 (patch) | |
| tree | a5af2c7cebd6f213adfd2691bd7ebe79755caef4 | |
| parent | 72e8fb085cc802cac098747f9b8355ee140009c2 (diff) | |
bitops: fix argument parsing
| -rw-r--r-- | shared-bindings/bitops/__init__.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shared-bindings/bitops/__init__.c b/shared-bindings/bitops/__init__.c index 0ea556fa2..0d40e53ca 100644 --- a/shared-bindings/bitops/__init__.c +++ b/shared-bindings/bitops/__init__.c @@ -55,7 +55,7 @@ //| ... STATIC mp_obj_t bit_transpose(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { - enum { ARG_input, ARG_width, ARG_output }; + enum { ARG_input, ARG_output, ARG_width }; static const mp_arg_t allowed_args[] = { { MP_QSTR_input, MP_ARG_OBJ | MP_ARG_REQUIRED }, { MP_QSTR_output, MP_ARG_OBJ | MP_ARG_REQUIRED }, @@ -66,7 +66,7 @@ STATIC mp_obj_t bit_transpose(size_t n_args, const mp_obj_t *pos_args, mp_map_t int width = args[ARG_width].u_int; if (width < 2 || width > 8) { - mp_raise_ValueError(translate("width must be from 2 to 8 (inclusive)")); + mp_raise_ValueError_varg(translate("width must be from 2 to 8 (inclusive), not %d"), width); } mp_buffer_info_t input_bufinfo; |
