summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2017-11-29 19:27:49 +0000
committerZefram <zefram@fysh.org>2017-11-29 19:27:49 +0000
commit619bbb9ab0f3cffda05f980b2ebb5bf660ad6962 (patch)
treecf70aae25e996d4bb11db230639148fc32ed0c61 /sv.c
parentdf16d5564aa82a94953a0bccfc9917bc140ead02 (diff)
downloadperl-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.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sv.c b/sv.c
index 33387ee4f3..c589757d55 100644
--- a/sv.c
+++ b/sv.c
@@ -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: