/* <--- here ends the logic shared by perl.h and makedef.pl */
/*
-=for apidoc_section Compiler directives
+=for apidoc_section $directives
=for apidoc AmnUu|void|EXTERN_C
When not compiling using C++, expands to nothing.
Otherwise is used in a declaration of a function to indicate the function
# endif
#endif
-/* this used to be off by default, now its on, see perlio.h */
-#define PERLIO_FUNCS_CONST
+/*
+=for apidoc_section $concurrency
+=for apidoc AmU|void|dTHXa|PerlInterpreter * a
+On threaded perls, set C<pTHX> to C<a>; on unthreaded perls, do nothing
+
+=for apidoc AmU|void|dTHXoa|PerlInterpreter * a
+Now a synonym for C<L</dTHXa>>.
+
+=cut
+*/
#ifdef PERL_IMPLICIT_CONTEXT
# ifndef MULTIPLICITY
*
* The only one Devel::PPPort handles is this; list it as deprecated
-=for apidoc_section Concurrency
+=for apidoc_section $concurrency
=for apidoc AmD|void|CPERLscope|void x
Now a no-op.
* cpp macros like PERL_UNUSED_DECL cannot work for this purpose, even
* if it were PERL_UNUSED_DECL(x), which it cannot be (see above).
-=for apidoc_section Compiler directives
+=for apidoc_section $directives
=for apidoc AmnU||PERL_UNUSED_DECL
Tells the compiler that the parameter in the function prototype just before it
is not necessarily expected to be used in the function. Not that many
#endif
/*
-=for apidoc_section Concurrency
+=for apidoc_section $concurrency
=for apidoc AmnU||dVAR
This is now a synonym for dNOOP: declare nothing
#endif
/*
-=for apidoc_section Compiler directives
+=for apidoc_section $directives
=for apidoc AmnUu|void|STMT_START
=for apidoc_item ||STMT_END
/* Macros for correct constant construction. These are in C99 <stdint.h>
* (so they will not be available in strict C89 mode), but they are nice, so
* let's define them if necessary.
-=for apidoc_section Integer configuration values
+=for apidoc_section $integer
=for apidoc Am|I16|INT16_C|number
=for apidoc_item |I32|INT32_C|number
=for apidoc_item |I64|INT64_C|number
# endif
/*
-=for apidoc_section Integer configuration values
+=for apidoc_section $integer
=for apidoc Am||INTMAX_C|number
Returns a token the C compiler recognizes for the constant C<number> of the
widest integer type on the machine. For example, if the machine has C<long
#define MALLOC_TOO_LATE_FOR(ch) TOO_LATE_FOR_(ch, " with $ENV{PERL_MALLOC_OPT}")
#define MALLOC_CHECK_TAINT2(argc,argv) MALLOC_CHECK_TAINT(argc,argv,NULL)
+/*
+=for apidoc Am|void|memzero|void * d|Size_t l
+Set the C<l> bytes starting at C<*d> to all zeroes.
+
+=cut
+*/
#ifndef memzero
# define memzero(d,l) memset(d,0,l)
#endif
#endif
/*
-=for apidoc_section Errno
+=for apidoc_section $errno
=for apidoc m|void|SETERRNO|int errcode|int vmserrcode
#endif
/*
-=for apidoc_section Warning and Dieing
+=for apidoc_section $warning
=for apidoc Amn|SV *|ERRSV
#endif
/*
-=for apidoc_section SV Handling
+=for apidoc_section $SV
=for apidoc Amn|SV *|DEFSV
Returns the SV associated with C<$_>
* longer need that. XS modules can (and do) use this name, so it must remain
* a part of the API that's visible to modules.
-=for apidoc_section String Handling
+=for apidoc_section $string
=for apidoc ATmD|int|my_sprintf|NN char *buffer|NN const char *pat|...
Do NOT use this due to the possibility of overflowing C<buffer>. Instead use
# define PTR2ul(p) INT2PTR(unsigned long,p)
#endif
+/*
+=for apidoc_section Casting
+=for apidoc Cyh|type|NUM2PTR|type|int value
+You probably want to be using L<C</INT2PTR>> instead.
+
+=cut
+*/
+
#define NUM2PTR(any,d) (any)(PTRV)(d)
#define PTR2IV(p) INT2PTR(IV,p)
#define PTR2UV(p) INT2PTR(UV,p)
#define my_atof2(a,b) my_atof3(a,b,0)
/*
+=for apidoc_section $numeric
+=for apidoc AmT|NV|Perl_acos|NV x
+=for apidoc_item |NV|Perl_asin|NV x
+=for apidoc_item |NV|Perl_atan|NV x
+=for apidoc_item |NV|Perl_atan2|NV x|NV y
+=for apidoc_item |NV|Perl_ceil|NV x
+=for apidoc_item |NV|Perl_cos|NV x
+=for apidoc_item |NV|Perl_cosh|NV x
+=for apidoc_item |NV|Perl_exp|NV x
+=for apidoc_item |NV|Perl_floor|NV x
+=for apidoc_item |NV|Perl_fmod|NV x|NV y
+=for apidoc_item |NV|Perl_frexp|NV x|int *exp
+=for apidoc_item |IV|Perl_isfinite|NV x
+=for apidoc_item |IV|Perl_isinf|NV x
+=for apidoc_item |IV|Perl_isnan|NV x
+=for apidoc_item |NV|Perl_ldexp|NV x|int exp
+=for apidoc_item |NV|Perl_log|NV x
+=for apidoc_item |NV|Perl_log10|NV x
+=for apidoc_item |NV|Perl_modf|NV x|NV *iptr
+=for apidoc_item |NV|Perl_pow|NV x|NV y
+=for apidoc_item |NV|Perl_sin|NV x
+=for apidoc_item |NV|Perl_sinh|NV x
+=for apidoc_item |NV|Perl_sqrt|NV x
+=for apidoc_item |NV|Perl_tan|NV x
+=for apidoc_item |NV|Perl_tanh|NV x
+
+These perform the corresponding mathematical operation on the operand(s), using
+the libc function designed for the task that has just enough precision for an
+NV on this platform. If no such function with sufficient precision exists,
+the highest precision one available is used.
+
+=cut
+*/
+
+/*
* CHAR_MIN and CHAR_MAX are not included here, as the (char) type may be
* ambiguous. It may be equivalent to (signed char) or (unsigned char)
* depending on local options. Until Configure detects this (or at least
#endif
/*
-=for apidoc_section Integer configuration values
+=for apidoc_section $integer
=for apidoc AmnU||PERL_INT_MAX
=for apidoc_item ||PERL_INT_MIN
typedef struct io IO;
typedef struct context PERL_CONTEXT;
typedef struct block BLOCK;
+typedef struct invlist INVLIST;
typedef struct magic MAGIC;
typedef struct xpv XPV;
#endif
/*
-=for apidoc_section Embedding and Interpreter Cloning
+=for apidoc_section $embedding
=for apidoc Am|void|PERL_SYS_INIT|int *argc|char*** argv
Provides system-specific tune up of the C runtime environment necessary to
#define PNfARG(pn) (int)1, (UV)PadnameLEN(pn), (void *)PadnamePV(pn)
#ifdef PERL_CORE
-/* not used; but needed for backward compatibility with XS code? - RMB */
+/* not used; but needed for backward compatibility with XS code? - RMB
+=for apidoc AmnD|const char *|UVf
+
+Obsolete form of C<UVuf>, which you should convert to instead use
+
+=cut
+*/
# undef UVf
#elif !defined(UVf)
# define UVf UVuf
#endif
/*
-=for apidoc_section Compiler directives
+=for apidoc_section $directives
=for apidoc Am||LIKELY|bool expr
out of range floating point values to integers *is* undefined behaviour,
and it is starting to bite.
-=for apidoc_section Casting
+=for apidoc_section $casting
=for apidoc Am|I32|I_32|NV what
Cast an NV to I32 while avoiding undefined C behavior
#define U_L(what) U_32(what)
/*
-=for apidoc_section Integer configuration values
+=for apidoc_section $integer
=for apidoc Amn|IV|IV_MAX
The largest signed integer that fits in an IV on this platform.
INIT("0");
/*
-=for apidoc_section Numeric Functions
+=for apidoc_section $numeric
=for apidoc AmTuU|const char *|PL_hexdigit|U8 value
This array, indexed by an integer, converts that value into the character that
cBOOL(PL_hints & (HINT_LOCALE|HINT_LOCALE_PARTIAL))
/*
-=for apidoc_section Locales
+=for apidoc_section $locale
=for apidoc Amn|bool|IN_LOCALE
* operations used by Perl, namely the decimal point, and even the thousands
* separator.)
-=for apidoc_section Locales
+=for apidoc_section $locale
=for apidoc Amn|void|DECLARATION_FOR_LC_NUMERIC_MANIPULATION
/*
-=for apidoc_section Numeric Functions
+=for apidoc_section $numeric
=for apidoc AmTR|NV|Strtod|NN const char * const s|NULLOK char ** e
#define IS_NUMBER_TRAILING 0x40 /* number has trailing trash */
/*
-=for apidoc_section Numeric Functions
+=for apidoc_section $numeric
=for apidoc AmdR|bool|GROK_NUMERIC_RADIX|NN const char **sp|NN const char *send
#define PERL_MAGIC_UTF8_CACHESIZE 2
+#ifdef PERL_CORE
+
#define PERL_UNICODE_STDIN_FLAG 0x0001
#define PERL_UNICODE_STDOUT_FLAG 0x0002
#define PERL_UNICODE_STDERR_FLAG 0x0004
#define PERL_UNICODE_WIDESYSCALLS 'W'
#define PERL_UNICODE_UTF8CACHEASSERT 'a'
+#endif
+
/*
-=for apidoc_section Signals
+=for apidoc_section $signals
=for apidoc Amn|U32|PERL_SIGNALS_UNSAFE_FLAG
If this bit in C<PL_signals> is set, the system is uing the pre-Perl 5.8
unsafe signals. See L<perlrun/PERL_SIGNALS> and L<perlipc/Deferred Signals
#define PERL_SIGNALS_UNSAFE_FLAG 0x0001
/*
-=for apidoc_section Numeric Functions
+=for apidoc_section $numeric
-=for apidoc Am|int|PERL_ABS|int
+=for apidoc Am|int|PERL_ABS|int x
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
/*
-=for apidoc_section Utility Functions
+=for apidoc_section $utility
=for apidoc Am|bool|IS_SAFE_SYSCALL|NN const char *pv|STRLEN len|NN const char *what|NN const char *op_name