aboutsummaryrefslogtreecommitdiff
path: root/cc3200/mods
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-03-26 17:35:48 +1100
committerDamien George <damien.p.george@gmail.com>2017-03-29 12:56:45 +1100
commit3a77342719bf056cdc51dc898745909b513f0c77 (patch)
treedc883cc8cb53358d1a7154da1e2c8270d80bb2d6 /cc3200/mods
parent1145dd35f2dba4e23f871cdc2de96ff4cc15a26e (diff)
cc3200: Update for changes to mp_obj_str_get_data.
Diffstat (limited to 'cc3200/mods')
-rw-r--r--cc3200/mods/modusocket.c2
-rw-r--r--cc3200/mods/modwlan.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/cc3200/mods/modusocket.c b/cc3200/mods/modusocket.c
index 02ce3e279..4e2da6737 100644
--- a/cc3200/mods/modusocket.c
+++ b/cc3200/mods/modusocket.c
@@ -737,7 +737,7 @@ STATIC const mp_obj_type_t socket_type = {
// function usocket.getaddrinfo(host, port)
/// \function getaddrinfo(host, port)
STATIC mp_obj_t mod_usocket_getaddrinfo(mp_obj_t host_in, mp_obj_t port_in) {
- mp_uint_t hlen;
+ size_t hlen;
const char *host = mp_obj_str_get_data(host_in, &hlen);
mp_int_t port = mp_obj_get_int(port_in);
diff --git a/cc3200/mods/modwlan.c b/cc3200/mods/modwlan.c
index 2a0d3bf63..68d892364 100644
--- a/cc3200/mods/modwlan.c
+++ b/cc3200/mods/modwlan.c
@@ -773,7 +773,7 @@ STATIC mp_obj_t wlan_init_helper(wlan_obj_t *self, const mp_arg_val_t *args) {
wlan_validate_mode(mode);
// get the ssid
- mp_uint_t ssid_len = 0;
+ size_t ssid_len = 0;
const char *ssid = NULL;
if (args[1].u_obj != NULL) {
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) {
// get the auth config
uint8_t auth = SL_SEC_TYPE_OPEN;
- mp_uint_t key_len = 0;
+ size_t key_len = 0;
const char *key = NULL;
if (args[2].u_obj != mp_const_none) {
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_
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
// get the ssid
- mp_uint_t ssid_len;
+ size_t ssid_len;
const char *ssid = mp_obj_str_get_data(args[0].u_obj, &ssid_len);
wlan_validate_ssid_len(ssid_len);
// get the auth config
uint8_t auth = SL_SEC_TYPE_OPEN;
- mp_uint_t key_len = 0;
+ size_t key_len = 0;
const char *key = NULL;
if (args[1].u_obj != mp_const_none) {
mp_obj_t *sec;
@@ -1077,7 +1077,7 @@ STATIC mp_obj_t wlan_ssid (mp_uint_t n_args, const mp_obj_t *args) {
if (n_args == 1) {
return mp_obj_new_str((const char *)self->ssid, strlen((const char *)self->ssid), false);
} else {
- mp_uint_t len;
+ size_t len;
const char *ssid = mp_obj_str_get_data(args[1], &len);
wlan_validate_ssid_len(len);
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) {
} else {
// get the auth config
uint8_t auth = SL_SEC_TYPE_OPEN;
- mp_uint_t key_len = 0;
+ size_t key_len = 0;
const char *key = NULL;
if (args[1] != mp_const_none) {
mp_obj_t *sec;