MCPcopy Create free account
hub / github.com/defold/defold / get_array_count_field

Function get_array_count_field

engine/jni/scripts/gen_java.py:706–719  ·  view source on GitHub ↗
(decl, wanted_field_name)

Source from the content-addressed store, hash-verified

704
705
706def get_array_count_field(decl, wanted_field_name):
707 field = None
708 for f in decl['fields']:
709 field_name = check_override(f['name'])
710 if wanted_field_name == field_name:
711 field = f
712 break
713 if field is None:
714 return None
715 struct_name = decl['name']
716 field_type = check_override(f'{struct_name}.{field_name}', default=field['type'])
717 if not is_prim_type(field_type):
718 return None
719 return field
720
721def has_array(fields, namespace, name):
722 for field in fields:

Callers 4

gen_structFunction · 0.85
gen_jni_type_initFunction · 0.85
gen_to_jni_create_objectFunction · 0.85

Calls 2

check_overrideFunction · 0.85
is_prim_typeFunction · 0.85

Tested by

no test coverage detected