Skip to content

Commit

Permalink
unix/modjni: Convert to mp_rom_map_elem_t.
Browse files Browse the repository at this point in the history
  • Loading branch information
pfalcon committed Jul 30, 2017
1 parent f2140f9 commit e280122
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions unix/modjni.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ STATIC mp_obj_t jclass_call(mp_obj_t self_in, size_t n_args, size_t n_kw, const
return call_method(self->cls, NULL, methods, true, n_args, args);
}

STATIC const mp_map_elem_t jclass_locals_dict_table[] = {
// { MP_OBJ_NEW_QSTR(MP_QSTR_get), (mp_obj_t)&ffivar_get_obj },
// { MP_OBJ_NEW_QSTR(MP_QSTR_set), (mp_obj_t)&ffivar_set_obj },
STATIC const mp_rom_map_elem_t jclass_locals_dict_table[] = {
// { MP_ROM_QSTR(MP_QSTR_get), MP_ROM_PTR(&ffivar_get_obj) },
// { MP_ROM_QSTR(MP_QSTR_set), MP_ROM_PTR(&ffivar_set_obj) },
};

STATIC MP_DEFINE_CONST_DICT(jclass_locals_dict, jclass_locals_dict_table);
Expand All @@ -181,7 +181,7 @@ STATIC const mp_obj_type_t jclass_type = {
.print = jclass_print,
.attr = jclass_attr,
.call = jclass_call,
.locals_dict = (mp_obj_t)&jclass_locals_dict,
.locals_dict = (mp_obj_dict_t*)&jclass_locals_dict,
};

STATIC mp_obj_t new_jclass(jclass jc) {
Expand Down Expand Up @@ -331,7 +331,7 @@ STATIC const mp_obj_type_t jobject_type = {
.attr = jobject_attr,
.subscr = jobject_subscr,
.getiter = subscr_getiter,
// .locals_dict = (mp_obj_t)&jobject_locals_dict,
// .locals_dict = (mp_obj_dict_t*)&jobject_locals_dict,
};

STATIC mp_obj_t new_jobject(jobject jo) {
Expand Down Expand Up @@ -578,7 +578,7 @@ STATIC const mp_obj_type_t jmethod_type = {
.print = jmethod_print,
.call = jmethod_call,
// .attr = jobject_attr,
// .locals_dict = (mp_obj_t)&jobject_locals_dict,
// .locals_dict = (mp_obj_dict_t*)&jobject_locals_dict,
};

#ifdef __ANDROID__
Expand Down Expand Up @@ -707,11 +707,11 @@ STATIC mp_obj_t mod_jni_env() {
}
MP_DEFINE_CONST_FUN_OBJ_0(mod_jni_env_obj, mod_jni_env);

STATIC const mp_map_elem_t mp_module_jni_globals_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_jni) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_cls), (mp_obj_t)&mod_jni_cls_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_array), (mp_obj_t)&mod_jni_array_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_env), (mp_obj_t)&mod_jni_env_obj },
STATIC const mp_rom_map_elem_t mp_module_jni_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_jni) },
{ MP_ROM_QSTR(MP_QSTR_cls), MP_ROM_PTR(&mod_jni_cls_obj) },
{ MP_ROM_QSTR(MP_QSTR_array), MP_ROM_PTR(&mod_jni_array_obj) },
{ MP_ROM_QSTR(MP_QSTR_env), MP_ROM_PTR(&mod_jni_env_obj) },
};

STATIC MP_DEFINE_CONST_DICT(mp_module_jni_globals, mp_module_jni_globals_table);
Expand Down

0 comments on commit e280122

Please sign in to comment.