diff options
author | Karl Williamson <khw@cpan.org> | 2019-08-04 18:22:16 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2019-09-02 21:52:10 -0600 |
commit | 25ba28ce716db4c1eb633ab17eeb74165ae219a4 (patch) | |
tree | db7095e5d6eb33971d9e34237d0cdc3eda669ef6 /handy.h | |
parent | 022f6832fbfd92fe11f107f3683107b91ef9b07c (diff) | |
download | perl-25ba28ce716db4c1eb633ab17eeb74165ae219a4.tar.gz |
perlapi: Document cBOOL
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -97,10 +97,17 @@ Null SV pointer. (No longer available when C<PERL_CORE> is defined.) # define HAS_BOOL 1 #endif -/* cast-to-bool. A simple (bool) cast may not do the right thing: if bool is - * defined as char for example, then the cast from int is - * implementation-defined (bool)!!(cbool) in a ternary triggers a bug in xlc on - * AIX */ +/* +=for apidoc Am|bool|cBOOL|bool expr + +Cast-to-bool. A simple S<C<(bool) I<expr>>> cast may not do the right thing: +if C<bool> is defined as C<char>, for example, then the cast from C<int> is +implementation-defined. + +C<(bool)!!(cbool)> in a ternary triggers a bug in xlc on AIX + +=cut +*/ #define cBOOL(cbool) ((cbool) ? (bool)1 : (bool)0) /* Try to figure out __func__ or __FUNCTION__ equivalent, if any. |