diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-01-24 12:50:32 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-01-24 12:50:32 +0000 |
commit | c6fdafd0fef3b735d3a7b9441840698d27fe4e6b (patch) | |
tree | 908c7569373a36970a0c8fe3311798a60b514fe4 /pp_hot.c | |
parent | 8b73ab1881b775e12ace39efe757716ab526e9db (diff) | |
download | perl-c6fdafd0fef3b735d3a7b9441840698d27fe4e6b.tar.gz |
Change the context type of for ($a .. $b) to CXt_LOOP_LAZYIV, and
assert that it isn't using cx->blk_loop.iterlval.
Fix a casting bug when assigning a sentinal to cx->blk_loop.iterary.
p4raw-id: //depot/perl@33061
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1914,7 +1914,7 @@ PP(pp_iter) av = CxTYPE(cx) == CXt_LOOP_STACK ? PL_curstack : cx->blk_loop.iterary; if (SvTYPE(av) != SVt_PVAV) { /* iterate ($min .. $max) */ - if (cx->blk_loop.iterlval) { + if (CxTYPE(cx) != CXt_LOOP_LAZYIV) { /* string increment */ register SV* cur = cx->blk_loop.iterlval; STRLEN maxlen = 0; @@ -1944,6 +1944,7 @@ PP(pp_iter) RETPUSHNO; } /* integer increment */ + assert(!cx->blk_loop.iterlval); if (cx->blk_loop.iterix > cx->blk_loop.itermax) RETPUSHNO; |