Skip to content

Commit c271754

Browse files
committed
fixup micropy
1 parent bd3c36c commit c271754

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

extmod/moduhashlib.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ STATIC mp_obj_t uhashlib_sha256_update(mp_obj_t self_in, mp_obj_t arg);
6666

6767
#if MICROPY_SSL_MBEDTLS
6868

69-
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) {
70-
mp_arg_check_num(n_args, n_kw, 0, 1, false);
69+
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) {
70+
mp_arg_check_num(n_args, kw_args, 0, 1, false);
7171
mp_obj_hash_t *o = m_new_obj_var(mp_obj_hash_t, char, sizeof(mbedtls_sha256_context));
7272
o->base.type = type;
7373
mbedtls_sha256_init((mbedtls_sha256_context*)&o->state);
@@ -104,8 +104,8 @@ static void check_not_unicode(const mp_obj_t arg) {
104104
#endif
105105
}
106106

107-
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) {
108-
mp_arg_check_num(n_args, n_kw, 0, 1, false);
107+
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) {
108+
mp_arg_check_num(n_args, kw_args, 0, 1, false);
109109
mp_obj_hash_t *o = m_new_obj_var(mp_obj_hash_t, char, sizeof(CRYAL_SHA256_CTX));
110110
o->base.type = type;
111111
sha256_init((CRYAL_SHA256_CTX*)o->state);
@@ -155,8 +155,8 @@ STATIC const mp_obj_type_t uhashlib_sha256_type = {
155155
STATIC mp_obj_t uhashlib_sha1_update(mp_obj_t self_in, mp_obj_t arg);
156156

157157
#if MICROPY_SSL_AXTLS
158-
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) {
159-
mp_arg_check_num(n_args, n_kw, 0, 1, false);
158+
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) {
159+
mp_arg_check_num(n_args, kw_args, 0, 1, false);
160160
mp_obj_hash_t *o = m_new_obj_var(mp_obj_hash_t, char, sizeof(SHA1_CTX));
161161
o->base.type = type;
162162
SHA1_Init((SHA1_CTX*)o->state);

py/objenumerate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ STATIC mp_obj_t enumerate_make_new(const mp_obj_type_t *type, size_t n_args, con
5959
o->iter = mp_getiter(arg_vals.iterable.u_obj, NULL);
6060
o->cur = arg_vals.start.u_int;
6161
#else
62-
(void)n_kw;
62+
(void)kw_args;
6363
mp_obj_enumerate_t *o = m_new_obj(mp_obj_enumerate_t);
6464
o->base.type = type;
6565
o->iter = mp_getiter(args[0], NULL);

py/objstr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ STATIC mp_obj_t bytes_make_new(const mp_obj_type_t *type_in, size_t n_args, cons
198198
mp_arg_error_unimpl_kw();
199199
}
200200
#else
201-
(void)n_kw;
201+
(void)kw_args;
202202
#endif
203203

204204
if (n_args == 0) {

0 commit comments

Comments
 (0)