summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/sv.h b/sv.h
index b80aba1766..ad7046a559 100644
--- a/sv.h
+++ b/sv.h
@@ -1774,9 +1774,11 @@ Like C<sv_utf8_upgrade>, but doesn't do magic on C<sv>.
? 0 \
: SvPOK(sv) \
? SvPVXtrue(sv) \
- : (SvFLAGS(sv) & (SVf_IOK|SVf_NOK)) \
- ? ( (SvIOK(sv) && SvIVX(sv) != 0) \
- || (SvNOK(sv) && SvNVX(sv) != 0.0)) \
+ : SvIOK(sv) \
+ ? SvIVX(sv) \
+ : (SvROK(sv) && !( SvOBJECT(SvRV(sv)) \
+ && HvAMAGIC(SvSTASH(SvRV(sv))))) \
+ ? TRUE \
: (fallback))
#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)