diff options
| author | Jeff Epler <jeff@adafruit.com> | 2020-08-07 10:06:39 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-07 10:06:39 -0500 |
| commit | d8cc4795be4d327be980f02f3be5f90d625bd286 (patch) | |
| tree | b402e17e4f4909b58b5bf4797f80d1b022f205f1 /shared-bindings | |
| parent | 16170d44abc55d8a5e65b903fa3e200c0154cbc1 (diff) | |
| parent | 93b373d617ff7a99eb936628d50d954f5db53f43 (diff) | |
Merge pull request #3236 from jepler/firmware-size-gemma-trinket
Firmware size savings
Diffstat (limited to 'shared-bindings')
| -rw-r--r-- | shared-bindings/i2cperipheral/I2CPeripheral.c | 2 | ||||
| -rw-r--r-- | shared-bindings/ps2io/Ps2.c | 2 | ||||
| -rw-r--r-- | shared-bindings/time/__init__.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/shared-bindings/i2cperipheral/I2CPeripheral.c b/shared-bindings/i2cperipheral/I2CPeripheral.c index cfebd472e..dfc58cd24 100644 --- a/shared-bindings/i2cperipheral/I2CPeripheral.c +++ b/shared-bindings/i2cperipheral/I2CPeripheral.c @@ -86,7 +86,7 @@ STATIC mp_obj_t i2cperipheral_i2c_peripheral_make_new(const mp_obj_type_t *type, while ((item = mp_iternext(iterable)) != MP_OBJ_STOP_ITERATION) { mp_int_t value; if (!mp_obj_get_int_maybe(item, &value)) { - mp_raise_TypeError(translate("can't convert address to int")); + mp_raise_TypeError_varg(translate("can't convert %q to %q"), MP_QSTR_address, MP_QSTR_int); } if (value < 0x00 || value > 0x7f) { mp_raise_ValueError(translate("address out of bounds")); diff --git a/shared-bindings/ps2io/Ps2.c b/shared-bindings/ps2io/Ps2.c index 15731ea40..0977e08ff 100644 --- a/shared-bindings/ps2io/Ps2.c +++ b/shared-bindings/ps2io/Ps2.c @@ -133,7 +133,7 @@ STATIC mp_obj_t ps2io_ps2_obj_popleft(mp_obj_t self_in) { int b = common_hal_ps2io_ps2_popleft(self); if (b < 0) { - mp_raise_IndexError(translate("Pop from an empty Ps2 buffer")); + mp_raise_IndexError_varg(translate("pop from empty %q"), MP_QSTR_Ps2_space_buffer); } return MP_OBJ_NEW_SMALL_INT(b); } diff --git a/shared-bindings/time/__init__.c b/shared-bindings/time/__init__.c index 262da17fd..f7382b1ac 100644 --- a/shared-bindings/time/__init__.c +++ b/shared-bindings/time/__init__.c @@ -280,7 +280,7 @@ STATIC mp_obj_t time_mktime(mp_obj_t t) { mp_obj_tuple_get(t, &len, &elem); if (len != 9) { - mp_raise_TypeError(translate("function takes exactly 9 arguments")); + mp_raise_TypeError_varg(translate("function takes %d positional arguments but %d were given"), 9); } if (mp_obj_get_int(elem[0]) < 2000) { |
