summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-04-14 20:44:27 +0000
committerNicholas Clark <nick@ccl4.org>2006-04-14 20:44:27 +0000
commit68da3b2f7c7c528e65bc6efc19ca01bacb8f7f98 (patch)
tree69e75b823ed74c9fcf43ef268af644b5559ec913 /scope.c
parent92c6daad83acab71abd7df8769e308064578da8e (diff)
downloadperl-68da3b2f7c7c528e65bc6efc19ca01bacb8f7f98.tar.gz
Change SAVECOPWARNINGS(c) to SAVECOMPILEWARNINGS() - it's only used to
save the warnings on PL_compiling, so constraining its use to what we can test seems to make sense. Particularly as testing Perl_ss_dup is tricky. p4raw-id: //depot/perl@27805
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/scope.c b/scope.c
index 94f648af16..33763a77f1 100644
--- a/scope.c
+++ b/scope.c
@@ -984,16 +984,13 @@ Perl_leave_scope(pTHX_ I32 base)
i = SSPOPINT;
CopARYBASE_set((COP *)ptr, i);
break;
- case SAVEt_COP_WARNINGS:
- {
- COP *const cop = SSPOPPTR;
- ptr = SSPOPPTR;
+ case SAVEt_COMPILE_WARNINGS:
+ ptr = SSPOPPTR;
- if (!specialWARN(cop->cop_warnings))
- PerlMemShared_free(cop->cop_warnings);
+ if (!specialWARN(PL_compiling.cop_warnings))
+ PerlMemShared_free(PL_compiling.cop_warnings);
- cop->cop_warnings = ptr;
- }
+ PL_compiling.cop_warnings = ptr;
break;
case SAVEt_RE_STATE:
{