core: update iterator usage
This commit is contained in:
@@ -17,7 +17,7 @@ FX_TYPE_CLASS_DECLARATION_END(bshell_get_verb)
|
||||
|
||||
struct bshell_get_verb_p {
|
||||
fx_hashtable *c_verbs;
|
||||
fx_iterator *c_it;
|
||||
const fx_iterator *c_it;
|
||||
};
|
||||
|
||||
static enum bshell_status begin_processing(bshell_cmdlet *cmdlet)
|
||||
@@ -38,18 +38,18 @@ static enum bshell_status process_record(
|
||||
= fx_object_get_private(cmdlet, BSHELL_TYPE_GET_VERB);
|
||||
|
||||
do {
|
||||
fx_value v = fx_iterator_get_value(p->c_it);
|
||||
if (!v.v_type) {
|
||||
const fx_value *v = fx_iterator_get_value(p->c_it);
|
||||
if (!v) {
|
||||
return BSHELL_SUCCESS;
|
||||
}
|
||||
|
||||
fx_hashtable_item *item = NULL;
|
||||
fx_value_get_object(&v, &item);
|
||||
fx_value_get_object(v, &item);
|
||||
|
||||
v = fx_hashtable_item_get_value(item);
|
||||
|
||||
bshell_verb *verb = NULL;
|
||||
fx_value_get_object(&v, &verb);
|
||||
fx_value_get_object(v, &verb);
|
||||
fx_iterator_move_next(p->c_it);
|
||||
|
||||
if (bshell_verb_is_reserved(verb)) {
|
||||
@@ -59,7 +59,7 @@ static enum bshell_status process_record(
|
||||
bshell_verb_ref(verb);
|
||||
bshell_pipeline_write_value(
|
||||
pipeline,
|
||||
fx_value_copy_return(fx_hashtable_item_get_value(item)),
|
||||
fx_value_ref_copy_return(v),
|
||||
false);
|
||||
break;
|
||||
} while (1);
|
||||
|
||||
Reference in New Issue
Block a user