summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-08-04 18:22:16 -0600
committerKarl Williamson <khw@cpan.org>2019-09-02 21:52:10 -0600
commit25ba28ce716db4c1eb633ab17eeb74165ae219a4 (patch)
treedb7095e5d6eb33971d9e34237d0cdc3eda669ef6 /handy.h
parent022f6832fbfd92fe11f107f3683107b91ef9b07c (diff)
downloadperl-25ba28ce716db4c1eb633ab17eeb74165ae219a4.tar.gz
perlapi: Document cBOOL
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/handy.h b/handy.h
index 0170773533..855c2322d9 100644
--- a/handy.h
+++ b/handy.h
@@ -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.