@@ -198,7 +198,7 @@ STATIC void re_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t
198198STATIC mp_obj_t ure_exec (bool is_anchored , uint n_args , const mp_obj_t * args ) {
199199 (void )n_args ;
200200 mp_obj_re_t * self ;
201- if (mp_obj_is_type (args [0 ], & re_type )) {
201+ if (mp_obj_is_type (args [0 ], ( mp_obj_type_t * ) & re_type )) {
202202 self = MP_OBJ_TO_PTR (args [0 ]);
203203 } else {
204204 self = MP_OBJ_TO_PTR (mod_re_compile (1 , args ));
@@ -217,7 +217,7 @@ STATIC mp_obj_t ure_exec(bool is_anchored, uint n_args, const mp_obj_t *args) {
217217 return mp_const_none ;
218218 }
219219
220- match -> base .type = & match_type ;
220+ match -> base .type = ( mp_obj_type_t * ) & match_type ;
221221 match -> num_matches = caps_num / 2 ; // caps_num counts start and end pointers
222222 match -> str = args [1 ];
223223 return MP_OBJ_FROM_PTR (match );
@@ -282,7 +282,7 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(re_split_obj, 2, 3, re_split);
282282
283283STATIC mp_obj_t re_sub_helper (size_t n_args , const mp_obj_t * args ) {
284284 mp_obj_re_t * self ;
285- if (mp_obj_is_type (args [0 ], & re_type )) {
285+ if (mp_obj_is_type (args [0 ], ( mp_obj_type_t * ) & re_type )) {
286286 self = MP_OBJ_TO_PTR (args [0 ]);
287287 } else {
288288 self = MP_OBJ_TO_PTR (mod_re_compile (1 , args ));
@@ -305,7 +305,7 @@ STATIC mp_obj_t re_sub_helper(size_t n_args, const mp_obj_t *args) {
305305 vstr_t vstr_return ;
306306 vstr_return .buf = NULL ; // We'll init the vstr after the first match
307307 mp_obj_match_t * match = mp_local_alloc (sizeof (mp_obj_match_t ) + caps_num * sizeof (char * ));
308- match -> base .type = & match_type ;
308+ match -> base .type = ( mp_obj_type_t * ) & match_type ;
309309 match -> num_matches = caps_num / 2 ; // caps_num counts start and end pointers
310310 match -> str = where ;
311311
@@ -430,7 +430,7 @@ STATIC mp_obj_t mod_re_compile(size_t n_args, const mp_obj_t *args) {
430430 if (size == -1 ) {
431431 goto error ;
432432 }
433- mp_obj_re_t * o = mp_obj_malloc_var (mp_obj_re_t , char , size , & re_type );
433+ mp_obj_re_t * o = mp_obj_malloc_var (mp_obj_re_t , char , size , ( mp_obj_type_t * ) & re_type );
434434 #if MICROPY_PY_URE_DEBUG
435435 int flags = 0 ;
436436 if (n_args > 1 ) {
0 commit comments