diff options
author | Nicolas R <atoomic@cpan.org> | 2020-03-10 11:14:04 -0600 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2020-03-16 10:37:17 +1100 |
commit | 94c8b9c1f0f31f0e85c11a61ad166ea156ae2b3a (patch) | |
tree | fb8784fec659db0d521401acd43a18580870cffb /scope.c | |
parent | 7c1815b7942f8c7e3651d98060ca7a0760e6483c (diff) | |
download | perl-94c8b9c1f0f31f0e85c11a61ad166ea156ae2b3a.tar.gz |
Add macro to free and set cop_warnings
This is avoiding the boilerplate to free
the cop_warning string when setting it.
Diffstat (limited to 'scope.c')
-rw-r--r-- | scope.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -1448,9 +1448,7 @@ Perl_leave_scope(pTHX_ I32 base) case SAVEt_COMPILE_WARNINGS: a0 = ap[0]; - if (!specialWARN(PL_compiling.cop_warnings)) - PerlMemShared_free(PL_compiling.cop_warnings); - PL_compiling.cop_warnings = (STRLEN*)a0.any_ptr; + free_and_set_cop_warnings(PL_compiling, (STRLEN*) a0.any_ptr); break; case SAVEt_PARSER: |