summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-08-04 18:19:25 -0600
committerKarl Williamson <khw@cpan.org>2019-09-02 21:52:10 -0600
commita349b73b665112e0d7d3ff862f10d96dd445fca0 (patch)
tree17b6a6023cd70d4b683caa290568f29b95a2e36d /perl.h
parentb87d9527bf27feeeae2be61d0315b95466718d67 (diff)
downloadperl-a349b73b665112e0d7d3ff862f10d96dd445fca0.tar.gz
perlapi: Document GROK_NUMERIC_RADIX, PERL_ABS
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/perl.h b/perl.h
index 2f8c25ac10..62d67d84f4 100644
--- a/perl.h
+++ b/perl.h
@@ -7020,6 +7020,15 @@ int flock(int fd, int op);
#define IS_NUMBER_NAN 0x20 /* this is not */
#define IS_NUMBER_TRAILING 0x40 /* number has trailing trash */
+/*
+=head1 Numeric functions
+
+=for apidoc AmdR|bool|GROK_NUMERIC_RADIX|NN const char **sp|NN const char *send
+
+A synonym for L</grok_numeric_radix>
+
+=cut
+*/
#define GROK_NUMERIC_RADIX(sp, send) grok_numeric_radix(sp, send)
/* Input flags: */
@@ -7100,8 +7109,20 @@ extern void moncontrol(int);
#define PERL_SIGNALS_UNSAFE_FLAG 0x0001
-/* Use instead of abs() since abs() forces its argument to be an int,
- * but also beware since this evaluates its argument twice, so no x++. */
+/*
+=head1 Numeric functions
+
+=for apidoc Am|int|PERL_ABS|int
+
+Typeless C<abs> or C<fabs>, I<etc>. (The usage below indicates it is for
+integers, but it works for any type.) Use instead of these, since the C
+library ones force their argument to be what it is expecting, potentially
+leading to disaster. But also beware that this evaluates its argument twice,
+so no C<x++>.
+
+=cut
+*/
+
#define PERL_ABS(x) ((x) < 0 ? -(x) : (x))
#if defined(__DECC) && defined(__osf__)