Skip to content

Commit 6e30f96

Browse files
committed
ports: Convert legacy uppercase macro names to lowercase.
1 parent f036017 commit 6e30f96

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+77
-77
lines changed

ports/cc3200/hal/cc3200_hal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ void mp_hal_stdout_tx_str(const char *str) {
148148

149149
void mp_hal_stdout_tx_strn(const char *str, size_t len) {
150150
if (MP_STATE_PORT(os_term_dup_obj)) {
151-
if (MP_OBJ_IS_TYPE(MP_STATE_PORT(os_term_dup_obj)->stream_o, &pyb_uart_type)) {
151+
if (mp_obj_is_type(MP_STATE_PORT(os_term_dup_obj)->stream_o, &pyb_uart_type)) {
152152
uart_tx_strn(MP_STATE_PORT(os_term_dup_obj)->stream_o, str, len);
153153
} else {
154154
MP_STATE_PORT(os_term_dup_obj)->write[2] = mp_obj_new_str_of_type(&mp_type_str, (const byte *)str, len);
@@ -184,7 +184,7 @@ int mp_hal_stdin_rx_chr(void) {
184184
if (telnet_rx_any()) {
185185
return telnet_rx_char();
186186
} else if (MP_STATE_PORT(os_term_dup_obj)) { // then the stdio_dup
187-
if (MP_OBJ_IS_TYPE(MP_STATE_PORT(os_term_dup_obj)->stream_o, &pyb_uart_type)) {
187+
if (mp_obj_is_type(MP_STATE_PORT(os_term_dup_obj)->stream_o, &pyb_uart_type)) {
188188
if (uart_rx_any(MP_STATE_PORT(os_term_dup_obj)->stream_o)) {
189189
return uart_rx_char(MP_STATE_PORT(os_term_dup_obj)->stream_o);
190190
}

ports/cc3200/mods/modmachine.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ STATIC mp_obj_t machine_unique_id(void) {
122122
STATIC MP_DEFINE_CONST_FUN_OBJ_0(machine_unique_id_obj, machine_unique_id);
123123

124124
STATIC mp_obj_t machine_main(mp_obj_t main) {
125-
if (MP_OBJ_IS_STR(main)) {
125+
if (mp_obj_is_str(main)) {
126126
MP_STATE_PORT(machine_config_main) = main;
127127
} else {
128128
mp_raise_ValueError(mpexception_value_invalid_arguments);

ports/cc3200/mods/moduos.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ STATIC mp_obj_t os_dupterm(uint n_args, const mp_obj_t *args) {
133133
if (stream_o == mp_const_none) {
134134
MP_STATE_PORT(os_term_dup_obj) = MP_OBJ_NULL;
135135
} else {
136-
if (!MP_OBJ_IS_TYPE(stream_o, &pyb_uart_type)) {
136+
if (!mp_obj_is_type(stream_o, &pyb_uart_type)) {
137137
// must be a stream-like object providing at least read and write methods
138138
mp_load_method(stream_o, MP_QSTR_read, os_term_dup_obj.read);
139139
mp_load_method(stream_o, MP_QSTR_write, os_term_dup_obj.write);

ports/cc3200/mods/modwlan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ STATIC mp_obj_t wlan_ifconfig(size_t n_args, const mp_obj_t *pos_args, mp_map_t
10121012
};
10131013
return mp_obj_new_tuple(4, ifconfig);
10141014
} else { // set the configuration
1015-
if (MP_OBJ_IS_TYPE(args[1].u_obj, &mp_type_tuple)) {
1015+
if (mp_obj_is_type(args[1].u_obj, &mp_type_tuple)) {
10161016
// set a static ip
10171017
mp_obj_t *items;
10181018
mp_obj_get_array_fixed_n(args[1].u_obj, 4, &items);

ports/cc3200/mods/pybpin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ pin_obj_t *pin_find(mp_obj_t user_obj) {
131131
pin_obj_t *pin_obj;
132132

133133
// if a pin was provided, use it
134-
if (MP_OBJ_IS_TYPE(user_obj, &pin_type)) {
134+
if (mp_obj_is_type(user_obj, &pin_type)) {
135135
pin_obj = user_obj;
136136
return pin_obj;
137137
}

ports/cc3200/mods/pybrtc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ STATIC mp_obj_t pyb_rtc_alarm(size_t n_args, const mp_obj_t *pos_args, mp_map_t
367367
uint32_t f_seconds;
368368
uint16_t f_mseconds;
369369
bool repeat = args[2].u_bool;
370-
if (MP_OBJ_IS_TYPE(args[1].u_obj, &mp_type_tuple)) { // datetime tuple given
370+
if (mp_obj_is_type(args[1].u_obj, &mp_type_tuple)) { // datetime tuple given
371371
// repeat cannot be used with a datetime tuple
372372
if (repeat) {
373373
mp_raise_ValueError(mpexception_value_invalid_arguments);

ports/esp32/modnetwork.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ STATIC mp_obj_t esp_ifconfig(size_t n_args, const mp_obj_t *args) {
461461
return mp_obj_new_tuple(4, tuple);
462462
} else {
463463
// set
464-
if (MP_OBJ_IS_TYPE(args[1], &mp_type_tuple) || MP_OBJ_IS_TYPE(args[1], &mp_type_list)) {
464+
if (mp_obj_is_type(args[1], &mp_type_tuple) || mp_obj_is_type(args[1], &mp_type_list)) {
465465
mp_obj_t *items;
466466
mp_obj_get_array_fixed_n(args[1], 4, &items);
467467
netutils_parse_ipv4_addr(items[0], (void*)&info.ip, NETUTILS_BIG);
@@ -518,7 +518,7 @@ STATIC mp_obj_t esp_config(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs
518518
if (kwargs->used != 0) {
519519

520520
for (size_t i = 0; i < kwargs->alloc; i++) {
521-
if (MP_MAP_SLOT_IS_FILLED(kwargs, i)) {
521+
if (mp_map_slot_is_filled(kwargs, i)) {
522522
int req_if = -1;
523523

524524
#define QS(x) (uintptr_t)MP_OBJ_NEW_QSTR(x)

ports/esp32/modsocket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static int _socket_getaddrinfo2(const mp_obj_t host, const mp_obj_t portx, struc
157157
};
158158

159159
mp_obj_t port = portx;
160-
if (MP_OBJ_IS_SMALL_INT(port)) {
160+
if (mp_obj_is_small_int(port)) {
161161
// This is perverse, because lwip_getaddrinfo promptly converts it back to an int, but
162162
// that's the API we have to work with ...
163163
port = mp_obj_str_binary_op(MP_BINARY_OP_MODULO, mp_obj_new_str_via_qstr("%s", 2), port);

ports/esp8266/modesp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ STATIC mp_obj_t esp_flash_read(mp_obj_t offset_in, mp_obj_t len_or_buf_in) {
8787

8888
mp_int_t len;
8989
byte *buf;
90-
bool alloc_buf = MP_OBJ_IS_INT(len_or_buf_in);
90+
bool alloc_buf = mp_obj_is_int(len_or_buf_in);
9191

9292
if (alloc_buf) {
9393
len = mp_obj_get_int(len_or_buf_in);

ports/esp8266/modnetwork.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ STATIC mp_obj_t esp_config(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs
347347
if (kwargs->used != 0) {
348348

349349
for (mp_uint_t i = 0; i < kwargs->alloc; i++) {
350-
if (MP_MAP_SLOT_IS_FILLED(kwargs, i)) {
350+
if (mp_map_slot_is_filled(kwargs, i)) {
351351
#define QS(x) (uintptr_t)MP_OBJ_NEW_QSTR(x)
352352
switch ((uintptr_t)kwargs->table[i].key) {
353353
case QS(MP_QSTR_mac): {

0 commit comments

Comments
 (0)