From: Vincent Pit Date: Fri, 27 Mar 2015 19:45:02 +0000 (-0300) Subject: Also preserve PL_scopestack[cx->blk_oldscopesp - 1] in formats X-Git-Tag: v0.27~2 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=c827e4d5a2951be50c2bffc478035891b8ceb8c5;p=perl%2Fmodules%2FScope-Upper.git Also preserve PL_scopestack[cx->blk_oldscopesp - 1] in formats --- diff --git a/Upper.xs b/Upper.xs index 7024815..5b0685d 100644 --- a/Upper.xs +++ b/Upper.xs @@ -1010,7 +1010,7 @@ static void su_pop(pTHX_ void *ud) { #if SU_HAS_PERL(5, 19, 4) cx = cxstack + cxstack_ix; - if (CxTYPE(cx) == CXt_SUB) + if (CxTYPE(cx) == CXt_SUB || CxTYPE(cx) == CXt_FORMAT) save = PL_scopestack[cx->blk_oldscopesp - 1]; #endif @@ -1018,7 +1018,7 @@ static void su_pop(pTHX_ void *ud) { leave_scope(base); #if SU_HAS_PERL(5, 19, 4) - if (CxTYPE(cx) == CXt_SUB) + if (CxTYPE(cx) == CXt_SUB || CxTYPE(cx) == CXt_FORMAT) PL_scopestack[cx->blk_oldscopesp - 1] = save; #endif }