summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2019-01-14 18:09:02 -0800
committerScott Shawcroft <scott@tannewt.org>2019-01-14 18:09:02 -0800
commitc27175496248424c0581211aa53a5371f44a37ce (patch)
treed114123ebb5c43cc9a190227d40329486577ff6e
parentbd3c36ce6d3b440dcb7591cacccbd2bc72a2268c (diff)
fixup micropy
-rw-r--r--extmod/moduhashlib.c12
-rw-r--r--py/objenumerate.c2
-rw-r--r--py/objstr.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/extmod/moduhashlib.c b/extmod/moduhashlib.c
index 1618594e9..970c63da8 100644
--- a/extmod/moduhashlib.c
+++ b/extmod/moduhashlib.c
@@ -66,8 +66,8 @@ STATIC mp_obj_t uhashlib_sha256_update(mp_obj_t self_in, mp_obj_t arg);
#if MICROPY_SSL_MBEDTLS
-STATIC mp_obj_t uhashlib_sha256_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
- mp_arg_check_num(n_args, n_kw, 0, 1, false);
+STATIC mp_obj_t uhashlib_sha256_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
+ mp_arg_check_num(n_args, kw_args, 0, 1, false);
mp_obj_hash_t *o = m_new_obj_var(mp_obj_hash_t, char, sizeof(mbedtls_sha256_context));
o->base.type = type;
mbedtls_sha256_init((mbedtls_sha256_context*)&o->state);
@@ -104,8 +104,8 @@ static void check_not_unicode(const mp_obj_t arg) {
#endif
}
-STATIC mp_obj_t uhashlib_sha256_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
- mp_arg_check_num(n_args, n_kw, 0, 1, false);
+STATIC mp_obj_t uhashlib_sha256_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
+ mp_arg_check_num(n_args, kw_args, 0, 1, false);
mp_obj_hash_t *o = m_new_obj_var(mp_obj_hash_t, char, sizeof(CRYAL_SHA256_CTX));
o->base.type = type;
sha256_init((CRYAL_SHA256_CTX*)o->state);
@@ -155,8 +155,8 @@ STATIC const mp_obj_type_t uhashlib_sha256_type = {
STATIC mp_obj_t uhashlib_sha1_update(mp_obj_t self_in, mp_obj_t arg);
#if MICROPY_SSL_AXTLS
-STATIC mp_obj_t uhashlib_sha1_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
- mp_arg_check_num(n_args, n_kw, 0, 1, false);
+STATIC mp_obj_t uhashlib_sha1_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
+ mp_arg_check_num(n_args, kw_args, 0, 1, false);
mp_obj_hash_t *o = m_new_obj_var(mp_obj_hash_t, char, sizeof(SHA1_CTX));
o->base.type = type;
SHA1_Init((SHA1_CTX*)o->state);
diff --git a/py/objenumerate.c b/py/objenumerate.c
index 4919a9b8f..818725d85 100644
--- a/py/objenumerate.c
+++ b/py/objenumerate.c
@@ -59,7 +59,7 @@ STATIC mp_obj_t enumerate_make_new(const mp_obj_type_t *type, size_t n_args, con
o->iter = mp_getiter(arg_vals.iterable.u_obj, NULL);
o->cur = arg_vals.start.u_int;
#else
- (void)n_kw;
+ (void)kw_args;
mp_obj_enumerate_t *o = m_new_obj(mp_obj_enumerate_t);
o->base.type = type;
o->iter = mp_getiter(args[0], NULL);
diff --git a/py/objstr.c b/py/objstr.c
index 637323f4c..9b6cb0cf4 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -198,7 +198,7 @@ STATIC mp_obj_t bytes_make_new(const mp_obj_type_t *type_in, size_t n_args, cons
mp_arg_error_unimpl_kw();
}
#else
- (void)n_kw;
+ (void)kw_args;
#endif
if (n_args == 0) {