Commit 561a4274 561a4274464e2e35ce5f696ae6fb9c6431032db1 by Sergey Poznyakoff

Use list LIFO access where appropriate.

* libmu_sieve/runtime.c (_mu_sv_instr_push)
(_mu_sv_instr_pop): Use mu_list_push and mu_list_pop.
* mail/alias.c (recursive_alias_expand): Likewise.
1 parent f606ab21
......@@ -131,7 +131,7 @@ _mu_sv_instr_push (mu_sieve_machine_t mach)
mu_sieve_error (mach, _("cannot create stack"));
mu_sieve_abort (mach);
}
mu_list_prepend (mach->stack, (void*) mach->reg);
mu_list_push (mach->stack, (void*) mach->reg);
}
void
......@@ -149,8 +149,7 @@ _mu_sv_instr_pop (mu_sieve_machine_t mach)
mu_sieve_error (mach, _("stack underflow"));
mu_sieve_abort (mach);
}
mu_list_get (mach->stack, 0, (void **)&mach->reg);
mu_list_remove (mach->stack, (void *)mach->reg);
mu_list_pop (mach->stack, (void **)&mach->reg);
}
void
......
......@@ -131,9 +131,9 @@ recursive_alias_expand (const char *name, mu_list_t exlist, mu_list_t origlist)
mu_iterator_current (itr, (void **)&word);
if (mu_list_locate (origlist, word, NULL) == MU_ERR_NOENT)
{
mu_list_prepend (origlist, word);
mu_list_push (origlist, word);
recursive_alias_expand (word, exlist, origlist);
mu_list_remove (origlist, word);
mu_list_pop (origlist, NULL);
}
}
mu_iterator_destroy (&itr);
......