summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2017-08-04 09:48:06 +0100
committerDavid Mitchell <davem@iabyn.com>2017-08-04 09:48:06 +0100
commitd24f6c9be3a37fb78fb01ef4ae0c5ec13ad4e685 (patch)
tree6795a0ca4e79bdf2b31f351e627f783d843551ff /sv.h
parentfde84d2e7382e53c871f09ac324785f8accc38b3 (diff)
downloadperl-d24f6c9be3a37fb78fb01ef4ae0c5ec13ad4e685.tar.gz
SvTRUE(): add code comment
explain that the '!= 0' is acting as a bool cast (since SvTRUE() is supposed to return a bool value rather than an int value).
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sv.h b/sv.h
index 198d1d1d3c..a31bd73a52 100644
--- a/sv.h
+++ b/sv.h
@@ -1775,7 +1775,7 @@ Like C<sv_utf8_upgrade>, but doesn't do magic on C<sv>.
: SvPOK(sv) \
? SvPVXtrue(sv) \
: SvIOK(sv) \
- ? (SvIVX(sv) != 0) \
+ ? (SvIVX(sv) != 0 /* cast to bool */) \
: (SvROK(sv) && !( SvOBJECT(SvRV(sv)) \
&& HvAMAGIC(SvSTASH(SvRV(sv))))) \
? TRUE \