Skip to content

Commit 1145dd3

Browse files
committed
esp8266: Update for changes to mp_obj_str_get_data.
1 parent a9c8db0 commit 1145dd3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

esp8266/modnetwork.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(esp_active_obj, 1, 2, esp_active);
9797
STATIC mp_obj_t esp_connect(mp_uint_t n_args, const mp_obj_t *args) {
9898
require_if(args[0], STATION_IF);
9999
struct station_config config = {{0}};
100-
mp_uint_t len;
100+
size_t len;
101101
const char *p;
102102

103103
if (n_args > 1) {
@@ -311,7 +311,7 @@ STATIC mp_obj_t esp_config(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs
311311
}
312312
case QS(MP_QSTR_essid): {
313313
req_if = SOFTAP_IF;
314-
mp_uint_t len;
314+
size_t len;
315315
const char *s = mp_obj_str_get_data(kwargs->table[i].value, &len);
316316
len = MIN(len, sizeof(cfg.ap.ssid));
317317
memcpy(cfg.ap.ssid, s, len);
@@ -330,7 +330,7 @@ STATIC mp_obj_t esp_config(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs
330330
}
331331
case QS(MP_QSTR_password): {
332332
req_if = SOFTAP_IF;
333-
mp_uint_t len;
333+
size_t len;
334334
const char *s = mp_obj_str_get_data(kwargs->table[i].value, &len);
335335
len = MIN(len, sizeof(cfg.ap.password) - 1);
336336
memcpy(cfg.ap.password, s, len);

0 commit comments

Comments
 (0)