diff options
author | Father Chrysostomos <sprout@cpan.org> | 2010-09-24 22:22:26 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-09-24 22:22:26 -0700 |
commit | 396a5c010b97dacac9ad5dd6e03dce6156d95cb7 (patch) | |
tree | ffc905c6ee58099f509b37e4db7516730638429e /sv.h | |
parent | a7e935015aa7c242f0e4ad14366401108880ed0b (diff) | |
download | perl-396a5c010b97dacac9ad5dd6e03dce6156d95cb7.tar.gz |
define SvTRUE_nomg for compilers other than gcc
This time I *really* broke the Windows build!
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -1707,6 +1707,21 @@ Like sv_utf8_upgrade, but doesn't do magic on C<sv> : SvNOK(sv) \ ? SvNVX(sv) != 0.0 \ : sv_2bool(sv) ) +# define SvTRUE_nomg(sv) ( \ + !sv \ + ? 0 \ + : SvPOK(sv) \ + ? ((PL_Xpv = (XPV*)SvANY(PL_Sv = (sv))) && \ + (PL_Xpv->xpv_cur > 1 || \ + (PL_Xpv->xpv_cur && *PL_Sv->sv_u.svu_pv != '0')) \ + ? 1 \ + : 0) \ + : \ + SvIOK(sv) \ + ? SvIVX(sv) != 0 \ + : SvNOK(sv) \ + ? SvNVX(sv) != 0.0 \ + : sv_2bool_flags(sv,0) ) # define SvTRUEx(sv) ((PL_Sv = (sv)), SvTRUE(PL_Sv)) #endif /* __GNU__ */ |