Skip to content

Commit 3a77342

Browse files
committed
cc3200: Update for changes to mp_obj_str_get_data.
1 parent 1145dd3 commit 3a77342

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

cc3200/mods/modusocket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ STATIC const mp_obj_type_t socket_type = {
737737
// function usocket.getaddrinfo(host, port)
738738
/// \function getaddrinfo(host, port)
739739
STATIC mp_obj_t mod_usocket_getaddrinfo(mp_obj_t host_in, mp_obj_t port_in) {
740-
mp_uint_t hlen;
740+
size_t hlen;
741741
const char *host = mp_obj_str_get_data(host_in, &hlen);
742742
mp_int_t port = mp_obj_get_int(port_in);
743743

cc3200/mods/modwlan.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ STATIC mp_obj_t wlan_init_helper(wlan_obj_t *self, const mp_arg_val_t *args) {
773773
wlan_validate_mode(mode);
774774

775775
// get the ssid
776-
mp_uint_t ssid_len = 0;
776+
size_t ssid_len = 0;
777777
const char *ssid = NULL;
778778
if (args[1].u_obj != NULL) {
779779
ssid = mp_obj_str_get_data(args[1].u_obj, &ssid_len);
@@ -782,7 +782,7 @@ STATIC mp_obj_t wlan_init_helper(wlan_obj_t *self, const mp_arg_val_t *args) {
782782

783783
// get the auth config
784784
uint8_t auth = SL_SEC_TYPE_OPEN;
785-
mp_uint_t key_len = 0;
785+
size_t key_len = 0;
786786
const char *key = NULL;
787787
if (args[2].u_obj != mp_const_none) {
788788
mp_obj_t *sec;
@@ -922,13 +922,13 @@ STATIC mp_obj_t wlan_connect(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_
922922
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
923923

924924
// get the ssid
925-
mp_uint_t ssid_len;
925+
size_t ssid_len;
926926
const char *ssid = mp_obj_str_get_data(args[0].u_obj, &ssid_len);
927927
wlan_validate_ssid_len(ssid_len);
928928

929929
// get the auth config
930930
uint8_t auth = SL_SEC_TYPE_OPEN;
931-
mp_uint_t key_len = 0;
931+
size_t key_len = 0;
932932
const char *key = NULL;
933933
if (args[1].u_obj != mp_const_none) {
934934
mp_obj_t *sec;
@@ -1077,7 +1077,7 @@ STATIC mp_obj_t wlan_ssid (mp_uint_t n_args, const mp_obj_t *args) {
10771077
if (n_args == 1) {
10781078
return mp_obj_new_str((const char *)self->ssid, strlen((const char *)self->ssid), false);
10791079
} else {
1080-
mp_uint_t len;
1080+
size_t len;
10811081
const char *ssid = mp_obj_str_get_data(args[1], &len);
10821082
wlan_validate_ssid_len(len);
10831083
wlan_set_ssid(ssid, len, false);
@@ -1101,7 +1101,7 @@ STATIC mp_obj_t wlan_auth (mp_uint_t n_args, const mp_obj_t *args) {
11011101
} else {
11021102
// get the auth config
11031103
uint8_t auth = SL_SEC_TYPE_OPEN;
1104-
mp_uint_t key_len = 0;
1104+
size_t key_len = 0;
11051105
const char *key = NULL;
11061106
if (args[1] != mp_const_none) {
11071107
mp_obj_t *sec;

0 commit comments

Comments
 (0)