diff options
author | Zefram <zefram@fysh.org> | 2017-11-29 19:27:49 +0000 |
---|---|---|
committer | Zefram <zefram@fysh.org> | 2017-11-29 19:27:49 +0000 |
commit | 619bbb9ab0f3cffda05f980b2ebb5bf660ad6962 (patch) | |
tree | cf70aae25e996d4bb11db230639148fc32ed0c61 /sv.c | |
parent | df16d5564aa82a94953a0bccfc9917bc140ead02 (diff) | |
download | perl-619bbb9ab0f3cffda05f980b2ebb5bf660ad6962.tar.gz |
make loop control apply to "given"
A "given" construct is now officially a one-iteration loop.
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -14606,6 +14606,7 @@ Perl_cx_dup(pTHX_ PERL_CONTEXT *cxs, I32 ix, I32 max, CLONE_PARAMS* param) /* FALLTHROUGH */ case CXt_LOOP_LIST: case CXt_LOOP_LAZYIV: + case CXt_LOOP_GIVEN: /* code common to all 'for' CXt_LOOP_* types */ ncx->blk_loop.itersave = sv_dup_inc(ncx->blk_loop.itersave, param); @@ -14638,10 +14639,6 @@ Perl_cx_dup(pTHX_ PERL_CONTEXT *cxs, I32 ix, I32 max, CLONE_PARAMS* param) ncx->blk_format.dfoutgv = gv_dup_inc(ncx->blk_format.dfoutgv, param); break; - case CXt_GIVEN: - ncx->blk_loop.itersave = - sv_dup_inc(ncx->blk_loop.itersave, param); - break; case CXt_BLOCK: case CXt_NULL: case CXt_WHEN: |