summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2023-03-22 09:51:39 +0100
committerYves Orton <demerphq@gmail.com>2023-03-29 20:54:49 +0800
commitcb6188df375141f4ec9f33cc918fd640b1ff81b6 (patch)
tree7732e6b532d54448fee99f99d215af8aea6874e6 /perl.c
parentfe67e58303186e966b34e7dbff135b02fbef325e (diff)
downloadperl-cb6188df375141f4ec9f33cc918fd640b1ff81b6.tar.gz
sv.c - don't cast SVTYPEMASK to svtype, use SvIS_FREED() instead.
svtype is an enum with 18 values. SVTYPEMASK is 31. A picky compiler (like on HPUX) will complain that casting 31 to a svtype is an error. We have SvIS_FREED() to do this properly anyway.
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl.c b/perl.c
index 13bbaa6db3..d4dc0f9fda 100644
--- a/perl.c
+++ b/perl.c
@@ -1429,7 +1429,7 @@ perl_destruct(pTHXx)
for (sva = PL_sv_arenaroot; sva; sva = MUTABLE_SV(SvANY(sva))) {
svend = &sva[SvREFCNT(sva)];
for (sv = sva + 1; sv < svend; ++sv) {
- if (SvTYPE(sv) != (svtype)SVTYPEMASK) {
+ if (!SvIS_FREED(sv)) {
PerlIO_printf(Perl_debug_log, "leaked: sv=0x%p"
" flags=0x%" UVxf
" refcnt=%" UVuf pTHX__FORMAT "\n"