core: update iterator usage
This commit is contained in:
@@ -40,13 +40,13 @@ static enum bshell_status process_record(
|
||||
return BSHELL_SUCCESS;
|
||||
}
|
||||
|
||||
fx_iterator *aliases = fx_iterator_begin(rt->rt_aliases);
|
||||
const fx_iterator *aliases = fx_iterator_begin(rt->rt_aliases);
|
||||
fx_foreach(item_v, aliases)
|
||||
{
|
||||
fx_hashtable_item *item;
|
||||
fx_value_get_object(&item_v, &item);
|
||||
fx_value alias_v = fx_hashtable_item_get_value(item);
|
||||
bshell_pipeline_write_value(pipeline, alias_v, false);
|
||||
fx_value_get_object(item_v, &item);
|
||||
const fx_value *alias_v = fx_hashtable_item_get_value(item);
|
||||
bshell_pipeline_write_value(pipeline, *alias_v, false);
|
||||
}
|
||||
fx_iterator_unref(aliases);
|
||||
|
||||
@@ -55,13 +55,14 @@ static enum bshell_status process_record(
|
||||
while (scope) {
|
||||
fx_hashtable *function_map
|
||||
= bshell_runtime_scope_get_functions(scope);
|
||||
fx_iterator *functions = fx_iterator_begin(function_map);
|
||||
const fx_iterator *functions = fx_iterator_begin(function_map);
|
||||
fx_foreach(item_v, functions)
|
||||
{
|
||||
fx_hashtable_item *item;
|
||||
fx_value_get_object(&item_v, &item);
|
||||
fx_value func_v = fx_hashtable_item_get_value(item);
|
||||
bshell_pipeline_write_value(pipeline, func_v, false);
|
||||
fx_value_get_object(item_v, &item);
|
||||
const fx_value *func_v
|
||||
= fx_hashtable_item_get_value(item);
|
||||
bshell_pipeline_write_value(pipeline, *func_v, false);
|
||||
}
|
||||
fx_iterator_unref(functions);
|
||||
|
||||
@@ -72,12 +73,12 @@ static enum bshell_status process_record(
|
||||
fx_foreach(asm_v, assemblies)
|
||||
{
|
||||
fx_assembly *assembly = NULL;
|
||||
fx_value_get_object(&asm_v, &assembly);
|
||||
fx_value_get_object(asm_v, &assembly);
|
||||
fx_iterator *types = fx_assembly_get_types(assembly);
|
||||
fx_foreach(v, types)
|
||||
{
|
||||
fx_type *ty = NULL;
|
||||
fx_value_get_object(&v, &ty);
|
||||
fx_value_get_object(v, &ty);
|
||||
fx_type_flags ty_flags = fx_type_get_flags(ty);
|
||||
bool is_abstract = (ty_flags & FX_TYPE_F_ABSTRACT) != 0;
|
||||
if (is_abstract) {
|
||||
|
||||
Reference in New Issue
Block a user