summaryrefslogtreecommitdiff
path: root/scope.h
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2022-11-01 14:22:45 +0100
committerYves Orton <demerphq@gmail.com>2022-11-02 08:49:32 +0100
commit39cf7760652873f4bf49a7e86c4762c40edf05c2 (patch)
tree14697c951124474d5692a405cce7f843d9384373 /scope.h
parenta589f4b93cf3864d7f665d0974e2d36f028b00b6 (diff)
downloadperl-39cf7760652873f4bf49a7e86c4762c40edf05c2.tar.gz
scope.* - more flexible ways to save warning bits
Diffstat (limited to 'scope.h')
-rw-r--r--scope.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/scope.h b/scope.h
index e3a672a4e7..3b5b37cf75 100644
--- a/scope.h
+++ b/scope.h
@@ -220,7 +220,8 @@ scope has the given name. C<name> must be a literal string.
could have done savefreesharedpvREF, but this way actually seems cleaner,
as it simplifies the code that does the saves, and reduces the load on the
save stack. */
-#define SAVECOMPILEWARNINGS() save_pushptr(PL_compiling.cop_warnings, SAVEt_COMPILE_WARNINGS)
+#define SAVECOPWARNINGS(cop) save_pushptrptr((cop),(cop)->cop_warnings, SAVEt_COMPILE_WARNINGS)
+#define SAVECOMPILEWARNINGS() SAVECOPWARNINGS(&PL_compiling)
#define SAVEPARSER(p) save_pushptr((p), SAVEt_PARSER)