8000 skip converting from long int if long ints aren't enabled · kdb424/circuitpython@14ba5a7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 14ba5a7

Browse files
committed
skip converting from long int if long ints aren't enabled
.. saves 20 bytes on proxlight trinkey
1 parent 2d08473 commit 14ba5a7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

shared-module/adafruit_pixelbuf/PixelBuf.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,10 @@ void common_hal_adafruit_pixelbuf_pixelbuf_set_brightness(mp_obj_t self_in, mp_f
143143
STATIC uint8_t _pixelbuf_get_as_uint8(mp_obj_t obj) {
144144
if (mp_obj_is_small_int(obj)) {
145145
return MP_OBJ_SMALL_INT_VALUE(obj);
146+
#if MICROPY_LONGINT_IMPL != MICROPY_LONGINT_IMPL_NONE
146147
} else if (mp_obj_is_int(obj)) {
147148
return mp_obj_get_int_truncated(obj);
149+
#endif
148150
} else if (mp_obj_is_float(obj)) {
149151
return (uint8_t)mp_obj_get_float(obj);
150152
}

0 commit comments

Comments
 (0)
0