summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2003-08-09 15:51:44 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-08-09 21:08:59 +0000
commit14f338dc60207c41838439f6f09615a0c4c9bf39 (patch)
treefea73174b445281e731d75407b0acf5c55163902 /scope.c
parent384679aa783f7270f4f3edc35b03682e7825671f (diff)
downloadperl-14f338dc60207c41838439f6f09615a0c4c9bf39.tar.gz
add "$lexical not available" warning in C<for my $lex ()>
Message-ID: <20030809135144.GC4997@fdgroup.com> p4raw-id: //depot/perl@20591
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/scope.c b/scope.c
index ff45b0da43..33d891e13a 100644
--- a/scope.c
+++ b/scope.c
@@ -281,6 +281,18 @@ Perl_save_shared_pvref(pTHX_ char **str)
SSPUSHINT(SAVEt_SHARED_PVREF);
}
+/* set the SvFLAGS specified by mask to the values in val */
+
+void
+Perl_save_set_svflags(pTHX_ SV* sv, U32 mask, U32 val)
+{
+ SSCHECK(4);
+ SSPUSHPTR(sv);
+ SSPUSHINT(mask);
+ SSPUSHINT(val);
+ SSPUSHINT(SAVEt_SET_SVFLAGS);
+}
+
void
Perl_save_gp(pTHX_ GV *gv, I32 empty)
{
@@ -1036,6 +1048,15 @@ Perl_leave_scope(pTHX_ I32 base)
AvARRAY((PAD*)ptr)[off] = (SV*)SSPOPPTR;
}
break;
+ case SAVEt_SET_SVFLAGS:
+ {
+ U32 val = (U32)SSPOPINT;
+ U32 mask = (U32)SSPOPINT;
+ sv = (SV*)SSPOPPTR;
+ SvFLAGS(sv) &= ~mask;
+ SvFLAGS(sv) |= val;
+ }
+ break;
default:
Perl_croak(aTHX_ "panic: leave_scope inconsistency");
}