commit bash-20090129 snapshot

This commit is contained in:
Chet Ramey
2011-12-07 09:36:36 -05:00
parent a927e02930
commit c1d39fb8cf
16 changed files with 1409 additions and 1138 deletions
+10 -2
View File
@@ -1006,6 +1006,7 @@ gen_shell_function_matches (cs, text, line, ind, lwords, nw, cw)
WORD_LIST *cmdlist;
int fval;
sh_parser_state_t ps;
sh_parser_state_t * restrict pps;
#if defined (ARRAY_VARS)
ARRAY *a;
#endif
@@ -1030,9 +1031,16 @@ gen_shell_function_matches (cs, text, line, ind, lwords, nw, cw)
cmdlist = build_arg_list (funcname, text, lwords, cw);
save_parser_state (&ps);
pps = &ps;
begin_unwind_frame ("gen-shell-function-matches");
add_unwind_protect (restore_parser_state, (char *)pps);
add_unwind_protect (dispose_words, (char *)cmdlist);
add_unwind_protect (unbind_compfunc_variables, (char *)0);
fval = execute_shell_function (f, cmdlist);
restore_parser_state (&ps);
discard_unwind_frame ("gen-shell-function-matches");
restore_parser_state (pps);
/* Now clean up and destroy everything. */
dispose_words (cmdlist);