summaryrefslogtreecommitdiff
path: root/op.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 /op.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 'op.c')
-rw-r--r--op.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/op.c b/op.c
index 6765efb20b..a4d714758a 100644
--- a/op.c
+++ b/op.c
@@ -1331,7 +1331,7 @@ S_cop_free(pTHX_ COP* cop)
}
CopFILE_free(cop);
if (! specialWARN(cop->cop_warnings))
- cop->cop_warnings = (STRLEN*)rcpv_free((char*)cop->cop_warnings);
+ cop->cop_warnings = rcpv_free(cop->cop_warnings);
cophh_free(CopHINTHASH_get(cop));
if (PL_curcop == cop)
@@ -15230,13 +15230,13 @@ const_av_xsub(pTHX_ CV* cv)
* This is the e implementation for the DUP_WARNINGS() macro
*/
-STRLEN*
-Perl_dup_warnings(pTHX_ STRLEN* warnings)
+char *
+Perl_dup_warnings(pTHX_ char* warnings)
{
if (warnings == NULL || specialWARN(warnings))
return warnings;
- return (STRLEN*)rcpv_copy((char*)warnings);
+ return rcpv_copy(warnings);
}
/*