mirror of
https://github.com/zsh-users/zsh
synced 2024-09-06 00:14:40 +00:00
45076: internal: Simplify handling of try_tryflag. No functional change.
try_tryflag isn't assigned anywhere, other than at initialization and by these lines, so we don't need to save and restore the value.
This commit is contained in:
parent
ae7e291873
commit
a90e93f454
|
@ -1,5 +1,8 @@
|
|||
2019-12-18 Daniel Shahaf <danielsh@apache.org>
|
||||
|
||||
* 45076: Src/loop.c: internal: Simplify handling of
|
||||
try_tryflag. No functional change.
|
||||
|
||||
* 45066: Src/builtin.c, Src/exec.c, Src/params.c: internal:
|
||||
Document forklevel, locallevel, and exit_pending.
|
||||
|
||||
|
|
|
@ -732,7 +732,7 @@ exectry(Estate state, int do_exec)
|
|||
Wordcode end, always;
|
||||
int endval;
|
||||
int save_retflag, save_breaks, save_contflag;
|
||||
zlong save_try_errflag, save_try_tryflag, save_try_interrupt;
|
||||
zlong save_try_errflag, save_try_interrupt;
|
||||
|
||||
end = state->pc + WC_TRY_SKIP(state->pc[-1]);
|
||||
always = state->pc + 1 + WC_TRY_SKIP(*state->pc);
|
||||
|
@ -741,12 +741,9 @@ exectry(Estate state, int do_exec)
|
|||
cmdpush(CS_CURSH);
|
||||
|
||||
/* The :try clause */
|
||||
save_try_tryflag = try_tryflag;
|
||||
try_tryflag = 1;
|
||||
|
||||
++try_tryflag;
|
||||
execlist(state, 1, do_exec);
|
||||
|
||||
try_tryflag = save_try_tryflag;
|
||||
--try_tryflag;
|
||||
|
||||
/* Don't record errflag here, may be reset. However, */
|
||||
/* endval should show failure when there is an error. */
|
||||
|
|
Loading…
Reference in a new issue