diff options
author | Yves Orton <demerphq@gmail.com> | 2022-11-01 15:31:24 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2022-11-02 08:49:32 +0100 |
commit | f8552c1a7e2b27e9c88f12e4569bbdf7218d0f27 (patch) | |
tree | fd66ed9b9acd02349954ae0c59a89573475468c7 /mg.c | |
parent | f0774ef1d0fdfb05be43101715093189f4b7c842 (diff) | |
download | perl-f8552c1a7e2b27e9c88f12e4569bbdf7218d0f27.tar.gz |
cop.h - get rid of the STRLEN* stuff from cop_warnings
With RCPV strings we can use the RCPV_LEN() macro, and
make this logic a little less weird.
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1082,8 +1082,8 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg) sv_setpvn(sv, WARN_ALLstring, WARNsize); } else { - sv_setpvn(sv, (char *) (PL_compiling.cop_warnings + 1), - *PL_compiling.cop_warnings); + sv_setpvn(sv, PL_compiling.cop_warnings, + RCPV_LEN(PL_compiling.cop_warnings)); } } break; |