diff options
Diffstat (limited to 'scope.h')
-rw-r--r-- | scope.h | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -215,13 +215,11 @@ scope has the given name. C<name> must be a literal string. PL_curstackinfo->si_stack = (t); \ } STMT_END -/* Need to do the cop warnings like this, rather than a "SAVEFREESHAREDPV", - because realloc() means that the value can actually change. Possibly - 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 SAVECOPWARNINGS(cop) save_pushptrptr((cop),(cop)->cop_warnings, SAVEt_COMPILE_WARNINGS) -#define SAVECOMPILEWARNINGS() SAVECOPWARNINGS(&PL_compiling) +/* Note these are special, we can't just use a save_pushptrptr() on them + * as the target might change after a fork or thread start. */ +#define SAVECOMPILEWARNINGS() save_pushptr(PL_compiling.cop_warnings, SAVEt_COMPILE_WARNINGS) +#define SAVECURCOPWARNINGS() save_pushptr(PL_curcop->cop_warnings, SAVEt_CURCOP_WARNINGS) + #define SAVEPARSER(p) save_pushptr((p), SAVEt_PARSER) |