summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2022-11-01 15:31:24 +0100
committerYves Orton <demerphq@gmail.com>2022-11-02 08:49:32 +0100
commitf8552c1a7e2b27e9c88f12e4569bbdf7218d0f27 (patch)
treefd66ed9b9acd02349954ae0c59a89573475468c7 /pp_ctl.c
parentf0774ef1d0fdfb05be43101715093189f4b7c842 (diff)
downloadperl-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 'pp_ctl.c')
-rw-r--r--pp_ctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 39994a39b3..d0b5d8d013 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2074,7 +2074,7 @@ PP(pp_caller)
mPUSHi(CopHINTS_get(cx->blk_oldcop));
{
SV * mask ;
- STRLEN * const old_warnings = cx->blk_oldcop->cop_warnings ;
+ char *old_warnings = cx->blk_oldcop->cop_warnings;
if (old_warnings == pWARN_NONE)
mask = newSVpvn(WARN_NONEstring, WARNsize) ;
@@ -2085,7 +2085,7 @@ PP(pp_caller)
mask = newSVpvn(WARN_ALLstring, WARNsize) ;
}
else
- mask = newSVpvn((char *) (old_warnings + 1), old_warnings[0]);
+ mask = newSVpvn(old_warnings, RCPV_LEN(old_warnings));
mPUSHs(mask);
}