.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.20)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
.    de IX
.    tm Index:\\$1\t\\n%\t"\\$2"
..
.    nr % 0
.    rr F
.\}
.el \{\
.    de IX
..
.\}
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.\}
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.\}
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.\}
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "PERLAPI 1"
.TH PERLAPI 1 "2023-10-25" "perl v5.16.3" "Perl Programmers Reference Guide"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
perlapi \- autogenerated documentation for the perl public API
.SH "DESCRIPTION"
.IX Xref "Perl API API api"
.IX Header "DESCRIPTION"
This file contains the documentation of the perl public \s-1API\s0 generated by
\&\fIembed.pl\fR, specifically a listing of functions, macros, flags, and variables
that may be used by extension writers.  At the end
is a list of functions which have yet to be documented.  The interfaces of
those are subject to change without notice.  Any functions not listed here are
not part of the public \s-1API\s0, and should not be used by extension writers at
all.  For these reasons, blindly using functions listed in proto.h is to be
avoided when writing extensions.
.PP
Note that all Perl \s-1API\s0 global variables must be referenced with the \f(CW\*(C`PL_\*(C'\fR
prefix.  Some macros are provided for compatibility with the older,
unadorned names, but this support may be disabled in a future release.
.PP
Perl was originally written to handle US-ASCII only (that is characters
whose ordinal numbers are in the range 0 \- 127).
And documentation and comments may still use the term \s-1ASCII\s0, when
sometimes in fact the entire range from 0 \- 255 is meant.
.PP
Note that Perl can be compiled and run under \s-1EBCDIC\s0 (See perlebcdic)
or \s-1ASCII\s0.  Most of the documentation (and even comments in the code)
ignore the \s-1EBCDIC\s0 possibility.  
For almost all purposes the differences are transparent.
As an example, under \s-1EBCDIC\s0,
instead of \s-1UTF\-8\s0, UTF-EBCDIC is used to encode Unicode strings, and so
whenever this documentation refers to \f(CW\*(C`utf8\*(C'\fR
(and variants of that name, including in function names),
it also (essentially transparently) means \f(CW\*(C`UTF\-EBCDIC\*(C'\fR.
But the ordinals of characters differ between \s-1ASCII\s0, \s-1EBCDIC\s0, and
the \s-1UTF\-\s0 encodings, and a string encoded in UTF-EBCDIC may occupy more bytes
than in \s-1UTF\-8\s0.
.PP
Also, on some \s-1EBCDIC\s0 machines, functions that are documented as operating on
US-ASCII (or Basic Latin in Unicode terminology) may in fact operate on all
256 characters in the \s-1EBCDIC\s0 range, not just the subset corresponding to
US-ASCII.
.PP
The listing below is alphabetical, case insensitive.
.ie n .SH """Gimme"" Values"
.el .SH "``Gimme'' Values"
.IX Header "Gimme Values"
.IP "\s-1GIMME\s0" 8
.IX Xref "GIMME"
.IX Item "GIMME"
A backward-compatible version of \f(CW\*(C`GIMME_V\*(C'\fR which can only return
\&\f(CW\*(C`G_SCALAR\*(C'\fR or \f(CW\*(C`G_ARRAY\*(C'\fR; in a void context, it returns \f(CW\*(C`G_SCALAR\*(C'\fR.
Deprecated.  Use \f(CW\*(C`GIMME_V\*(C'\fR instead.
.Sp
.Vb 1
\&        U32     GIMME
.Ve
.IP "\s-1GIMME_V\s0" 8
.IX Xref "GIMME_V"
.IX Item "GIMME_V"
The XSUB-writer's equivalent to Perl's \f(CW\*(C`wantarray\*(C'\fR.  Returns \f(CW\*(C`G_VOID\*(C'\fR,
\&\f(CW\*(C`G_SCALAR\*(C'\fR or \f(CW\*(C`G_ARRAY\*(C'\fR for void, scalar or list context,
respectively. See perlcall for a usage example.
.Sp
.Vb 1
\&        U32     GIMME_V
.Ve
.IP "G_ARRAY" 8
.IX Xref "G_ARRAY"
.IX Item "G_ARRAY"
Used to indicate list context.  See \f(CW\*(C`GIMME_V\*(C'\fR, \f(CW\*(C`GIMME\*(C'\fR and
perlcall.
.IP "G_DISCARD" 8
.IX Xref "G_DISCARD"
.IX Item "G_DISCARD"
Indicates that arguments returned from a callback should be discarded.  See
perlcall.
.IP "G_EVAL" 8
.IX Xref "G_EVAL"
.IX Item "G_EVAL"
Used to force a Perl \f(CW\*(C`eval\*(C'\fR wrapper around a callback.  See
perlcall.
.IP "G_NOARGS" 8
.IX Xref "G_NOARGS"
.IX Item "G_NOARGS"
Indicates that no arguments are being sent to a callback.  See
perlcall.
.IP "G_SCALAR" 8
.IX Xref "G_SCALAR"
.IX Item "G_SCALAR"
Used to indicate scalar context.  See \f(CW\*(C`GIMME_V\*(C'\fR, \f(CW\*(C`GIMME\*(C'\fR, and
perlcall.
.IP "G_VOID" 8
.IX Xref "G_VOID"
.IX Item "G_VOID"
Used to indicate void context.  See \f(CW\*(C`GIMME_V\*(C'\fR and perlcall.
.SH "Array Manipulation Functions"
.IX Header "Array Manipulation Functions"
.IP "AvFILL" 8
.IX Xref "AvFILL"
.IX Item "AvFILL"
Same as \f(CW\*(C`av_len()\*(C'\fR.  Deprecated, use \f(CW\*(C`av_len()\*(C'\fR instead.
.Sp
.Vb 1
\&        int     AvFILL(AV* av)
.Ve
.IP "av_clear" 8
.IX Xref "av_clear"
.IX Item "av_clear"
Clears an array, making it empty.  Does not free the memory the av uses to
store its list of scalars.  If any destructors are triggered as a result,
the av itself may be freed when this function returns.
.Sp
Perl equivalent: \f(CW\*(C`@myarray = ();\*(C'\fR.
.Sp
.Vb 1
\&        void    av_clear(AV *av)
.Ve
.IP "av_create_and_push" 8
.IX Xref "av_create_and_push"
.IX Item "av_create_and_push"
Push an \s-1SV\s0 onto the end of the array, creating the array if necessary.
A small internal helper function to remove a commonly duplicated idiom.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 2
\&        void    av_create_and_push(AV **const avp,
\&                                   SV *const val)
.Ve
.IP "av_create_and_unshift_one" 8
.IX Xref "av_create_and_unshift_one"
.IX Item "av_create_and_unshift_one"
Unshifts an \s-1SV\s0 onto the beginning of the array, creating the array if
necessary.
A small internal helper function to remove a commonly duplicated idiom.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 2
\&        SV**    av_create_and_unshift_one(AV **const avp,
\&                                          SV *const val)
.Ve
.IP "av_delete" 8
.IX Xref "av_delete"
.IX Item "av_delete"
Deletes the element indexed by \f(CW\*(C`key\*(C'\fR from the array, makes the element mortal,
and returns it.  If \f(CW\*(C`flags\*(C'\fR equals \f(CW\*(C`G_DISCARD\*(C'\fR, the element is freed and null
is returned.  Perl equivalent: \f(CW\*(C`my $elem = delete($myarray[$idx]);\*(C'\fR for the
non\-\f(CW\*(C`G_DISCARD\*(C'\fR version and a void-context \f(CW\*(C`delete($myarray[$idx]);\*(C'\fR for the
\&\f(CW\*(C`G_DISCARD\*(C'\fR version.
.Sp
.Vb 1
\&        SV*     av_delete(AV *av, I32 key, I32 flags)
.Ve
.IP "av_exists" 8
.IX Xref "av_exists"
.IX Item "av_exists"
Returns true if the element indexed by \f(CW\*(C`key\*(C'\fR has been initialized.
.Sp
This relies on the fact that uninitialized array elements are set to
\&\f(CW&PL_sv_undef\fR.
.Sp
Perl equivalent: \f(CW\*(C`exists($myarray[$key])\*(C'\fR.
.Sp
.Vb 1
\&        bool    av_exists(AV *av, I32 key)
.Ve
.IP "av_extend" 8
.IX Xref "av_extend"
.IX Item "av_extend"
Pre-extend an array.  The \f(CW\*(C`key\*(C'\fR is the index to which the array should be
extended.
.Sp
.Vb 1
\&        void    av_extend(AV *av, I32 key)
.Ve
.IP "av_fetch" 8
.IX Xref "av_fetch"
.IX Item "av_fetch"
Returns the \s-1SV\s0 at the specified index in the array.  The \f(CW\*(C`key\*(C'\fR is the
index.  If lval is true, you are guaranteed to get a real \s-1SV\s0 back (in case
it wasn't real before), which you can then modify.  Check that the return
value is non-null before dereferencing it to a \f(CW\*(C`SV*\*(C'\fR.
.Sp
See \*(L"Understanding the Magic of Tied Hashes and Arrays\*(R" in perlguts for
more information on how to use this function on tied arrays.
.Sp
The rough perl equivalent is \f(CW$myarray[$idx]\fR.
.Sp
.Vb 1
\&        SV**    av_fetch(AV *av, I32 key, I32 lval)
.Ve
.IP "av_fill" 8
.IX Xref "av_fill"
.IX Item "av_fill"
Set the highest index in the array to the given number, equivalent to
Perl's \f(CW\*(C`$#array = $fill;\*(C'\fR.
.Sp
The number of elements in the an array will be \f(CW\*(C`fill + 1\*(C'\fR after
\&\fIav_fill()\fR returns.  If the array was previously shorter, then the
additional elements appended are set to \f(CW\*(C`PL_sv_undef\*(C'\fR.  If the array
was longer, then the excess elements are freed.  \f(CW\*(C`av_fill(av, \-1)\*(C'\fR is
the same as \f(CW\*(C`av_clear(av)\*(C'\fR.
.Sp
.Vb 1
\&        void    av_fill(AV *av, I32 fill)
.Ve
.IP "av_len" 8
.IX Xref "av_len"
.IX Item "av_len"
Returns the highest index in the array.  The number of elements in the
array is \f(CW\*(C`av_len(av) + 1\*(C'\fR.  Returns \-1 if the array is empty.
.Sp
The Perl equivalent for this is \f(CW$#myarray\fR.
.Sp
.Vb 1
\&        I32     av_len(AV *av)
.Ve
.IP "av_make" 8
.IX Xref "av_make"
.IX Item "av_make"
Creates a new \s-1AV\s0 and populates it with a list of SVs.  The SVs are copied
into the array, so they may be freed after the call to av_make.  The new \s-1AV\s0
will have a reference count of 1.
.Sp
Perl equivalent: \f(CW\*(C`my @new_array = ($scalar1, $scalar2, $scalar3...);\*(C'\fR
.Sp
.Vb 1
\&        AV*     av_make(I32 size, SV **strp)
.Ve
.IP "av_pop" 8
.IX Xref "av_pop"
.IX Item "av_pop"
Pops an \s-1SV\s0 off the end of the array.  Returns \f(CW&PL_sv_undef\fR if the array
is empty.
.Sp
Perl equivalent: \f(CW\*(C`pop(@myarray);\*(C'\fR
.Sp
.Vb 1
\&        SV*     av_pop(AV *av)
.Ve
.IP "av_push" 8
.IX Xref "av_push"
.IX Item "av_push"
Pushes an \s-1SV\s0 onto the end of the array.  The array will grow automatically
to accommodate the addition.  This takes ownership of one reference count.
.Sp
Perl equivalent: \f(CW\*(C`push @myarray, $elem;\*(C'\fR.
.Sp
.Vb 1
\&        void    av_push(AV *av, SV *val)
.Ve
.IP "av_shift" 8
.IX Xref "av_shift"
.IX Item "av_shift"
Shifts an \s-1SV\s0 off the beginning of the
array.  Returns \f(CW&PL_sv_undef\fR if the 
array is empty.
.Sp
Perl equivalent: \f(CW\*(C`shift(@myarray);\*(C'\fR
.Sp
.Vb 1
\&        SV*     av_shift(AV *av)
.Ve
.IP "av_store" 8
.IX Xref "av_store"
.IX Item "av_store"
Stores an \s-1SV\s0 in an array.  The array index is specified as \f(CW\*(C`key\*(C'\fR.  The
return value will be \s-1NULL\s0 if the operation failed or if the value did not
need to be actually stored within the array (as in the case of tied
arrays). Otherwise, it can be dereferenced
to get the \f(CW\*(C`SV*\*(C'\fR that was stored
there (= \f(CW\*(C`val\*(C'\fR)).
.Sp
Note that the caller is responsible for suitably incrementing the reference
count of \f(CW\*(C`val\*(C'\fR before the call, and decrementing it if the function
returned \s-1NULL\s0.
.Sp
Approximate Perl equivalent: \f(CW\*(C`$myarray[$key] = $val;\*(C'\fR.
.Sp
See \*(L"Understanding the Magic of Tied Hashes and Arrays\*(R" in perlguts for
more information on how to use this function on tied arrays.
.Sp
.Vb 1
\&        SV**    av_store(AV *av, I32 key, SV *val)
.Ve
.IP "av_undef" 8
.IX Xref "av_undef"
.IX Item "av_undef"
Undefines the array.  Frees the memory used by the av to store its list of
scalars.  If any destructors are triggered as a result, the av itself may
be freed.
.Sp
.Vb 1
\&        void    av_undef(AV *av)
.Ve
.IP "av_unshift" 8
.IX Xref "av_unshift"
.IX Item "av_unshift"
Unshift the given number of \f(CW\*(C`undef\*(C'\fR values onto the beginning of the
array.  The array will grow automatically to accommodate the addition.  You
must then use \f(CW\*(C`av_store\*(C'\fR to assign values to these new elements.
.Sp
Perl equivalent: \f(CW\*(C`unshift @myarray, ( (undef) x $n );\*(C'\fR
.Sp
.Vb 1
\&        void    av_unshift(AV *av, I32 num)
.Ve
.IP "get_av" 8
.IX Xref "get_av"
.IX Item "get_av"
Returns the \s-1AV\s0 of the specified Perl global or package array with the given
name (so it won't work on lexical variables).  \f(CW\*(C`flags\*(C'\fR are passed 
to \f(CW\*(C`gv_fetchpv\*(C'\fR. If \f(CW\*(C`GV_ADD\*(C'\fR is set and the
Perl variable does not exist then it will be created.  If \f(CW\*(C`flags\*(C'\fR is zero
and the variable does not exist then \s-1NULL\s0 is returned.
.Sp
Perl equivalent: \f(CW\*(C`@{"$name"}\*(C'\fR.
.Sp
\&\s-1NOTE:\s0 the perl_ form of this function is deprecated.
.Sp
.Vb 1
\&        AV*     get_av(const char *name, I32 flags)
.Ve
.IP "newAV" 8
.IX Xref "newAV"
.IX Item "newAV"
Creates a new \s-1AV\s0.  The reference count is set to 1.
.Sp
Perl equivalent: \f(CW\*(C`my @array;\*(C'\fR.
.Sp
.Vb 1
\&        AV*     newAV()
.Ve
.IP "sortsv" 8
.IX Xref "sortsv"
.IX Item "sortsv"
Sort an array. Here is an example:
.Sp
.Vb 1
\&    sortsv(AvARRAY(av), av_len(av)+1, Perl_sv_cmp_locale);
.Ve
.Sp
Currently this always uses mergesort. See sortsv_flags for a more
flexible routine.
.Sp
.Vb 2
\&        void    sortsv(SV** array, size_t num_elts,
\&                       SVCOMPARE_t cmp)
.Ve
.IP "sortsv_flags" 8
.IX Xref "sortsv_flags"
.IX Item "sortsv_flags"
Sort an array, with various options.
.Sp
.Vb 2
\&        void    sortsv_flags(SV** array, size_t num_elts,
\&                             SVCOMPARE_t cmp, U32 flags)
.Ve
.SH "Callback Functions"
.IX Header "Callback Functions"
.IP "call_argv" 8
.IX Xref "call_argv"
.IX Item "call_argv"
Performs a callback to the specified named and package-scoped Perl subroutine 
with \f(CW\*(C`argv\*(C'\fR (a NULL-terminated array of strings) as arguments. See perlcall.
.Sp
Approximate Perl equivalent: \f(CW\*(C`&{"$sub_name"}(@$argv)\*(C'\fR.
.Sp
\&\s-1NOTE:\s0 the perl_ form of this function is deprecated.
.Sp
.Vb 2
\&        I32     call_argv(const char* sub_name, I32 flags,
\&                          char** argv)
.Ve
.IP "call_method" 8
.IX Xref "call_method"
.IX Item "call_method"
Performs a callback to the specified Perl method.  The blessed object must
be on the stack.  See perlcall.
.Sp
\&\s-1NOTE:\s0 the perl_ form of this function is deprecated.
.Sp
.Vb 1
\&        I32     call_method(const char* methname, I32 flags)
.Ve
.IP "call_pv" 8
.IX Xref "call_pv"
.IX Item "call_pv"
Performs a callback to the specified Perl sub.  See perlcall.
.Sp
\&\s-1NOTE:\s0 the perl_ form of this function is deprecated.
.Sp
.Vb 1
\&        I32     call_pv(const char* sub_name, I32 flags)
.Ve
.IP "call_sv" 8
.IX Xref "call_sv"
.IX Item "call_sv"
Performs a callback to the Perl sub whose name is in the \s-1SV\s0.  See
perlcall.
.Sp
\&\s-1NOTE:\s0 the perl_ form of this function is deprecated.
.Sp
.Vb 1
\&        I32     call_sv(SV* sv, VOL I32 flags)
.Ve
.IP "\s-1ENTER\s0" 8
.IX Xref "ENTER"
.IX Item "ENTER"
Opening bracket on a callback.  See \f(CW\*(C`LEAVE\*(C'\fR and perlcall.
.Sp
.Vb 1
\&                ENTER;
.Ve
.IP "eval_pv" 8
.IX Xref "eval_pv"
.IX Item "eval_pv"
Tells Perl to \f(CW\*(C`eval\*(C'\fR the given string and return an SV* result.
.Sp
\&\s-1NOTE:\s0 the perl_ form of this function is deprecated.
.Sp
.Vb 1
\&        SV*     eval_pv(const char* p, I32 croak_on_error)
.Ve
.IP "eval_sv" 8
.IX Xref "eval_sv"
.IX Item "eval_sv"
Tells Perl to \f(CW\*(C`eval\*(C'\fR the string in the \s-1SV\s0. It supports the same flags
as \f(CW\*(C`call_sv\*(C'\fR, with the obvious exception of G_EVAL. See perlcall.
.Sp
\&\s-1NOTE:\s0 the perl_ form of this function is deprecated.
.Sp
.Vb 1
\&        I32     eval_sv(SV* sv, I32 flags)
.Ve
.IP "\s-1FREETMPS\s0" 8
.IX Xref "FREETMPS"
.IX Item "FREETMPS"
Closing bracket for temporaries on a callback.  See \f(CW\*(C`SAVETMPS\*(C'\fR and
perlcall.
.Sp
.Vb 1
\&                FREETMPS;
.Ve
.IP "\s-1LEAVE\s0" 8
.IX Xref "LEAVE"
.IX Item "LEAVE"
Closing bracket on a callback.  See \f(CW\*(C`ENTER\*(C'\fR and perlcall.
.Sp
.Vb 1
\&                LEAVE;
.Ve
.IP "\s-1SAVETMPS\s0" 8
.IX Xref "SAVETMPS"
.IX Item "SAVETMPS"
Opening bracket for temporaries on a callback.  See \f(CW\*(C`FREETMPS\*(C'\fR and
perlcall.
.Sp
.Vb 1
\&                SAVETMPS;
.Ve
.SH "Character case changing"
.IX Header "Character case changing"
.IP "toLOWER" 8
.IX Xref "toLOWER"
.IX Item "toLOWER"
Converts the specified character to lowercase in the platform's native
character set, if possible; otherwise returns the input character itself.
.Sp
.Vb 1
\&        char    toLOWER(char ch)
.Ve
.IP "toUPPER" 8
.IX Xref "toUPPER"
.IX Item "toUPPER"
Converts the specified character to uppercase in the platform's native
character set, if possible; otherwise returns the input character itself.
.Sp
.Vb 1
\&        char    toUPPER(char ch)
.Ve
.SH "Character classes"
.IX Header "Character classes"
There are three variants for all the functions in this section.  The base ones
operate using the character set of the platform Perl is running on.  The ones
with an \f(CW\*(C`_A\*(C'\fR suffix operate on the \s-1ASCII\s0 character set, and the ones with an
\&\f(CW\*(C`_L1\*(C'\fR suffix operate on the full Latin1 character set.  All are unaffected by
locale and by \f(CW\*(C`use bytes\*(C'\fR.
.PP
For \s-1ASCII\s0 platforms, the base function with no suffix and the one with the
\&\f(CW\*(C`_A\*(C'\fR suffix are identical.  The function with the \f(CW\*(C`_L1\*(C'\fR suffix imposes the
Latin\-1 character set onto the platform.  That is, the code points that are
\&\s-1ASCII\s0 are unaffected, since \s-1ASCII\s0 is a subset of Latin\-1.  But the non-ASCII
code points are treated as if they are Latin\-1 characters.  For example,
\&\f(CW\*(C`isSPACE_L1()\*(C'\fR will return true when called with the code point 0xA0, which is
the Latin\-1 NO-BREAK \s-1SPACE\s0.
.PP
For \s-1EBCDIC\s0 platforms, the base function with no suffix and the one with the
\&\f(CW\*(C`_L1\*(C'\fR suffix should be identical, since, as of this writing, the \s-1EBCDIC\s0 code
pages that Perl knows about all are equivalent to Latin\-1.  The function that
ends in an \f(CW\*(C`_A\*(C'\fR suffix will not return true unless the specified character also
has an \s-1ASCII\s0 equivalent.
.IP "isALPHA" 8
.IX Xref "isALPHA"
.IX Item "isALPHA"
Returns a boolean indicating whether the specified character is an
alphabetic character in the platform's native character set.
See the top of this section for an explanation of variants
\&\f(CW\*(C`isALPHA_A\*(C'\fR and \f(CW\*(C`isALPHA_L1\*(C'\fR.
.Sp
.Vb 1
\&        bool    isALPHA(char ch)
.Ve
.IP "isASCII" 8
.IX Xref "isASCII"
.IX Item "isASCII"
Returns a boolean indicating whether the specified character is one of the 128
characters in the \s-1ASCII\s0 character set.  On non-ASCII platforms, it is if this
character corresponds to an \s-1ASCII\s0 character.  Variants \f(CW\*(C`isASCII_A()\*(C'\fR and
\&\f(CW\*(C`isASCII_L1()\*(C'\fR are identical to \f(CW\*(C`isASCII()\*(C'\fR.
.Sp
.Vb 1
\&        bool    isASCII(char ch)
.Ve
.IP "isDIGIT" 8
.IX Xref "isDIGIT"
.IX Item "isDIGIT"
Returns a boolean indicating whether the specified character is a
digit in the platform's native character set.
Variants \f(CW\*(C`isDIGIT_A\*(C'\fR and \f(CW\*(C`isDIGIT_L1\*(C'\fR are identical to \f(CW\*(C`isDIGIT\*(C'\fR.
.Sp
.Vb 1
\&        bool    isDIGIT(char ch)
.Ve
.IP "isLOWER" 8
.IX Xref "isLOWER"
.IX Item "isLOWER"
Returns a boolean indicating whether the specified character is a
lowercase character in the platform's native character set.
See the top of this section for an explanation of variants
\&\f(CW\*(C`isLOWER_A\*(C'\fR and \f(CW\*(C`isLOWER_L1\*(C'\fR.
.Sp
.Vb 1
\&        bool    isLOWER(char ch)
.Ve
.IP "isOCTAL" 8
.IX Xref "isOCTAL"
.IX Item "isOCTAL"
Returns a boolean indicating whether the specified character is an
octal digit, [0\-7] in the platform's native character set.
Variants \f(CW\*(C`isOCTAL_A\*(C'\fR and \f(CW\*(C`isOCTAL_L1\*(C'\fR are identical to \f(CW\*(C`isOCTAL\*(C'\fR.
.Sp
.Vb 1
\&        bool    isOCTAL(char ch)
.Ve
.IP "isSPACE" 8
.IX Xref "isSPACE"
.IX Item "isSPACE"
Returns a boolean indicating whether the specified character is a
whitespace character in the platform's native character set.  This is the same
as what \f(CW\*(C`\es\*(C'\fR matches in a regular expression.
See the top of this section for an explanation of variants
\&\f(CW\*(C`isSPACE_A\*(C'\fR and \f(CW\*(C`isSPACE_L1\*(C'\fR.
.Sp
.Vb 1
\&        bool    isSPACE(char ch)
.Ve
.IP "isUPPER" 8
.IX Xref "isUPPER"
.IX Item "isUPPER"
Returns a boolean indicating whether the specified character is an
uppercase character in the platform's native character set.
See the top of this section for an explanation of variants
\&\f(CW\*(C`isUPPER_A\*(C'\fR and \f(CW\*(C`isUPPER_L1\*(C'\fR.
.Sp
.Vb 1
\&        bool    isUPPER(char ch)
.Ve
.IP "isWORDCHAR" 8
.IX Xref "isWORDCHAR"
.IX Item "isWORDCHAR"
Returns a boolean indicating whether the specified character is a
character that is any of: alphabetic, numeric, or an underscore.  This is the
same as what \f(CW\*(C`\ew\*(C'\fR matches in a regular expression.
\&\f(CW\*(C`isALNUM()\*(C'\fR is a synonym provided for backward compatibility.  Note that it
does not have the standard C language meaning of alphanumeric, since it matches
an underscore and the standard meaning does not.
See the top of this section for an explanation of variants
\&\f(CW\*(C`isWORDCHAR_A\*(C'\fR and \f(CW\*(C`isWORDCHAR_L1\*(C'\fR.
.Sp
.Vb 1
\&        bool    isWORDCHAR(char ch)
.Ve
.IP "isXDIGIT" 8
.IX Xref "isXDIGIT"
.IX Item "isXDIGIT"
Returns a boolean indicating whether the specified character is a hexadecimal
digit, [0\-9A\-Fa\-f].  Variants \f(CW\*(C`isXDIGIT_A()\*(C'\fR and \f(CW\*(C`isXDIGIT_L1()\*(C'\fR are
identical to \f(CW\*(C`isXDIGIT()\*(C'\fR.
.Sp
.Vb 1
\&        bool    isXDIGIT(char ch)
.Ve
.SH "Cloning an interpreter"
.IX Header "Cloning an interpreter"
.IP "perl_clone" 8
.IX Xref "perl_clone"
.IX Item "perl_clone"
Create and return a new interpreter by cloning the current one.
.Sp
perl_clone takes these flags as parameters:
.Sp
CLONEf_COPY_STACKS \- is used to, well, copy the stacks also,
without it we only clone the data and zero the stacks,
with it we copy the stacks and the new perl interpreter is
ready to run at the exact same point as the previous one.
The pseudo-fork code uses \s-1COPY_STACKS\s0 while the
threads\->create doesn't.
.Sp
CLONEf_KEEP_PTR_TABLE \-
perl_clone keeps a ptr_table with the pointer of the old
variable as a key and the new variable as a value,
this allows it to check if something has been cloned and not
clone it again but rather just use the value and increase the
refcount.  If \s-1KEEP_PTR_TABLE\s0 is not set then perl_clone will kill
the ptr_table using the function
\&\f(CW\*(C`ptr_table_free(PL_ptr_table); PL_ptr_table = NULL;\*(C'\fR,
reason to keep it around is if you want to dup some of your own
variable who are outside the graph perl scans, example of this
code is in threads.xs create.
.Sp
CLONEf_CLONE_HOST \-
This is a win32 thing, it is ignored on unix, it tells perls
win32host code (which is c++) to clone itself, this is needed on
win32 if you want to run two threads at the same time,
if you just want to do some stuff in a separate perl interpreter
and then throw it away and return to the original one,
you don't need to do anything.
.Sp
.Vb 4
\&        PerlInterpreter* perl_clone(
\&                             PerlInterpreter *proto_perl,
\&                             UV flags
\&                         )
.Ve
.SH "Compile-time scope hooks"
.IX Header "Compile-time scope hooks"
.IP "BhkDISABLE" 8
.IX Xref "BhkDISABLE"
.IX Item "BhkDISABLE"
Temporarily disable an entry in this \s-1BHK\s0 structure, by clearing the
appropriate flag. \fIwhich\fR is a preprocessor token indicating which
entry to disable.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        void    BhkDISABLE(BHK *hk, which)
.Ve
.IP "BhkENABLE" 8
.IX Xref "BhkENABLE"
.IX Item "BhkENABLE"
Re-enable an entry in this \s-1BHK\s0 structure, by setting the appropriate
flag. \fIwhich\fR is a preprocessor token indicating which entry to enable.
This will assert (under \-DDEBUGGING) if the entry doesn't contain a valid
pointer.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        void    BhkENABLE(BHK *hk, which)
.Ve
.IP "BhkENTRY_set" 8
.IX Xref "BhkENTRY_set"
.IX Item "BhkENTRY_set"
Set an entry in the \s-1BHK\s0 structure, and set the flags to indicate it is
valid. \fIwhich\fR is a preprocessing token indicating which entry to set.
The type of \fIptr\fR depends on the entry.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        void    BhkENTRY_set(BHK *hk, which, void *ptr)
.Ve
.IP "blockhook_register" 8
.IX Xref "blockhook_register"
.IX Item "blockhook_register"
Register a set of hooks to be called when the Perl lexical scope changes
at compile time. See \*(L"Compile-time scope hooks\*(R" in perlguts.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
\&\s-1NOTE:\s0 this function must be explicitly called as Perl_blockhook_register with an aTHX_ parameter.
.Sp
.Vb 1
\&        void    Perl_blockhook_register(pTHX_ BHK *hk)
.Ve
.SH "COP Hint Hashes"
.IX Header "COP Hint Hashes"
.IP "cophh_2hv" 8
.IX Xref "cophh_2hv"
.IX Item "cophh_2hv"
Generates and returns a standard Perl hash representing the full set of
key/value pairs in the cop hints hash \fIcophh\fR.  \fIflags\fR is currently
unused and must be zero.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        HV *    cophh_2hv(const COPHH *cophh, U32 flags)
.Ve
.IP "cophh_copy" 8
.IX Xref "cophh_copy"
.IX Item "cophh_copy"
Make and return a complete copy of the cop hints hash \fIcophh\fR.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        COPHH * cophh_copy(COPHH *cophh)
.Ve
.IP "cophh_delete_pv" 8
.IX Xref "cophh_delete_pv"
.IX Item "cophh_delete_pv"
Like \*(L"cophh_delete_pvn\*(R", but takes a nul-terminated string instead of
a string/length pair.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 3
\&        COPHH * cophh_delete_pv(const COPHH *cophh,
\&                                const char *key, U32 hash,
\&                                U32 flags)
.Ve
.IP "cophh_delete_pvn" 8
.IX Xref "cophh_delete_pvn"
.IX Item "cophh_delete_pvn"
Delete a key and its associated value from the cop hints hash \fIcophh\fR,
and returns the modified hash.  The returned hash pointer is in general
not the same as the hash pointer that was passed in.  The input hash is
consumed by the function, and the pointer to it must not be subsequently
used.  Use \*(L"cophh_copy\*(R" if you need both hashes.
.Sp
The key is specified by \fIkeypv\fR and \fIkeylen\fR.  If \fIflags\fR has the
\&\f(CW\*(C`COPHH_KEY_UTF8\*(C'\fR bit set, the key octets are interpreted as \s-1UTF\-8\s0,
otherwise they are interpreted as Latin\-1.  \fIhash\fR is a precomputed
hash of the key string, or zero if it has not been precomputed.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 4
\&        COPHH * cophh_delete_pvn(COPHH *cophh,
\&                                 const char *keypv,
\&                                 STRLEN keylen, U32 hash,
\&                                 U32 flags)
.Ve
.IP "cophh_delete_pvs" 8
.IX Xref "cophh_delete_pvs"
.IX Item "cophh_delete_pvs"
Like \*(L"cophh_delete_pvn\*(R", but takes a literal string instead of a
string/length pair, and no precomputed hash.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 2
\&        COPHH * cophh_delete_pvs(const COPHH *cophh,
\&                                 const char *key, U32 flags)
.Ve
.IP "cophh_delete_sv" 8
.IX Xref "cophh_delete_sv"
.IX Item "cophh_delete_sv"
Like \*(L"cophh_delete_pvn\*(R", but takes a Perl scalar instead of a
string/length pair.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 2
\&        COPHH * cophh_delete_sv(const COPHH *cophh, SV *key,
\&                                U32 hash, U32 flags)
.Ve
.IP "cophh_fetch_pv" 8
.IX Xref "cophh_fetch_pv"
.IX Item "cophh_fetch_pv"
Like \*(L"cophh_fetch_pvn\*(R", but takes a nul-terminated string instead of
a string/length pair.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 3
\&        SV *    cophh_fetch_pv(const COPHH *cophh,
\&                               const char *key, U32 hash,
\&                               U32 flags)
.Ve
.IP "cophh_fetch_pvn" 8
.IX Xref "cophh_fetch_pvn"
.IX Item "cophh_fetch_pvn"
Look up the entry in the cop hints hash \fIcophh\fR with the key specified by
\&\fIkeypv\fR and \fIkeylen\fR.  If \fIflags\fR has the \f(CW\*(C`COPHH_KEY_UTF8\*(C'\fR bit set,
the key octets are interpreted as \s-1UTF\-8\s0, otherwise they are interpreted
as Latin\-1.  \fIhash\fR is a precomputed hash of the key string, or zero if
it has not been precomputed.  Returns a mortal scalar copy of the value
associated with the key, or \f(CW&PL_sv_placeholder\fR if there is no value
associated with the key.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 4
\&        SV *    cophh_fetch_pvn(const COPHH *cophh,
\&                                const char *keypv,
\&                                STRLEN keylen, U32 hash,
\&                                U32 flags)
.Ve
.IP "cophh_fetch_pvs" 8
.IX Xref "cophh_fetch_pvs"
.IX Item "cophh_fetch_pvs"
Like \*(L"cophh_fetch_pvn\*(R", but takes a literal string instead of a
string/length pair, and no precomputed hash.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 2
\&        SV *    cophh_fetch_pvs(const COPHH *cophh,
\&                                const char *key, U32 flags)
.Ve
.IP "cophh_fetch_sv" 8
.IX Xref "cophh_fetch_sv"
.IX Item "cophh_fetch_sv"
Like \*(L"cophh_fetch_pvn\*(R", but takes a Perl scalar instead of a
string/length pair.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 2
\&        SV *    cophh_fetch_sv(const COPHH *cophh, SV *key,
\&                               U32 hash, U32 flags)
.Ve
.IP "cophh_free" 8
.IX Xref "cophh_free"
.IX Item "cophh_free"
Discard the cop hints hash \fIcophh\fR, freeing all resources associated
with it.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        void    cophh_free(COPHH *cophh)
.Ve
.IP "cophh_new_empty" 8
.IX Xref "cophh_new_empty"
.IX Item "cophh_new_empty"
Generate and return a fresh cop hints hash containing no entries.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        COPHH * cophh_new_empty()
.Ve
.IP "cophh_store_pv" 8
.IX Xref "cophh_store_pv"
.IX Item "cophh_store_pv"
Like \*(L"cophh_store_pvn\*(R", but takes a nul-terminated string instead of
a string/length pair.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 3
\&        COPHH * cophh_store_pv(const COPHH *cophh,
\&                               const char *key, U32 hash,
\&                               SV *value, U32 flags)
.Ve
.IP "cophh_store_pvn" 8
.IX Xref "cophh_store_pvn"
.IX Item "cophh_store_pvn"
Stores a value, associated with a key, in the cop hints hash \fIcophh\fR,
and returns the modified hash.  The returned hash pointer is in general
not the same as the hash pointer that was passed in.  The input hash is
consumed by the function, and the pointer to it must not be subsequently
used.  Use \*(L"cophh_copy\*(R" if you need both hashes.
.Sp
The key is specified by \fIkeypv\fR and \fIkeylen\fR.  If \fIflags\fR has the
\&\f(CW\*(C`COPHH_KEY_UTF8\*(C'\fR bit set, the key octets are interpreted as \s-1UTF\-8\s0,
otherwise they are interpreted as Latin\-1.  \fIhash\fR is a precomputed
hash of the key string, or zero if it has not been precomputed.
.Sp
\&\fIvalue\fR is the scalar value to store for this key.  \fIvalue\fR is copied
by this function, which thus does not take ownership of any reference
to it, and later changes to the scalar will not be reflected in the
value visible in the cop hints hash.  Complex types of scalar will not
be stored with referential integrity, but will be coerced to strings.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 3
\&        COPHH * cophh_store_pvn(COPHH *cophh, const char *keypv,
\&                                STRLEN keylen, U32 hash,
\&                                SV *value, U32 flags)
.Ve
.IP "cophh_store_pvs" 8
.IX Xref "cophh_store_pvs"
.IX Item "cophh_store_pvs"
Like \*(L"cophh_store_pvn\*(R", but takes a literal string instead of a
string/length pair, and no precomputed hash.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 3
\&        COPHH * cophh_store_pvs(const COPHH *cophh,
\&                                const char *key, SV *value,
\&                                U32 flags)
.Ve
.IP "cophh_store_sv" 8
.IX Xref "cophh_store_sv"
.IX Item "cophh_store_sv"
Like \*(L"cophh_store_pvn\*(R", but takes a Perl scalar instead of a
string/length pair.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 2
\&        COPHH * cophh_store_sv(const COPHH *cophh, SV *key,
\&                               U32 hash, SV *value, U32 flags)
.Ve
.SH "COP Hint Reading"
.IX Header "COP Hint Reading"
.IP "cop_hints_2hv" 8
.IX Xref "cop_hints_2hv"
.IX Item "cop_hints_2hv"
Generates and returns a standard Perl hash representing the full set of
hint entries in the cop \fIcop\fR.  \fIflags\fR is currently unused and must
be zero.
.Sp
.Vb 1
\&        HV *    cop_hints_2hv(const COP *cop, U32 flags)
.Ve
.IP "cop_hints_fetch_pv" 8
.IX Xref "cop_hints_fetch_pv"
.IX Item "cop_hints_fetch_pv"
Like \*(L"cop_hints_fetch_pvn\*(R", but takes a nul-terminated string instead
of a string/length pair.
.Sp
.Vb 3
\&        SV *    cop_hints_fetch_pv(const COP *cop,
\&                                   const char *key, U32 hash,
\&                                   U32 flags)
.Ve
.IP "cop_hints_fetch_pvn" 8
.IX Xref "cop_hints_fetch_pvn"
.IX Item "cop_hints_fetch_pvn"
Look up the hint entry in the cop \fIcop\fR with the key specified by
\&\fIkeypv\fR and \fIkeylen\fR.  If \fIflags\fR has the \f(CW\*(C`COPHH_KEY_UTF8\*(C'\fR bit set,
the key octets are interpreted as \s-1UTF\-8\s0, otherwise they are interpreted
as Latin\-1.  \fIhash\fR is a precomputed hash of the key string, or zero if
it has not been precomputed.  Returns a mortal scalar copy of the value
associated with the key, or \f(CW&PL_sv_placeholder\fR if there is no value
associated with the key.
.Sp
.Vb 4
\&        SV *    cop_hints_fetch_pvn(const COP *cop,
\&                                    const char *keypv,
\&                                    STRLEN keylen, U32 hash,
\&                                    U32 flags)
.Ve
.IP "cop_hints_fetch_pvs" 8
.IX Xref "cop_hints_fetch_pvs"
.IX Item "cop_hints_fetch_pvs"
Like \*(L"cop_hints_fetch_pvn\*(R", but takes a literal string instead of a
string/length pair, and no precomputed hash.
.Sp
.Vb 2
\&        SV *    cop_hints_fetch_pvs(const COP *cop,
\&                                    const char *key, U32 flags)
.Ve
.IP "cop_hints_fetch_sv" 8
.IX Xref "cop_hints_fetch_sv"
.IX Item "cop_hints_fetch_sv"
Like \*(L"cop_hints_fetch_pvn\*(R", but takes a Perl scalar instead of a
string/length pair.
.Sp
.Vb 2
\&        SV *    cop_hints_fetch_sv(const COP *cop, SV *key,
\&                                   U32 hash, U32 flags)
.Ve
.SH "Custom Operators"
.IX Header "Custom Operators"
.IP "custom_op_register" 8
.IX Xref "custom_op_register"
.IX Item "custom_op_register"
Register a custom op. See \*(L"Custom Operators\*(R" in perlguts.
.Sp
\&\s-1NOTE:\s0 this function must be explicitly called as Perl_custom_op_register with an aTHX_ parameter.
.Sp
.Vb 3
\&        void    Perl_custom_op_register(pTHX_ 
\&                                        Perl_ppaddr_t ppaddr,
\&                                        const XOP *xop)
.Ve
.IP "custom_op_xop" 8
.IX Xref "custom_op_xop"
.IX Item "custom_op_xop"
Return the \s-1XOP\s0 structure for a given custom op. This function should be
considered internal to \s-1OP_NAME\s0 and the other access macros: use them instead.
.Sp
\&\s-1NOTE:\s0 this function must be explicitly called as Perl_custom_op_xop with an aTHX_ parameter.
.Sp
.Vb 1
\&        const XOP * Perl_custom_op_xop(pTHX_ const OP *o)
.Ve
.IP "XopDISABLE" 8
.IX Xref "XopDISABLE"
.IX Item "XopDISABLE"
Temporarily disable a member of the \s-1XOP\s0, by clearing the appropriate flag.
.Sp
.Vb 1
\&        void    XopDISABLE(XOP *xop, which)
.Ve
.IP "XopENABLE" 8
.IX Xref "XopENABLE"
.IX Item "XopENABLE"
Reenable a member of the \s-1XOP\s0 which has been disabled.
.Sp
.Vb 1
\&        void    XopENABLE(XOP *xop, which)
.Ve
.IP "XopENTRY" 8
.IX Xref "XopENTRY"
.IX Item "XopENTRY"
Return a member of the \s-1XOP\s0 structure. \fIwhich\fR is a cpp token indicating
which entry to return. If the member is not set this will return a
default value. The return type depends on \fIwhich\fR.
.Sp
.Vb 1
\&                XopENTRY(XOP *xop, which)
.Ve
.IP "XopENTRY_set" 8
.IX Xref "XopENTRY_set"
.IX Item "XopENTRY_set"
Set a member of the \s-1XOP\s0 structure. \fIwhich\fR is a cpp token indicating
which entry to set. See \*(L"Custom Operators\*(R" in perlguts for details about
the available members and how they are used.
.Sp
.Vb 1
\&        void    XopENTRY_set(XOP *xop, which, value)
.Ve
.IP "XopFLAGS" 8
.IX Xref "XopFLAGS"
.IX Item "XopFLAGS"
Return the \s-1XOP\s0's flags.
.Sp
.Vb 1
\&        U32     XopFLAGS(XOP *xop)
.Ve
.SH "CV Manipulation Functions"
.IX Header "CV Manipulation Functions"
.IP "CvSTASH" 8
.IX Xref "CvSTASH"
.IX Item "CvSTASH"
Returns the stash of the \s-1CV\s0. A stash is the symbol table hash, containing
the package-scoped variables in the package where the subroutine was defined.
For more information, see perlguts.
.Sp
This also has a special use with \s-1XS\s0 \s-1AUTOLOAD\s0 subs.
See \*(L"Autoloading with XSUBs\*(R" in perlguts.
.Sp
.Vb 1
\&        HV*     CvSTASH(CV* cv)
.Ve
.IP "get_cv" 8
.IX Xref "get_cv"
.IX Item "get_cv"
Uses \f(CW\*(C`strlen\*(C'\fR to get the length of \f(CW\*(C`name\*(C'\fR, then calls \f(CW\*(C`get_cvn_flags\*(C'\fR.
.Sp
\&\s-1NOTE:\s0 the perl_ form of this function is deprecated.
.Sp
.Vb 1
\&        CV*     get_cv(const char* name, I32 flags)
.Ve
.IP "get_cvn_flags" 8
.IX Xref "get_cvn_flags"
.IX Item "get_cvn_flags"
Returns the \s-1CV\s0 of the specified Perl subroutine.  \f(CW\*(C`flags\*(C'\fR are passed to
\&\f(CW\*(C`gv_fetchpvn_flags\*(C'\fR. If \f(CW\*(C`GV_ADD\*(C'\fR is set and the Perl subroutine does not
exist then it will be declared (which has the same effect as saying
\&\f(CW\*(C`sub name;\*(C'\fR).  If \f(CW\*(C`GV_ADD\*(C'\fR is not set and the subroutine does not exist
then \s-1NULL\s0 is returned.
.Sp
\&\s-1NOTE:\s0 the perl_ form of this function is deprecated.
.Sp
.Vb 2
\&        CV*     get_cvn_flags(const char* name, STRLEN len,
\&                              I32 flags)
.Ve
.SH "Embedding Functions"
.IX Header "Embedding Functions"
.IP "cv_clone" 8
.IX Xref "cv_clone"
.IX Item "cv_clone"
Clone a \s-1CV\s0, making a lexical closure.  \fIproto\fR supplies the prototype
of the function: its code, pad structure, and other attributes.
The prototype is combined with a capture of outer lexicals to which the
code refers, which are taken from the currently-executing instance of
the immediately surrounding code.
.Sp
.Vb 1
\&        CV *    cv_clone(CV *proto)
.Ve
.IP "cv_undef" 8
.IX Xref "cv_undef"
.IX Item "cv_undef"
Clear out all the active components of a \s-1CV\s0. This can happen either
by an explicit \f(CW\*(C`undef &foo\*(C'\fR, or by the reference count going to zero.
In the former case, we keep the CvOUTSIDE pointer, so that any anonymous
children can still follow the full lexical scope chain.
.Sp
.Vb 1
\&        void    cv_undef(CV* cv)
.Ve
.IP "find_rundefsv" 8
.IX Xref "find_rundefsv"
.IX Item "find_rundefsv"
Find and return the variable that is named \f(CW$_\fR in the lexical scope
of the currently-executing function.  This may be a lexical \f(CW$_\fR,
or will otherwise be the global one.
.Sp
.Vb 1
\&        SV *    find_rundefsv()
.Ve
.IP "find_rundefsvoffset" 8
.IX Xref "find_rundefsvoffset"
.IX Item "find_rundefsvoffset"
Find the position of the lexical \f(CW$_\fR in the pad of the
currently-executing function.  Returns the offset in the current pad,
or \f(CW\*(C`NOT_IN_PAD\*(C'\fR if there is no lexical \f(CW$_\fR in scope (in which case
the global one should be used instead).
\&\*(L"find_rundefsv\*(R" is likely to be more convenient.
.Sp
\&\s-1NOTE:\s0 the perl_ form of this function is deprecated.
.Sp
.Vb 1
\&        PADOFFSET find_rundefsvoffset()
.Ve
.IP "load_module" 8
.IX Xref "load_module"
.IX Item "load_module"
Loads the module whose name is pointed to by the string part of name.
Note that the actual module name, not its filename, should be given.
Eg, \*(L"Foo::Bar\*(R" instead of \*(L"Foo/Bar.pm\*(R".  flags can be any of
\&\s-1PERL_LOADMOD_DENY\s0, \s-1PERL_LOADMOD_NOIMPORT\s0, or \s-1PERL_LOADMOD_IMPORT_OPS\s0
(or 0 for no flags). ver, if specified and not \s-1NULL\s0, provides version semantics
similar to \f(CW\*(C`use Foo::Bar VERSION\*(C'\fR.  The optional trailing SV*
arguments can be used to specify arguments to the module's \fIimport()\fR
method, similar to \f(CW\*(C`use Foo::Bar VERSION LIST\*(C'\fR.  They must be
terminated with a final \s-1NULL\s0 pointer.  Note that this list can only
be omitted when the \s-1PERL_LOADMOD_NOIMPORT\s0 flag has been used.
Otherwise at least a single \s-1NULL\s0 pointer to designate the default
import list is required.
.Sp
The reference count for each specified \f(CW\*(C`SV*\*(C'\fR parameter is decremented.
.Sp
.Vb 1
\&        void    load_module(U32 flags, SV* name, SV* ver, ...)
.Ve
.IP "nothreadhook" 8
.IX Xref "nothreadhook"
.IX Item "nothreadhook"
Stub that provides thread hook for perl_destruct when there are
no threads.
.Sp
.Vb 1
\&        int     nothreadhook()
.Ve
.IP "pad_add_anon" 8
.IX Xref "pad_add_anon"
.IX Item "pad_add_anon"
Allocates a place in the currently-compiling pad (via \*(L"pad_alloc\*(R")
for an anonymous function that is lexically scoped inside the
currently-compiling function.
The function \fIfunc\fR is linked into the pad, and its \f(CW\*(C`CvOUTSIDE\*(C'\fR link
to the outer scope is weakened to avoid a reference loop.
.Sp
\&\fIoptype\fR should be an opcode indicating the type of operation that the
pad entry is to support.  This doesn't affect operational semantics,
but is used for debugging.
.Sp
.Vb 1
\&        PADOFFSET pad_add_anon(CV *func, I32 optype)
.Ve
.IP "pad_add_name_pv" 8
.IX Xref "pad_add_name_pv"
.IX Item "pad_add_name_pv"
Exactly like \*(L"pad_add_name_pvn\*(R", but takes a nul-terminated string
instead of a string/length pair.
.Sp
.Vb 2
\&        PADOFFSET pad_add_name_pv(const char *name, U32 flags,
\&                                  HV *typestash, HV *ourstash)
.Ve
.IP "pad_add_name_pvn" 8
.IX Xref "pad_add_name_pvn"
.IX Item "pad_add_name_pvn"
Allocates a place in the currently-compiling pad for a named lexical
variable.  Stores the name and other metadata in the name part of the
pad, and makes preparations to manage the variable's lexical scoping.
Returns the offset of the allocated pad slot.
.Sp
\&\fInamepv\fR/\fInamelen\fR specify the variable's name, including leading sigil.
If \fItypestash\fR is non-null, the name is for a typed lexical, and this
identifies the type.  If \fIourstash\fR is non-null, it's a lexical reference
to a package variable, and this identifies the package.  The following
flags can be \s-1OR\s0'ed together:
.Sp
.Vb 3
\&    padadd_OUR          redundantly specifies if it\*(Aqs a package var
\&    padadd_STATE        variable will retain value persistently
\&    padadd_NO_DUP_CHECK skip check for lexical shadowing
\&
\&        PADOFFSET pad_add_name_pvn(const char *namepv,
\&                                   STRLEN namelen, U32 flags,
\&                                   HV *typestash, HV *ourstash)
.Ve
.IP "pad_add_name_sv" 8
.IX Xref "pad_add_name_sv"
.IX Item "pad_add_name_sv"
Exactly like \*(L"pad_add_name_pvn\*(R", but takes the name string in the form
of an \s-1SV\s0 instead of a string/length pair.
.Sp
.Vb 2
\&        PADOFFSET pad_add_name_sv(SV *name, U32 flags,
\&                                  HV *typestash, HV *ourstash)
.Ve
.IP "pad_alloc" 8
.IX Xref "pad_alloc"
.IX Item "pad_alloc"
Allocates a place in the currently-compiling pad,
returning the offset of the allocated pad slot.
No name is initially attached to the pad slot.
\&\fItmptype\fR is a set of flags indicating the kind of pad entry required,
which will be set in the value \s-1SV\s0 for the allocated pad entry:
.Sp
.Vb 2
\&    SVs_PADMY    named lexical variable ("my", "our", "state")
\&    SVs_PADTMP   unnamed temporary store
.Ve
.Sp
\&\fIoptype\fR should be an opcode indicating the type of operation that the
pad entry is to support.  This doesn't affect operational semantics,
but is used for debugging.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        PADOFFSET pad_alloc(I32 optype, U32 tmptype)
.Ve
.IP "pad_compname_type" 8
.IX Xref "pad_compname_type"
.IX Item "pad_compname_type"
Looks up the type of the lexical variable at position \fIpo\fR in the
currently-compiling pad.  If the variable is typed, the stash of the
class to which it is typed is returned.  If not, \f(CW\*(C`NULL\*(C'\fR is returned.
.Sp
.Vb 1
\&        HV *    pad_compname_type(PADOFFSET po)
.Ve
.IP "pad_findmy_pv" 8
.IX Xref "pad_findmy_pv"
.IX Item "pad_findmy_pv"
Exactly like \*(L"pad_findmy_pvn\*(R", but takes a nul-terminated string
instead of a string/length pair.
.Sp
.Vb 1
\&        PADOFFSET pad_findmy_pv(const char *name, U32 flags)
.Ve
.IP "pad_findmy_pvn" 8
.IX Xref "pad_findmy_pvn"
.IX Item "pad_findmy_pvn"
Given the name of a lexical variable, find its position in the
currently-compiling pad.
\&\fInamepv\fR/\fInamelen\fR specify the variable's name, including leading sigil.
\&\fIflags\fR is reserved and must be zero.
If it is not in the current pad but appears in the pad of any lexically
enclosing scope, then a pseudo-entry for it is added in the current pad.
Returns the offset in the current pad,
or \f(CW\*(C`NOT_IN_PAD\*(C'\fR if no such lexical is in scope.
.Sp
.Vb 2
\&        PADOFFSET pad_findmy_pvn(const char *namepv,
\&                                 STRLEN namelen, U32 flags)
.Ve
.IP "pad_findmy_sv" 8
.IX Xref "pad_findmy_sv"
.IX Item "pad_findmy_sv"
Exactly like \*(L"pad_findmy_pvn\*(R", but takes the name string in the form
of an \s-1SV\s0 instead of a string/length pair.
.Sp
.Vb 1
\&        PADOFFSET pad_findmy_sv(SV *name, U32 flags)
.Ve
.IP "pad_setsv" 8
.IX Xref "pad_setsv"
.IX Item "pad_setsv"
Set the value at offset \fIpo\fR in the current (compiling or executing) pad.
Use the macro \s-1\fIPAD_SETSV\s0()\fR rather than calling this function directly.
.Sp
.Vb 1
\&        void    pad_setsv(PADOFFSET po, SV *sv)
.Ve
.IP "pad_sv" 8
.IX Xref "pad_sv"
.IX Item "pad_sv"
Get the value at offset \fIpo\fR in the current (compiling or executing) pad.
Use macro \s-1PAD_SV\s0 instead of calling this function directly.
.Sp
.Vb 1
\&        SV *    pad_sv(PADOFFSET po)
.Ve
.IP "pad_tidy" 8
.IX Xref "pad_tidy"
.IX Item "pad_tidy"
Tidy up a pad at the end of compilation of the code to which it belongs.
Jobs performed here are: remove most stuff from the pads of anonsub
prototypes; give it a \f(CW@_\fR; mark temporaries as such.  \fItype\fR indicates
the kind of subroutine:
.Sp
.Vb 3
\&    padtidy_SUB        ordinary subroutine
\&    padtidy_SUBCLONE   prototype for lexical closure
\&    padtidy_FORMAT     format
.Ve
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        void    pad_tidy(padtidy_type type)
.Ve
.IP "perl_alloc" 8
.IX Xref "perl_alloc"
.IX Item "perl_alloc"
Allocates a new Perl interpreter.  See perlembed.
.Sp
.Vb 1
\&        PerlInterpreter* perl_alloc()
.Ve
.IP "perl_construct" 8
.IX Xref "perl_construct"
.IX Item "perl_construct"
Initializes a new Perl interpreter.  See perlembed.
.Sp
.Vb 1
\&        void    perl_construct(PerlInterpreter *my_perl)
.Ve
.IP "perl_destruct" 8
.IX Xref "perl_destruct"
.IX Item "perl_destruct"
Shuts down a Perl interpreter.  See perlembed.
.Sp
.Vb 1
\&        int     perl_destruct(PerlInterpreter *my_perl)
.Ve
.IP "perl_free" 8
.IX Xref "perl_free"
.IX Item "perl_free"
Releases a Perl interpreter.  See perlembed.
.Sp
.Vb 1
\&        void    perl_free(PerlInterpreter *my_perl)
.Ve
.IP "perl_parse" 8
.IX Xref "perl_parse"
.IX Item "perl_parse"
Tells a Perl interpreter to parse a Perl script.  See perlembed.
.Sp
.Vb 3
\&        int     perl_parse(PerlInterpreter *my_perl,
\&                           XSINIT_t xsinit, int argc,
\&                           char** argv, char** env)
.Ve
.IP "perl_run" 8
.IX Xref "perl_run"
.IX Item "perl_run"
Tells a Perl interpreter to run.  See perlembed.
.Sp
.Vb 1
\&        int     perl_run(PerlInterpreter *my_perl)
.Ve
.IP "require_pv" 8
.IX Xref "require_pv"
.IX Item "require_pv"
Tells Perl to \f(CW\*(C`require\*(C'\fR the file named by the string argument.  It is
analogous to the Perl code \f(CW\*(C`eval "require \*(Aq$file\*(Aq"\*(C'\fR.  It's even
implemented that way; consider using load_module instead.
.Sp
\&\s-1NOTE:\s0 the perl_ form of this function is deprecated.
.Sp
.Vb 1
\&        void    require_pv(const char* pv)
.Ve
.SH "Functions in file dump.c"
.IX Header "Functions in file dump.c"
.IP "pv_display" 8
.IX Xref "pv_display"
.IX Item "pv_display"
Similar to
.Sp
.Vb 1
\&  pv_escape(dsv,pv,cur,pvlim,PERL_PV_ESCAPE_QUOTE);
.Ve
.Sp
except that an additional \*(L"\e0\*(R" will be appended to the string when
len > cur and pv[cur] is \*(L"\e0\*(R".
.Sp
Note that the final string may be up to 7 chars longer than pvlim.
.Sp
.Vb 2
\&        char*   pv_display(SV *dsv, const char *pv, STRLEN cur,
\&                           STRLEN len, STRLEN pvlim)
.Ve
.IP "pv_escape" 8
.IX Xref "pv_escape"
.IX Item "pv_escape"
Escapes at most the first \*(L"count\*(R" chars of pv and puts the results into
dsv such that the size of the escaped string will not exceed \*(L"max\*(R" chars
and will not contain any incomplete escape sequences.
.Sp
If flags contains \s-1PERL_PV_ESCAPE_QUOTE\s0 then any double quotes in the string
will also be escaped.
.Sp
Normally the \s-1SV\s0 will be cleared before the escaped string is prepared,
but when \s-1PERL_PV_ESCAPE_NOCLEAR\s0 is set this will not occur.
.Sp
If \s-1PERL_PV_ESCAPE_UNI\s0 is set then the input string is treated as Unicode,
if \s-1PERL_PV_ESCAPE_UNI_DETECT\s0 is set then the input string is scanned
using \f(CW\*(C`is_utf8_string()\*(C'\fR to determine if it is Unicode.
.Sp
If \s-1PERL_PV_ESCAPE_ALL\s0 is set then all input chars will be output
using \f(CW\*(C`\ex01F1\*(C'\fR style escapes, otherwise if \s-1PERL_PV_ESCAPE_NONASCII\s0 is set, only
chars above 127 will be escaped using this style; otherwise, only chars above
255 will be so escaped; other non printable chars will use octal or
common escaped patterns like \f(CW\*(C`\en\*(C'\fR. Otherwise, if \s-1PERL_PV_ESCAPE_NOBACKSLASH\s0
then all chars below 255 will be treated as printable and
will be output as literals.
.Sp
If \s-1PERL_PV_ESCAPE_FIRSTCHAR\s0 is set then only the first char of the
string will be escaped, regardless of max. If the output is to be in hex,
then it will be returned as a plain hex
sequence. Thus the output will either be a single char,
an octal escape sequence, a special escape like \f(CW\*(C`\en\*(C'\fR or a hex value.
.Sp
If \s-1PERL_PV_ESCAPE_RE\s0 is set then the escape char used will be a '%' and
not a '\e\e'. This is because regexes very often contain backslashed
sequences, whereas '%' is not a particularly common character in patterns.
.Sp
Returns a pointer to the escaped text as held by dsv.
.Sp
.Vb 4
\&        char*   pv_escape(SV *dsv, char const * const str,
\&                          const STRLEN count, const STRLEN max,
\&                          STRLEN * const escaped,
\&                          const U32 flags)
.Ve
.IP "pv_pretty" 8
.IX Xref "pv_pretty"
.IX Item "pv_pretty"
Converts a string into something presentable, handling escaping via
\&\fIpv_escape()\fR and supporting quoting and ellipses.
.Sp
If the \s-1PERL_PV_PRETTY_QUOTE\s0 flag is set then the result will be 
double quoted with any double quotes in the string escaped. Otherwise
if the \s-1PERL_PV_PRETTY_LTGT\s0 flag is set then the result be wrapped in
angle brackets.
.Sp
If the \s-1PERL_PV_PRETTY_ELLIPSES\s0 flag is set and not all characters in
string were output then an ellipsis \f(CW\*(C`...\*(C'\fR will be appended to the
string. Note that this happens \s-1AFTER\s0 it has been quoted.
.Sp
If start_color is non-null then it will be inserted after the opening
quote (if there is one) but before the escaped text. If end_color
is non-null then it will be inserted after the escaped text but before
any quotes or ellipses.
.Sp
Returns a pointer to the prettified text as held by dsv.
.Sp
.Vb 5
\&        char*   pv_pretty(SV *dsv, char const * const str,
\&                          const STRLEN count, const STRLEN max,
\&                          char const * const start_color,
\&                          char const * const end_color,
\&                          const U32 flags)
.Ve
.SH "Functions in file mathoms.c"
.IX Header "Functions in file mathoms.c"
.IP "custom_op_desc" 8
.IX Xref "custom_op_desc"
.IX Item "custom_op_desc"
Return the description of a given custom op. This was once used by the
\&\s-1OP_DESC\s0 macro, but is no longer: it has only been kept for
compatibility, and should not be used.
.Sp
.Vb 1
\&        const char * custom_op_desc(const OP *o)
.Ve
.IP "custom_op_name" 8
.IX Xref "custom_op_name"
.IX Item "custom_op_name"
Return the name for a given custom op. This was once used by the \s-1OP_NAME\s0
macro, but is no longer: it has only been kept for compatibility, and
should not be used.
.Sp
.Vb 1
\&        const char * custom_op_name(const OP *o)
.Ve
.IP "gv_fetchmethod" 8
.IX Xref "gv_fetchmethod"
.IX Item "gv_fetchmethod"
See \*(L"gv_fetchmethod_autoload\*(R".
.Sp
.Vb 1
\&        GV*     gv_fetchmethod(HV* stash, const char* name)
.Ve
.IP "pack_cat" 8
.IX Xref "pack_cat"
.IX Item "pack_cat"
The engine implementing \fIpack()\fR Perl function. Note: parameters next_in_list and
flags are not used. This call should not be used; use packlist instead.
.Sp
.Vb 4
\&        void    pack_cat(SV *cat, const char *pat,
\&                         const char *patend, SV **beglist,
\&                         SV **endlist, SV ***next_in_list,
\&                         U32 flags)
.Ve
.IP "sv_2pvbyte_nolen" 8
.IX Xref "sv_2pvbyte_nolen"
.IX Item "sv_2pvbyte_nolen"
Return a pointer to the byte-encoded representation of the \s-1SV\s0.
May cause the \s-1SV\s0 to be downgraded from \s-1UTF\-8\s0 as a side-effect.
.Sp
Usually accessed via the \f(CW\*(C`SvPVbyte_nolen\*(C'\fR macro.
.Sp
.Vb 1
\&        char*   sv_2pvbyte_nolen(SV* sv)
.Ve
.IP "sv_2pvutf8_nolen" 8
.IX Xref "sv_2pvutf8_nolen"
.IX Item "sv_2pvutf8_nolen"
Return a pointer to the UTF\-8\-encoded representation of the \s-1SV\s0.
May cause the \s-1SV\s0 to be upgraded to \s-1UTF\-8\s0 as a side-effect.
.Sp
Usually accessed via the \f(CW\*(C`SvPVutf8_nolen\*(C'\fR macro.
.Sp
.Vb 1
\&        char*   sv_2pvutf8_nolen(SV* sv)
.Ve
.IP "sv_2pv_nolen" 8
.IX Xref "sv_2pv_nolen"
.IX Item "sv_2pv_nolen"
Like \f(CW\*(C`sv_2pv()\*(C'\fR, but doesn't return the length too. You should usually
use the macro wrapper \f(CW\*(C`SvPV_nolen(sv)\*(C'\fR instead.
.Sp
.Vb 1
\&        char*   sv_2pv_nolen(SV* sv)
.Ve
.IP "sv_catpvn_mg" 8
.IX Xref "sv_catpvn_mg"
.IX Item "sv_catpvn_mg"
Like \f(CW\*(C`sv_catpvn\*(C'\fR, but also handles 'set' magic.
.Sp
.Vb 2
\&        void    sv_catpvn_mg(SV *sv, const char *ptr,
\&                             STRLEN len)
.Ve
.IP "sv_catsv_mg" 8
.IX Xref "sv_catsv_mg"
.IX Item "sv_catsv_mg"
Like \f(CW\*(C`sv_catsv\*(C'\fR, but also handles 'set' magic.
.Sp
.Vb 1
\&        void    sv_catsv_mg(SV *dsv, SV *ssv)
.Ve
.IP "sv_force_normal" 8
.IX Xref "sv_force_normal"
.IX Item "sv_force_normal"
Undo various types of fakery on an \s-1SV:\s0 if the \s-1PV\s0 is a shared string, make
a private copy; if we're a ref, stop refing; if we're a glob, downgrade to
an xpvmg. See also \f(CW\*(C`sv_force_normal_flags\*(C'\fR.
.Sp
.Vb 1
\&        void    sv_force_normal(SV *sv)
.Ve
.IP "sv_iv" 8
.IX Xref "sv_iv"
.IX Item "sv_iv"
A private implementation of the \f(CW\*(C`SvIVx\*(C'\fR macro for compilers which can't
cope with complex macro expressions. Always use the macro instead.
.Sp
.Vb 1
\&        IV      sv_iv(SV* sv)
.Ve
.IP "sv_nolocking" 8
.IX Xref "sv_nolocking"
.IX Item "sv_nolocking"
Dummy routine which \*(L"locks\*(R" an \s-1SV\s0 when there is no locking module present.
Exists to avoid test for a \s-1NULL\s0 function pointer and because it could
potentially warn under some level of strict-ness.
.Sp
\&\*(L"Superseded\*(R" by \fIsv_nosharing()\fR.
.Sp
.Vb 1
\&        void    sv_nolocking(SV *sv)
.Ve
.IP "sv_nounlocking" 8
.IX Xref "sv_nounlocking"
.IX Item "sv_nounlocking"
Dummy routine which \*(L"unlocks\*(R" an \s-1SV\s0 when there is no locking module present.
Exists to avoid test for a \s-1NULL\s0 function pointer and because it could
potentially warn under some level of strict-ness.
.Sp
\&\*(L"Superseded\*(R" by \fIsv_nosharing()\fR.
.Sp
.Vb 1
\&        void    sv_nounlocking(SV *sv)
.Ve
.IP "sv_nv" 8
.IX Xref "sv_nv"
.IX Item "sv_nv"
A private implementation of the \f(CW\*(C`SvNVx\*(C'\fR macro for compilers which can't
cope with complex macro expressions. Always use the macro instead.
.Sp
.Vb 1
\&        NV      sv_nv(SV* sv)
.Ve
.IP "sv_pv" 8
.IX Xref "sv_pv"
.IX Item "sv_pv"
Use the \f(CW\*(C`SvPV_nolen\*(C'\fR macro instead
.Sp
.Vb 1
\&        char*   sv_pv(SV *sv)
.Ve
.IP "sv_pvbyte" 8
.IX Xref "sv_pvbyte"
.IX Item "sv_pvbyte"
Use \f(CW\*(C`SvPVbyte_nolen\*(C'\fR instead.
.Sp
.Vb 1
\&        char*   sv_pvbyte(SV *sv)
.Ve
.IP "sv_pvbyten" 8
.IX Xref "sv_pvbyten"
.IX Item "sv_pvbyten"
A private implementation of the \f(CW\*(C`SvPVbyte\*(C'\fR macro for compilers
which can't cope with complex macro expressions. Always use the macro
instead.
.Sp
.Vb 1
\&        char*   sv_pvbyten(SV *sv, STRLEN *lp)
.Ve
.IP "sv_pvn" 8
.IX Xref "sv_pvn"
.IX Item "sv_pvn"
A private implementation of the \f(CW\*(C`SvPV\*(C'\fR macro for compilers which can't
cope with complex macro expressions. Always use the macro instead.
.Sp
.Vb 1
\&        char*   sv_pvn(SV *sv, STRLEN *lp)
.Ve
.IP "sv_pvutf8" 8
.IX Xref "sv_pvutf8"
.IX Item "sv_pvutf8"
Use the \f(CW\*(C`SvPVutf8_nolen\*(C'\fR macro instead
.Sp
.Vb 1
\&        char*   sv_pvutf8(SV *sv)
.Ve
.IP "sv_pvutf8n" 8
.IX Xref "sv_pvutf8n"
.IX Item "sv_pvutf8n"
A private implementation of the \f(CW\*(C`SvPVutf8\*(C'\fR macro for compilers
which can't cope with complex macro expressions. Always use the macro
instead.
.Sp
.Vb 1
\&        char*   sv_pvutf8n(SV *sv, STRLEN *lp)
.Ve
.IP "sv_taint" 8
.IX Xref "sv_taint"
.IX Item "sv_taint"
Taint an \s-1SV\s0. Use \f(CW\*(C`SvTAINTED_on\*(C'\fR instead.
.Sp
.Vb 1
\&        void    sv_taint(SV* sv)
.Ve
.IP "sv_unref" 8
.IX Xref "sv_unref"
.IX Item "sv_unref"
Unsets the \s-1RV\s0 status of the \s-1SV\s0, and decrements the reference count of
whatever was being referenced by the \s-1RV\s0.  This can almost be thought of
as a reversal of \f(CW\*(C`newSVrv\*(C'\fR.  This is \f(CW\*(C`sv_unref_flags\*(C'\fR with the \f(CW\*(C`flag\*(C'\fR
being zero.  See \f(CW\*(C`SvROK_off\*(C'\fR.
.Sp
.Vb 1
\&        void    sv_unref(SV* sv)
.Ve
.IP "sv_usepvn" 8
.IX Xref "sv_usepvn"
.IX Item "sv_usepvn"
Tells an \s-1SV\s0 to use \f(CW\*(C`ptr\*(C'\fR to find its string value. Implemented by
calling \f(CW\*(C`sv_usepvn_flags\*(C'\fR with \f(CW\*(C`flags\*(C'\fR of 0, hence does not handle 'set'
magic. See \f(CW\*(C`sv_usepvn_flags\*(C'\fR.
.Sp
.Vb 1
\&        void    sv_usepvn(SV* sv, char* ptr, STRLEN len)
.Ve
.IP "sv_usepvn_mg" 8
.IX Xref "sv_usepvn_mg"
.IX Item "sv_usepvn_mg"
Like \f(CW\*(C`sv_usepvn\*(C'\fR, but also handles 'set' magic.
.Sp
.Vb 1
\&        void    sv_usepvn_mg(SV *sv, char *ptr, STRLEN len)
.Ve
.IP "sv_uv" 8
.IX Xref "sv_uv"
.IX Item "sv_uv"
A private implementation of the \f(CW\*(C`SvUVx\*(C'\fR macro for compilers which can't
cope with complex macro expressions. Always use the macro instead.
.Sp
.Vb 1
\&        UV      sv_uv(SV* sv)
.Ve
.IP "unpack_str" 8
.IX Xref "unpack_str"
.IX Item "unpack_str"
The engine implementing \fIunpack()\fR Perl function. Note: parameters strbeg, new_s
and ocnt are not used. This call should not be used, use unpackstring instead.
.Sp
.Vb 4
\&        I32     unpack_str(const char *pat, const char *patend,
\&                           const char *s, const char *strbeg,
\&                           const char *strend, char **new_s,
\&                           I32 ocnt, U32 flags)
.Ve
.SH "Functions in file op.c"
.IX Header "Functions in file op.c"
.IP "op_contextualize" 8
.IX Xref "op_contextualize"
.IX Item "op_contextualize"
Applies a syntactic context to an op tree representing an expression.
\&\fIo\fR is the op tree, and \fIcontext\fR must be \f(CW\*(C`G_SCALAR\*(C'\fR, \f(CW\*(C`G_ARRAY\*(C'\fR,
or \f(CW\*(C`G_VOID\*(C'\fR to specify the context to apply.  The modified op tree
is returned.
.Sp
.Vb 1
\&        OP *    op_contextualize(OP *o, I32 context)
.Ve
.SH "Functions in file perl.h"
.IX Header "Functions in file perl.h"
.IP "\s-1PERL_SYS_INIT\s0" 8
.IX Xref "PERL_SYS_INIT"
.IX Item "PERL_SYS_INIT"
Provides system-specific tune up of the C runtime environment necessary to
run Perl interpreters. This should be called only once, before creating
any Perl interpreters.
.Sp
.Vb 1
\&        void    PERL_SYS_INIT(int argc, char** argv)
.Ve
.IP "\s-1PERL_SYS_INIT3\s0" 8
.IX Xref "PERL_SYS_INIT3"
.IX Item "PERL_SYS_INIT3"
Provides system-specific tune up of the C runtime environment necessary to
run Perl interpreters. This should be called only once, before creating
any Perl interpreters.
.Sp
.Vb 2
\&        void    PERL_SYS_INIT3(int argc, char** argv,
\&                               char** env)
.Ve
.IP "\s-1PERL_SYS_TERM\s0" 8
.IX Xref "PERL_SYS_TERM"
.IX Item "PERL_SYS_TERM"
Provides system-specific clean up of the C runtime environment after
running Perl interpreters. This should be called only once, after
freeing any remaining Perl interpreters.
.Sp
.Vb 1
\&        void    PERL_SYS_TERM()
.Ve
.SH "Functions in file pp_ctl.c"
.IX Header "Functions in file pp_ctl.c"
.IP "caller_cx" 8
.IX Xref "caller_cx"
.IX Item "caller_cx"
The XSUB-writer's equivalent of \fIcaller()\fR. The
returned \f(CW\*(C`PERL_CONTEXT\*(C'\fR structure can be interrogated to find all the
information returned to Perl by \f(CW\*(C`caller\*(C'\fR. Note that XSUBs don't get a
stack frame, so \f(CW\*(C`caller_cx(0, NULL)\*(C'\fR will return information for the
immediately-surrounding Perl code.
.Sp
This function skips over the automatic calls to \f(CW&DB::sub\fR made on the
behalf of the debugger. If the stack frame requested was a sub called by
\&\f(CW\*(C`DB::sub\*(C'\fR, the return value will be the frame for the call to
\&\f(CW\*(C`DB::sub\*(C'\fR, since that has the correct line number/etc. for the call
site. If \fIdbcxp\fR is non\-\f(CW\*(C`NULL\*(C'\fR, it will be set to a pointer to the
frame for the sub call itself.
.Sp
.Vb 4
\&        const PERL_CONTEXT * caller_cx(
\&                                 I32 level,
\&                                 const PERL_CONTEXT **dbcxp
\&                             )
.Ve
.IP "find_runcv" 8
.IX Xref "find_runcv"
.IX Item "find_runcv"
Locate the \s-1CV\s0 corresponding to the currently executing sub or eval.
If db_seqp is non_null, skip CVs that are in the \s-1DB\s0 package and populate
*db_seqp with the cop sequence number at the point that the \s-1DB::\s0 code was
entered. (allows debuggers to eval in the scope of the breakpoint rather
than in the scope of the debugger itself).
.Sp
.Vb 1
\&        CV*     find_runcv(U32 *db_seqp)
.Ve
.SH "Functions in file pp_pack.c"
.IX Header "Functions in file pp_pack.c"
.IP "packlist" 8
.IX Xref "packlist"
.IX Item "packlist"
The engine implementing \fIpack()\fR Perl function.
.Sp
.Vb 3
\&        void    packlist(SV *cat, const char *pat,
\&                         const char *patend, SV **beglist,
\&                         SV **endlist)
.Ve
.IP "unpackstring" 8
.IX Xref "unpackstring"
.IX Item "unpackstring"
The engine implementing \fIunpack()\fR Perl function. \f(CW\*(C`unpackstring\*(C'\fR puts the
extracted list items on the stack and returns the number of elements.
Issue \f(CW\*(C`PUTBACK\*(C'\fR before and \f(CW\*(C`SPAGAIN\*(C'\fR after the call to this function.
.Sp
.Vb 3
\&        I32     unpackstring(const char *pat,
\&                             const char *patend, const char *s,
\&                             const char *strend, U32 flags)
.Ve
.SH "Functions in file pp_sys.c"
.IX Header "Functions in file pp_sys.c"
.IP "setdefout" 8
.IX Xref "setdefout"
.IX Item "setdefout"
Sets PL_defoutgv, the default file handle for output, to the passed in
typeglob. As PL_defoutgv \*(L"owns\*(R" a reference on its typeglob, the reference
count of the passed in typeglob is increased by one, and the reference count
of the typeglob that PL_defoutgv points to is decreased by one.
.Sp
.Vb 1
\&        void    setdefout(GV* gv)
.Ve
.SH "Functions in file utf8.h"
.IX Header "Functions in file utf8.h"
.IP "ibcmp_utf8" 8
.IX Xref "ibcmp_utf8"
.IX Item "ibcmp_utf8"
This is a synonym for (! \fIfoldEQ_utf8()\fR)
.Sp
.Vb 3
\&        I32     ibcmp_utf8(const char *s1, char **pe1, UV l1,
\&                           bool u1, const char *s2, char **pe2,
\&                           UV l2, bool u2)
.Ve
.SH "Functions in file util.h"
.IX Header "Functions in file util.h"
.IP "ibcmp" 8
.IX Xref "ibcmp"
.IX Item "ibcmp"
This is a synonym for (! \fIfoldEQ()\fR)
.Sp
.Vb 1
\&        I32     ibcmp(const char* a, const char* b, I32 len)
.Ve
.IP "ibcmp_locale" 8
.IX Xref "ibcmp_locale"
.IX Item "ibcmp_locale"
This is a synonym for (! \fIfoldEQ_locale()\fR)
.Sp
.Vb 2
\&        I32     ibcmp_locale(const char* a, const char* b,
\&                             I32 len)
.Ve
.SH "Global Variables"
.IX Header "Global Variables"
.IP "PL_check" 8
.IX Xref "PL_check"
.IX Item "PL_check"
Array, indexed by opcode, of functions that will be called for the \*(L"check\*(R"
phase of optree building during compilation of Perl code.  For most (but
not all) types of op, once the op has been initially built and populated
with child ops it will be filtered through the check function referenced
by the appropriate element of this array.  The new op is passed in as the
sole argument to the check function, and the check function returns the
completed op.  The check function may (as the name suggests) check the op
for validity and signal errors.  It may also initialise or modify parts of
the ops, or perform more radical surgery such as adding or removing child
ops, or even throw the op away and return a different op in its place.
.Sp
This array of function pointers is a convenient place to hook into the
compilation process.  An \s-1XS\s0 module can put its own custom check function
in place of any of the standard ones, to influence the compilation of a
particular type of op.  However, a custom check function must never fully
replace a standard check function (or even a custom check function from
another module).  A module modifying checking must instead \fBwrap\fR the
preexisting check function.  A custom check function must be selective
about when to apply its custom behaviour.  In the usual case where
it decides not to do anything special with an op, it must chain the
preexisting op function.  Check functions are thus linked in a chain,
with the core's base checker at the end.
.Sp
For thread safety, modules should not write directly to this array.
Instead, use the function \*(L"wrap_op_checker\*(R".
.IP "PL_keyword_plugin" 8
.IX Xref "PL_keyword_plugin"
.IX Item "PL_keyword_plugin"
Function pointer, pointing at a function used to handle extended keywords.
The function should be declared as
.Sp
.Vb 3
\&        int keyword_plugin_function(pTHX_
\&                char *keyword_ptr, STRLEN keyword_len,
\&                OP **op_ptr)
.Ve
.Sp
The function is called from the tokeniser, whenever a possible keyword
is seen.  \f(CW\*(C`keyword_ptr\*(C'\fR points at the word in the parser's input
buffer, and \f(CW\*(C`keyword_len\*(C'\fR gives its length; it is not null-terminated.
The function is expected to examine the word, and possibly other state
such as %^H, to decide whether it wants to handle it
as an extended keyword.  If it does not, the function should return
\&\f(CW\*(C`KEYWORD_PLUGIN_DECLINE\*(C'\fR, and the normal parser process will continue.
.Sp
If the function wants to handle the keyword, it first must
parse anything following the keyword that is part of the syntax
introduced by the keyword.  See \*(L"Lexer interface\*(R" for details.
.Sp
When a keyword is being handled, the plugin function must build
a tree of \f(CW\*(C`OP\*(C'\fR structures, representing the code that was parsed.
The root of the tree must be stored in \f(CW*op_ptr\fR.  The function then
returns a constant indicating the syntactic role of the construct that
it has parsed: \f(CW\*(C`KEYWORD_PLUGIN_STMT\*(C'\fR if it is a complete statement, or
\&\f(CW\*(C`KEYWORD_PLUGIN_EXPR\*(C'\fR if it is an expression.  Note that a statement
construct cannot be used inside an expression (except via \f(CW\*(C`do BLOCK\*(C'\fR
and similar), and an expression is not a complete statement (it requires
at least a terminating semicolon).
.Sp
When a keyword is handled, the plugin function may also have
(compile-time) side effects.  It may modify \f(CW\*(C`%^H\*(C'\fR, define functions, and
so on.  Typically, if side effects are the main purpose of a handler,
it does not wish to generate any ops to be included in the normal
compilation.  In this case it is still required to supply an op tree,
but it suffices to generate a single null op.
.Sp
That's how the \f(CW*PL_keyword_plugin\fR function needs to behave overall.
Conventionally, however, one does not completely replace the existing
handler function.  Instead, take a copy of \f(CW\*(C`PL_keyword_plugin\*(C'\fR before
assigning your own function pointer to it.  Your handler function should
look for keywords that it is interested in and handle those.  Where it
is not interested, it should call the saved plugin function, passing on
the arguments it received.  Thus \f(CW\*(C`PL_keyword_plugin\*(C'\fR actually points
at a chain of handler functions, all of which have an opportunity to
handle keywords, and only the last function in the chain (built into
the Perl core) will normally return \f(CW\*(C`KEYWORD_PLUGIN_DECLINE\*(C'\fR.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.SH "GV Functions"
.IX Header "GV Functions"
.IP "GvSV" 8
.IX Xref "GvSV"
.IX Item "GvSV"
Return the \s-1SV\s0 from the \s-1GV\s0.
.Sp
.Vb 1
\&        SV*     GvSV(GV* gv)
.Ve
.IP "gv_const_sv" 8
.IX Xref "gv_const_sv"
.IX Item "gv_const_sv"
If \f(CW\*(C`gv\*(C'\fR is a typeglob whose subroutine entry is a constant sub eligible for
inlining, or \f(CW\*(C`gv\*(C'\fR is a placeholder reference that would be promoted to such
a typeglob, then returns the value returned by the sub.  Otherwise, returns
\&\s-1NULL\s0.
.Sp
.Vb 1
\&        SV*     gv_const_sv(GV* gv)
.Ve
.IP "gv_fetchmeth" 8
.IX Xref "gv_fetchmeth"
.IX Item "gv_fetchmeth"
Like \*(L"gv_fetchmeth_pvn\*(R", but lacks a flags parameter.
.Sp
.Vb 2
\&        GV*     gv_fetchmeth(HV* stash, const char* name,
\&                             STRLEN len, I32 level)
.Ve
.IP "gv_fetchmethod_autoload" 8
.IX Xref "gv_fetchmethod_autoload"
.IX Item "gv_fetchmethod_autoload"
Returns the glob which contains the subroutine to call to invoke the method
on the \f(CW\*(C`stash\*(C'\fR.  In fact in the presence of autoloading this may be the
glob for \*(L"\s-1AUTOLOAD\s0\*(R".  In this case the corresponding variable \f(CW$AUTOLOAD\fR is
already setup.
.Sp
The third parameter of \f(CW\*(C`gv_fetchmethod_autoload\*(C'\fR determines whether
\&\s-1AUTOLOAD\s0 lookup is performed if the given method is not present: non-zero
means yes, look for \s-1AUTOLOAD\s0; zero means no, don't look for \s-1AUTOLOAD\s0.
Calling \f(CW\*(C`gv_fetchmethod\*(C'\fR is equivalent to calling \f(CW\*(C`gv_fetchmethod_autoload\*(C'\fR
with a non-zero \f(CW\*(C`autoload\*(C'\fR parameter.
.Sp
These functions grant \f(CW"SUPER"\fR token as a prefix of the method name. Note
that if you want to keep the returned glob for a long time, you need to
check for it being \*(L"\s-1AUTOLOAD\s0\*(R", since at the later time the call may load a
different subroutine due to \f(CW$AUTOLOAD\fR changing its value. Use the glob
created via a side effect to do this.
.Sp
These functions have the same side-effects and as \f(CW\*(C`gv_fetchmeth\*(C'\fR with
\&\f(CW\*(C`level==0\*(C'\fR.  \f(CW\*(C`name\*(C'\fR should be writable if contains \f(CW\*(Aq:\*(Aq\fR or \f(CW\*(Aq
\&\*(Aq\*(Aq\fR. The warning against passing the \s-1GV\s0 returned by \f(CW\*(C`gv_fetchmeth\*(C'\fR to
\&\f(CW\*(C`call_sv\*(C'\fR apply equally to these functions.
.Sp
.Vb 3
\&        GV*     gv_fetchmethod_autoload(HV* stash,
\&                                        const char* name,
\&                                        I32 autoload)
.Ve
.IP "gv_fetchmeth_autoload" 8
.IX Xref "gv_fetchmeth_autoload"
.IX Item "gv_fetchmeth_autoload"
This is the old form of \*(L"gv_fetchmeth_pvn_autoload\*(R", which has no flags
parameter.
.Sp
.Vb 3
\&        GV*     gv_fetchmeth_autoload(HV* stash,
\&                                      const char* name,
\&                                      STRLEN len, I32 level)
.Ve
.IP "gv_fetchmeth_pv" 8
.IX Xref "gv_fetchmeth_pv"
.IX Item "gv_fetchmeth_pv"
Exactly like \*(L"gv_fetchmeth_pvn\*(R", but takes a nul-terminated string 
instead of a string/length pair.
.Sp
.Vb 2
\&        GV*     gv_fetchmeth_pv(HV* stash, const char* name,
\&                                I32 level, U32 flags)
.Ve
.IP "gv_fetchmeth_pvn" 8
.IX Xref "gv_fetchmeth_pvn"
.IX Item "gv_fetchmeth_pvn"
Returns the glob with the given \f(CW\*(C`name\*(C'\fR and a defined subroutine or
\&\f(CW\*(C`NULL\*(C'\fR.  The glob lives in the given \f(CW\*(C`stash\*(C'\fR, or in the stashes
accessible via \f(CW@ISA\fR and \s-1UNIVERSAL::\s0.
.Sp
The argument \f(CW\*(C`level\*(C'\fR should be either 0 or \-1.  If \f(CW\*(C`level==0\*(C'\fR, as a
side-effect creates a glob with the given \f(CW\*(C`name\*(C'\fR in the given \f(CW\*(C`stash\*(C'\fR
which in the case of success contains an alias for the subroutine, and sets
up caching info for this glob.
.Sp
Currently, the only significant value for \f(CW\*(C`flags\*(C'\fR is SVf_UTF8.
.Sp
This function grants \f(CW"SUPER"\fR token as a postfix of the stash name. The
\&\s-1GV\s0 returned from \f(CW\*(C`gv_fetchmeth\*(C'\fR may be a method cache entry, which is not
visible to Perl code.  So when calling \f(CW\*(C`call_sv\*(C'\fR, you should not use
the \s-1GV\s0 directly; instead, you should use the method's \s-1CV\s0, which can be
obtained from the \s-1GV\s0 with the \f(CW\*(C`GvCV\*(C'\fR macro.
.Sp
.Vb 3
\&        GV*     gv_fetchmeth_pvn(HV* stash, const char* name,
\&                                 STRLEN len, I32 level,
\&                                 U32 flags)
.Ve
.IP "gv_fetchmeth_pvn_autoload" 8
.IX Xref "gv_fetchmeth_pvn_autoload"
.IX Item "gv_fetchmeth_pvn_autoload"
Same as \fIgv_fetchmeth_pvn()\fR, but looks for autoloaded subroutines too.
Returns a glob for the subroutine.
.Sp
For an autoloaded subroutine without a \s-1GV\s0, will create a \s-1GV\s0 even
if \f(CW\*(C`level < 0\*(C'\fR.  For an autoloaded subroutine without a stub, \fIGvCV()\fR
of the result may be zero.
.Sp
Currently, the only significant value for \f(CW\*(C`flags\*(C'\fR is SVf_UTF8.
.Sp
.Vb 4
\&        GV*     gv_fetchmeth_pvn_autoload(HV* stash,
\&                                          const char* name,
\&                                          STRLEN len, I32 level,
\&                                          U32 flags)
.Ve
.IP "gv_fetchmeth_pv_autoload" 8
.IX Xref "gv_fetchmeth_pv_autoload"
.IX Item "gv_fetchmeth_pv_autoload"
Exactly like \*(L"gv_fetchmeth_pvn_autoload\*(R", but takes a nul-terminated string
instead of a string/length pair.
.Sp
.Vb 3
\&        GV*     gv_fetchmeth_pv_autoload(HV* stash,
\&                                         const char* name,
\&                                         I32 level, U32 flags)
.Ve
.IP "gv_fetchmeth_sv" 8
.IX Xref "gv_fetchmeth_sv"
.IX Item "gv_fetchmeth_sv"
Exactly like \*(L"gv_fetchmeth_pvn\*(R", but takes the name string in the form
of an \s-1SV\s0 instead of a string/length pair.
.Sp
.Vb 2
\&        GV*     gv_fetchmeth_sv(HV* stash, SV* namesv,
\&                                I32 level, U32 flags)
.Ve
.IP "gv_fetchmeth_sv_autoload" 8
.IX Xref "gv_fetchmeth_sv_autoload"
.IX Item "gv_fetchmeth_sv_autoload"
Exactly like \*(L"gv_fetchmeth_pvn_autoload\*(R", but takes the name string in the form
of an \s-1SV\s0 instead of a string/length pair.
.Sp
.Vb 2
\&        GV*     gv_fetchmeth_sv_autoload(HV* stash, SV* namesv,
\&                                         I32 level, U32 flags)
.Ve
.IP "gv_init" 8
.IX Xref "gv_init"
.IX Item "gv_init"
The old form of \fIgv_init_pvn()\fR.  It does not work with \s-1UTF8\s0 strings, as it
has no flags parameter.  If the \f(CW\*(C`multi\*(C'\fR parameter is set, the
\&\s-1GV_ADDMULTI\s0 flag will be passed to \fIgv_init_pvn()\fR.
.Sp
.Vb 2
\&        void    gv_init(GV* gv, HV* stash, const char* name,
\&                        STRLEN len, int multi)
.Ve
.IP "gv_init_pv" 8
.IX Xref "gv_init_pv"
.IX Item "gv_init_pv"
Same as \fIgv_init_pvn()\fR, but takes a nul-terminated string for the name
instead of separate char * and length parameters.
.Sp
.Vb 2
\&        void    gv_init_pv(GV* gv, HV* stash, const char* name,
\&                           U32 flags)
.Ve
.IP "gv_init_pvn" 8
.IX Xref "gv_init_pvn"
.IX Item "gv_init_pvn"
Converts a scalar into a typeglob.  This is an incoercible typeglob;
assigning a reference to it will assign to one of its slots, instead of
overwriting it as happens with typeglobs created by SvSetSV.  Converting
any scalar that is \fISvOK()\fR may produce unpredictable results and is reserved
for perl's internal use.
.Sp
\&\f(CW\*(C`gv\*(C'\fR is the scalar to be converted.
.Sp
\&\f(CW\*(C`stash\*(C'\fR is the parent stash/package, if any.
.Sp
\&\f(CW\*(C`name\*(C'\fR and \f(CW\*(C`len\*(C'\fR give the name.  The name must be unqualified;
that is, it must not include the package name.  If \f(CW\*(C`gv\*(C'\fR is a
stash element, it is the caller's responsibility to ensure that the name
passed to this function matches the name of the element.  If it does not
match, perl's internal bookkeeping will get out of sync.
.Sp
\&\f(CW\*(C`flags\*(C'\fR can be set to SVf_UTF8 if \f(CW\*(C`name\*(C'\fR is a \s-1UTF8\s0 string, or
the return value of SvUTF8(sv).  It can also take the
\&\s-1GV_ADDMULTI\s0 flag, which means to pretend that the \s-1GV\s0 has been
seen before (i.e., suppress \*(L"Used once\*(R" warnings).
.Sp
.Vb 2
\&        void    gv_init_pvn(GV* gv, HV* stash, const char* name,
\&                            STRLEN len, U32 flags)
.Ve
.IP "gv_init_sv" 8
.IX Xref "gv_init_sv"
.IX Item "gv_init_sv"
Same as \fIgv_init_pvn()\fR, but takes an \s-1SV\s0 * for the name instead of separate
char * and length parameters.  \f(CW\*(C`flags\*(C'\fR is currently unused.
.Sp
.Vb 2
\&        void    gv_init_sv(GV* gv, HV* stash, SV* namesv,
\&                           U32 flags)
.Ve
.IP "gv_stashpv" 8
.IX Xref "gv_stashpv"
.IX Item "gv_stashpv"
Returns a pointer to the stash for a specified package.  Uses \f(CW\*(C`strlen\*(C'\fR to
determine the length of \f(CW\*(C`name\*(C'\fR, then calls \f(CW\*(C`gv_stashpvn()\*(C'\fR.
.Sp
.Vb 1
\&        HV*     gv_stashpv(const char* name, I32 flags)
.Ve
.IP "gv_stashpvn" 8
.IX Xref "gv_stashpvn"
.IX Item "gv_stashpvn"
Returns a pointer to the stash for a specified package.  The \f(CW\*(C`namelen\*(C'\fR
parameter indicates the length of the \f(CW\*(C`name\*(C'\fR, in bytes.  \f(CW\*(C`flags\*(C'\fR is passed
to \f(CW\*(C`gv_fetchpvn_flags()\*(C'\fR, so if set to \f(CW\*(C`GV_ADD\*(C'\fR then the package will be
created if it does not already exist.  If the package does not exist and
\&\f(CW\*(C`flags\*(C'\fR is 0 (or any other setting that does not create packages) then \s-1NULL\s0
is returned.
.Sp
.Vb 2
\&        HV*     gv_stashpvn(const char* name, U32 namelen,
\&                            I32 flags)
.Ve
.IP "gv_stashpvs" 8
.IX Xref "gv_stashpvs"
.IX Item "gv_stashpvs"
Like \f(CW\*(C`gv_stashpvn\*(C'\fR, but takes a literal string instead of a string/length pair.
.Sp
.Vb 1
\&        HV*     gv_stashpvs(const char* name, I32 create)
.Ve
.IP "gv_stashsv" 8
.IX Xref "gv_stashsv"
.IX Item "gv_stashsv"
Returns a pointer to the stash for a specified package.  See \f(CW\*(C`gv_stashpvn\*(C'\fR.
.Sp
.Vb 1
\&        HV*     gv_stashsv(SV* sv, I32 flags)
.Ve
.SH "Handy Values"
.IX Header "Handy Values"
.IP "Nullav" 8
.IX Xref "Nullav"
.IX Item "Nullav"
Null \s-1AV\s0 pointer.
.Sp
(deprecated \- use \f(CW\*(C`(AV *)NULL\*(C'\fR instead)
.IP "Nullch" 8
.IX Xref "Nullch"
.IX Item "Nullch"
Null character pointer. (No longer available when \f(CW\*(C`PERL_CORE\*(C'\fR is defined.)
.IP "Nullcv" 8
.IX Xref "Nullcv"
.IX Item "Nullcv"
Null \s-1CV\s0 pointer.
.Sp
(deprecated \- use \f(CW\*(C`(CV *)NULL\*(C'\fR instead)
.IP "Nullhv" 8
.IX Xref "Nullhv"
.IX Item "Nullhv"
Null \s-1HV\s0 pointer.
.Sp
(deprecated \- use \f(CW\*(C`(HV *)NULL\*(C'\fR instead)
.IP "Nullsv" 8
.IX Xref "Nullsv"
.IX Item "Nullsv"
Null \s-1SV\s0 pointer. (No longer available when \f(CW\*(C`PERL_CORE\*(C'\fR is defined.)
.SH "Hash Manipulation Functions"
.IX Header "Hash Manipulation Functions"
.IP "cop_fetch_label" 8
.IX Xref "cop_fetch_label"
.IX Item "cop_fetch_label"
Returns the label attached to a cop.
The flags pointer may be set to \f(CW\*(C`SVf_UTF8\*(C'\fR or 0.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 2
\&        const char * cop_fetch_label(COP *const cop,
\&                                     STRLEN *len, U32 *flags)
.Ve
.IP "cop_store_label" 8
.IX Xref "cop_store_label"
.IX Item "cop_store_label"
Save a label into a \f(CW\*(C`cop_hints_hash\*(C'\fR. You need to set flags to \f(CW\*(C`SVf_UTF8\*(C'\fR
for a utf\-8 label.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 3
\&        void    cop_store_label(COP *const cop,
\&                                const char *label, STRLEN len,
\&                                U32 flags)
.Ve
.IP "get_hv" 8
.IX Xref "get_hv"
.IX Item "get_hv"
Returns the \s-1HV\s0 of the specified Perl hash.  \f(CW\*(C`flags\*(C'\fR are passed to
\&\f(CW\*(C`gv_fetchpv\*(C'\fR. If \f(CW\*(C`GV_ADD\*(C'\fR is set and the
Perl variable does not exist then it will be created.  If \f(CW\*(C`flags\*(C'\fR is zero
and the variable does not exist then \s-1NULL\s0 is returned.
.Sp
\&\s-1NOTE:\s0 the perl_ form of this function is deprecated.
.Sp
.Vb 1
\&        HV*     get_hv(const char *name, I32 flags)
.Ve
.IP "HEf_SVKEY" 8
.IX Xref "HEf_SVKEY"
.IX Item "HEf_SVKEY"
This flag, used in the length slot of hash entries and magic structures,
specifies the structure contains an \f(CW\*(C`SV*\*(C'\fR pointer where a \f(CW\*(C`char*\*(C'\fR pointer
is to be expected. (For information only\*(--not to be used).
.IP "HeHASH" 8
.IX Xref "HeHASH"
.IX Item "HeHASH"
Returns the computed hash stored in the hash entry.
.Sp
.Vb 1
\&        U32     HeHASH(HE* he)
.Ve
.IP "HeKEY" 8
.IX Xref "HeKEY"
.IX Item "HeKEY"
Returns the actual pointer stored in the key slot of the hash entry. The
pointer may be either \f(CW\*(C`char*\*(C'\fR or \f(CW\*(C`SV*\*(C'\fR, depending on the value of
\&\f(CW\*(C`HeKLEN()\*(C'\fR.  Can be assigned to.  The \f(CW\*(C`HePV()\*(C'\fR or \f(CW\*(C`HeSVKEY()\*(C'\fR macros are
usually preferable for finding the value of a key.
.Sp
.Vb 1
\&        void*   HeKEY(HE* he)
.Ve
.IP "HeKLEN" 8
.IX Xref "HeKLEN"
.IX Item "HeKLEN"
If this is negative, and amounts to \f(CW\*(C`HEf_SVKEY\*(C'\fR, it indicates the entry
holds an \f(CW\*(C`SV*\*(C'\fR key.  Otherwise, holds the actual length of the key.  Can
be assigned to. The \f(CW\*(C`HePV()\*(C'\fR macro is usually preferable for finding key
lengths.
.Sp
.Vb 1
\&        STRLEN  HeKLEN(HE* he)
.Ve
.IP "HePV" 8
.IX Xref "HePV"
.IX Item "HePV"
Returns the key slot of the hash entry as a \f(CW\*(C`char*\*(C'\fR value, doing any
necessary dereferencing of possibly \f(CW\*(C`SV*\*(C'\fR keys.  The length of the string
is placed in \f(CW\*(C`len\*(C'\fR (this is a macro, so do \fInot\fR use \f(CW&len\fR).  If you do
not care about what the length of the key is, you may use the global
variable \f(CW\*(C`PL_na\*(C'\fR, though this is rather less efficient than using a local
variable.  Remember though, that hash keys in perl are free to contain
embedded nulls, so using \f(CW\*(C`strlen()\*(C'\fR or similar is not a good way to find
the length of hash keys. This is very similar to the \f(CW\*(C`SvPV()\*(C'\fR macro
described elsewhere in this document. See also \f(CW\*(C`HeUTF8\*(C'\fR.
.Sp
If you are using \f(CW\*(C`HePV\*(C'\fR to get values to pass to \f(CW\*(C`newSVpvn()\*(C'\fR to create a
new \s-1SV\s0, you should consider using \f(CW\*(C`newSVhek(HeKEY_hek(he))\*(C'\fR as it is more
efficient.
.Sp
.Vb 1
\&        char*   HePV(HE* he, STRLEN len)
.Ve
.IP "HeSVKEY" 8
.IX Xref "HeSVKEY"
.IX Item "HeSVKEY"
Returns the key as an \f(CW\*(C`SV*\*(C'\fR, or \f(CW\*(C`NULL\*(C'\fR if the hash entry does not
contain an \f(CW\*(C`SV*\*(C'\fR key.
.Sp
.Vb 1
\&        SV*     HeSVKEY(HE* he)
.Ve
.IP "HeSVKEY_force" 8
.IX Xref "HeSVKEY_force"
.IX Item "HeSVKEY_force"
Returns the key as an \f(CW\*(C`SV*\*(C'\fR.  Will create and return a temporary mortal
\&\f(CW\*(C`SV*\*(C'\fR if the hash entry contains only a \f(CW\*(C`char*\*(C'\fR key.
.Sp
.Vb 1
\&        SV*     HeSVKEY_force(HE* he)
.Ve
.IP "HeSVKEY_set" 8
.IX Xref "HeSVKEY_set"
.IX Item "HeSVKEY_set"
Sets the key to a given \f(CW\*(C`SV*\*(C'\fR, taking care to set the appropriate flags to
indicate the presence of an \f(CW\*(C`SV*\*(C'\fR key, and returns the same
\&\f(CW\*(C`SV*\*(C'\fR.
.Sp
.Vb 1
\&        SV*     HeSVKEY_set(HE* he, SV* sv)
.Ve
.IP "HeUTF8" 8
.IX Xref "HeUTF8"
.IX Item "HeUTF8"
Returns whether the \f(CW\*(C`char *\*(C'\fR value returned by \f(CW\*(C`HePV\*(C'\fR is encoded in \s-1UTF\-8\s0,
doing any necessary dereferencing of possibly \f(CW\*(C`SV*\*(C'\fR keys.  The value returned
will be 0 or non\-0, not necessarily 1 (or even a value with any low bits set),
so \fBdo not\fR blindly assign this to a \f(CW\*(C`bool\*(C'\fR variable, as \f(CW\*(C`bool\*(C'\fR may be a
typedef for \f(CW\*(C`char\*(C'\fR.
.Sp
.Vb 1
\&        char*   HeUTF8(HE* he)
.Ve
.IP "HeVAL" 8
.IX Xref "HeVAL"
.IX Item "HeVAL"
Returns the value slot (type \f(CW\*(C`SV*\*(C'\fR) stored in the hash entry.
.Sp
.Vb 1
\&        SV*     HeVAL(HE* he)
.Ve
.IP "HvENAME" 8
.IX Xref "HvENAME"
.IX Item "HvENAME"
Returns the effective name of a stash, or \s-1NULL\s0 if there is none. The
effective name represents a location in the symbol table where this stash
resides. It is updated automatically when packages are aliased or deleted.
A stash that is no longer in the symbol table has no effective name. This
name is preferable to \f(CW\*(C`HvNAME\*(C'\fR for use in \s-1MRO\s0 linearisations and isa
caches.
.Sp
.Vb 1
\&        char*   HvENAME(HV* stash)
.Ve
.IP "HvENAMELEN" 8
.IX Xref "HvENAMELEN"
.IX Item "HvENAMELEN"
Returns the length of the stash's effective name.
.Sp
.Vb 1
\&        STRLEN  HvENAMELEN(HV *stash)
.Ve
.IP "HvENAMEUTF8" 8
.IX Xref "HvENAMEUTF8"
.IX Item "HvENAMEUTF8"
Returns true if the effective name is in \s-1UTF8\s0 encoding.
.Sp
.Vb 1
\&        unsigned char HvENAMEUTF8(HV *stash)
.Ve
.IP "HvNAME" 8
.IX Xref "HvNAME"
.IX Item "HvNAME"
Returns the package name of a stash, or \s-1NULL\s0 if \f(CW\*(C`stash\*(C'\fR isn't a stash.
See \f(CW\*(C`SvSTASH\*(C'\fR, \f(CW\*(C`CvSTASH\*(C'\fR.
.Sp
.Vb 1
\&        char*   HvNAME(HV* stash)
.Ve
.IP "HvNAMELEN" 8
.IX Xref "HvNAMELEN"
.IX Item "HvNAMELEN"
Returns the length of the stash's name.
.Sp
.Vb 1
\&        STRLEN  HvNAMELEN(HV *stash)
.Ve
.IP "HvNAMEUTF8" 8
.IX Xref "HvNAMEUTF8"
.IX Item "HvNAMEUTF8"
Returns true if the name is in \s-1UTF8\s0 encoding.
.Sp
.Vb 1
\&        unsigned char HvNAMEUTF8(HV *stash)
.Ve
.IP "hv_assert" 8
.IX Xref "hv_assert"
.IX Item "hv_assert"
Check that a hash is in an internally consistent state.
.Sp
.Vb 1
\&        void    hv_assert(HV *hv)
.Ve
.IP "hv_clear" 8
.IX Xref "hv_clear"
.IX Item "hv_clear"
Frees the all the elements of a hash, leaving it empty.
The \s-1XS\s0 equivalent of \f(CW\*(C`%hash = ()\*(C'\fR.  See also \*(L"hv_undef\*(R".
.Sp
If any destructors are triggered as a result, the hv itself may
be freed.
.Sp
.Vb 1
\&        void    hv_clear(HV *hv)
.Ve
.IP "hv_clear_placeholders" 8
.IX Xref "hv_clear_placeholders"
.IX Item "hv_clear_placeholders"
Clears any placeholders from a hash.  If a restricted hash has any of its keys
marked as readonly and the key is subsequently deleted, the key is not actually
deleted but is marked by assigning it a value of &PL_sv_placeholder.  This tags
it so it will be ignored by future operations such as iterating over the hash,
but will still allow the hash to have a value reassigned to the key at some
future point.  This function clears any such placeholder keys from the hash.
See \fIHash::Util::lock_keys()\fR for an example of its use.
.Sp
.Vb 1
\&        void    hv_clear_placeholders(HV *hv)
.Ve
.IP "hv_copy_hints_hv" 8
.IX Xref "hv_copy_hints_hv"
.IX Item "hv_copy_hints_hv"
A specialised version of \*(L"newHVhv\*(R" for copying \f(CW\*(C`%^H\*(C'\fR.  \fIohv\fR must be
a pointer to a hash (which may have \f(CW\*(C`%^H\*(C'\fR magic, but should be generally
non-magical), or \f(CW\*(C`NULL\*(C'\fR (interpreted as an empty hash).  The content
of \fIohv\fR is copied to a new hash, which has the \f(CW\*(C`%^H\*(C'\fR\-specific magic
added to it.  A pointer to the new hash is returned.
.Sp
.Vb 1
\&        HV *    hv_copy_hints_hv(HV *ohv)
.Ve
.IP "hv_delete" 8
.IX Xref "hv_delete"
.IX Item "hv_delete"
Deletes a key/value pair in the hash.  The value's \s-1SV\s0 is removed from
the hash, made mortal, and returned to the caller.  The absolute
value of \f(CW\*(C`klen\*(C'\fR is the length of the key.  If \f(CW\*(C`klen\*(C'\fR is negative the
key is assumed to be in UTF\-8\-encoded Unicode.  The \f(CW\*(C`flags\*(C'\fR value
will normally be zero; if set to G_DISCARD then \s-1NULL\s0 will be returned.
\&\s-1NULL\s0 will also be returned if the key is not found.
.Sp
.Vb 2
\&        SV*     hv_delete(HV *hv, const char *key, I32 klen,
\&                          I32 flags)
.Ve
.IP "hv_delete_ent" 8
.IX Xref "hv_delete_ent"
.IX Item "hv_delete_ent"
Deletes a key/value pair in the hash.  The value \s-1SV\s0 is removed from the hash,
made mortal, and returned to the caller.  The \f(CW\*(C`flags\*(C'\fR value will normally be
zero; if set to G_DISCARD then \s-1NULL\s0 will be returned.  \s-1NULL\s0 will also be
returned if the key is not found.  \f(CW\*(C`hash\*(C'\fR can be a valid precomputed hash
value, or 0 to ask for it to be computed.
.Sp
.Vb 2
\&        SV*     hv_delete_ent(HV *hv, SV *keysv, I32 flags,
\&                              U32 hash)
.Ve
.IP "hv_exists" 8
.IX Xref "hv_exists"
.IX Item "hv_exists"
Returns a boolean indicating whether the specified hash key exists.  The
absolute value of \f(CW\*(C`klen\*(C'\fR is the length of the key.  If \f(CW\*(C`klen\*(C'\fR is
negative the key is assumed to be in UTF\-8\-encoded Unicode.
.Sp
.Vb 1
\&        bool    hv_exists(HV *hv, const char *key, I32 klen)
.Ve
.IP "hv_exists_ent" 8
.IX Xref "hv_exists_ent"
.IX Item "hv_exists_ent"
Returns a boolean indicating whether
the specified hash key exists.  \f(CW\*(C`hash\*(C'\fR
can be a valid precomputed hash value, or 0 to ask for it to be
computed.
.Sp
.Vb 1
\&        bool    hv_exists_ent(HV *hv, SV *keysv, U32 hash)
.Ve
.IP "hv_fetch" 8
.IX Xref "hv_fetch"
.IX Item "hv_fetch"
Returns the \s-1SV\s0 which corresponds to the specified key in the hash.
The absolute value of \f(CW\*(C`klen\*(C'\fR is the length of the key.  If \f(CW\*(C`klen\*(C'\fR is
negative the key is assumed to be in UTF\-8\-encoded Unicode.  If
\&\f(CW\*(C`lval\*(C'\fR is set then the fetch will be part of a store.  Check that the
return value is non-null before dereferencing it to an \f(CW\*(C`SV*\*(C'\fR.
.Sp
See \*(L"Understanding the Magic of Tied Hashes and Arrays\*(R" in perlguts for more
information on how to use this function on tied hashes.
.Sp
.Vb 2
\&        SV**    hv_fetch(HV *hv, const char *key, I32 klen,
\&                         I32 lval)
.Ve
.IP "hv_fetchs" 8
.IX Xref "hv_fetchs"
.IX Item "hv_fetchs"
Like \f(CW\*(C`hv_fetch\*(C'\fR, but takes a literal string instead of a string/length pair.
.Sp
.Vb 1
\&        SV**    hv_fetchs(HV* tb, const char* key, I32 lval)
.Ve
.IP "hv_fetch_ent" 8
.IX Xref "hv_fetch_ent"
.IX Item "hv_fetch_ent"
Returns the hash entry which corresponds to the specified key in the hash.
\&\f(CW\*(C`hash\*(C'\fR must be a valid precomputed hash number for the given \f(CW\*(C`key\*(C'\fR, or 0
if you want the function to compute it.  \s-1IF\s0 \f(CW\*(C`lval\*(C'\fR is set then the fetch
will be part of a store.  Make sure the return value is non-null before
accessing it.  The return value when \f(CW\*(C`hv\*(C'\fR is a tied hash is a pointer to a
static location, so be sure to make a copy of the structure if you need to
store it somewhere.
.Sp
See \*(L"Understanding the Magic of Tied Hashes and Arrays\*(R" in perlguts for more
information on how to use this function on tied hashes.
.Sp
.Vb 2
\&        HE*     hv_fetch_ent(HV *hv, SV *keysv, I32 lval,
\&                             U32 hash)
.Ve
.IP "hv_fill" 8
.IX Xref "hv_fill"
.IX Item "hv_fill"
Returns the number of hash buckets that happen to be in use. This function is
wrapped by the macro \f(CW\*(C`HvFILL\*(C'\fR.
.Sp
Previously this value was stored in the \s-1HV\s0 structure, rather than being
calculated on demand.
.Sp
.Vb 1
\&        STRLEN  hv_fill(HV const *const hv)
.Ve
.IP "hv_iterinit" 8
.IX Xref "hv_iterinit"
.IX Item "hv_iterinit"
Prepares a starting point to traverse a hash table.  Returns the number of
keys in the hash (i.e. the same as \f(CW\*(C`HvUSEDKEYS(hv)\*(C'\fR).  The return value is
currently only meaningful for hashes without tie magic.
.Sp
\&\s-1NOTE:\s0 Before version 5.004_65, \f(CW\*(C`hv_iterinit\*(C'\fR used to return the number of
hash buckets that happen to be in use.  If you still need that esoteric
value, you can get it through the macro \f(CW\*(C`HvFILL(hv)\*(C'\fR.
.Sp
.Vb 1
\&        I32     hv_iterinit(HV *hv)
.Ve
.IP "hv_iterkey" 8
.IX Xref "hv_iterkey"
.IX Item "hv_iterkey"
Returns the key from the current position of the hash iterator.  See
\&\f(CW\*(C`hv_iterinit\*(C'\fR.
.Sp
.Vb 1
\&        char*   hv_iterkey(HE* entry, I32* retlen)
.Ve
.IP "hv_iterkeysv" 8
.IX Xref "hv_iterkeysv"
.IX Item "hv_iterkeysv"
Returns the key as an \f(CW\*(C`SV*\*(C'\fR from the current position of the hash
iterator.  The return value will always be a mortal copy of the key.  Also
see \f(CW\*(C`hv_iterinit\*(C'\fR.
.Sp
.Vb 1
\&        SV*     hv_iterkeysv(HE* entry)
.Ve
.IP "hv_iternext" 8
.IX Xref "hv_iternext"
.IX Item "hv_iternext"
Returns entries from a hash iterator.  See \f(CW\*(C`hv_iterinit\*(C'\fR.
.Sp
You may call \f(CW\*(C`hv_delete\*(C'\fR or \f(CW\*(C`hv_delete_ent\*(C'\fR on the hash entry that the
iterator currently points to, without losing your place or invalidating your
iterator.  Note that in this case the current entry is deleted from the hash
with your iterator holding the last reference to it.  Your iterator is flagged
to free the entry on the next call to \f(CW\*(C`hv_iternext\*(C'\fR, so you must not discard
your iterator immediately else the entry will leak \- call \f(CW\*(C`hv_iternext\*(C'\fR to
trigger the resource deallocation.
.Sp
.Vb 1
\&        HE*     hv_iternext(HV *hv)
.Ve
.IP "hv_iternextsv" 8
.IX Xref "hv_iternextsv"
.IX Item "hv_iternextsv"
Performs an \f(CW\*(C`hv_iternext\*(C'\fR, \f(CW\*(C`hv_iterkey\*(C'\fR, and \f(CW\*(C`hv_iterval\*(C'\fR in one
operation.
.Sp
.Vb 1
\&        SV*     hv_iternextsv(HV *hv, char **key, I32 *retlen)
.Ve
.IP "hv_iternext_flags" 8
.IX Xref "hv_iternext_flags"
.IX Item "hv_iternext_flags"
Returns entries from a hash iterator.  See \f(CW\*(C`hv_iterinit\*(C'\fR and \f(CW\*(C`hv_iternext\*(C'\fR.
The \f(CW\*(C`flags\*(C'\fR value will normally be zero; if \s-1HV_ITERNEXT_WANTPLACEHOLDERS\s0 is
set the placeholders keys (for restricted hashes) will be returned in addition
to normal keys. By default placeholders are automatically skipped over.
Currently a placeholder is implemented with a value that is
\&\f(CW&PL_sv_placeholder\fR.  Note that the implementation of placeholders and
restricted hashes may change, and the implementation currently is
insufficiently abstracted for any change to be tidy.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        HE*     hv_iternext_flags(HV *hv, I32 flags)
.Ve
.IP "hv_iterval" 8
.IX Xref "hv_iterval"
.IX Item "hv_iterval"
Returns the value from the current position of the hash iterator.  See
\&\f(CW\*(C`hv_iterkey\*(C'\fR.
.Sp
.Vb 1
\&        SV*     hv_iterval(HV *hv, HE *entry)
.Ve
.IP "hv_magic" 8
.IX Xref "hv_magic"
.IX Item "hv_magic"
Adds magic to a hash.  See \f(CW\*(C`sv_magic\*(C'\fR.
.Sp
.Vb 1
\&        void    hv_magic(HV *hv, GV *gv, int how)
.Ve
.IP "hv_scalar" 8
.IX Xref "hv_scalar"
.IX Item "hv_scalar"
Evaluates the hash in scalar context and returns the result. Handles magic when the hash is tied.
.Sp
.Vb 1
\&        SV*     hv_scalar(HV *hv)
.Ve
.IP "hv_store" 8
.IX Xref "hv_store"
.IX Item "hv_store"
Stores an \s-1SV\s0 in a hash.  The hash key is specified as \f(CW\*(C`key\*(C'\fR and the
absolute value of \f(CW\*(C`klen\*(C'\fR is the length of the key.  If \f(CW\*(C`klen\*(C'\fR is
negative the key is assumed to be in UTF\-8\-encoded Unicode.  The
\&\f(CW\*(C`hash\*(C'\fR parameter is the precomputed hash value; if it is zero then
Perl will compute it.
.Sp
The return value will be
\&\s-1NULL\s0 if the operation failed or if the value did not need to be actually
stored within the hash (as in the case of tied hashes).  Otherwise it can
be dereferenced to get the original \f(CW\*(C`SV*\*(C'\fR.  Note that the caller is
responsible for suitably incrementing the reference count of \f(CW\*(C`val\*(C'\fR before
the call, and decrementing it if the function returned \s-1NULL\s0.  Effectively
a successful hv_store takes ownership of one reference to \f(CW\*(C`val\*(C'\fR.  This is
usually what you want; a newly created \s-1SV\s0 has a reference count of one, so
if all your code does is create SVs then store them in a hash, hv_store
will own the only reference to the new \s-1SV\s0, and your code doesn't need to do
anything further to tidy up.  hv_store is not implemented as a call to
hv_store_ent, and does not create a temporary \s-1SV\s0 for the key, so if your
key data is not already in \s-1SV\s0 form then use hv_store in preference to
hv_store_ent.
.Sp
See \*(L"Understanding the Magic of Tied Hashes and Arrays\*(R" in perlguts for more
information on how to use this function on tied hashes.
.Sp
.Vb 2
\&        SV**    hv_store(HV *hv, const char *key, I32 klen,
\&                         SV *val, U32 hash)
.Ve
.IP "hv_stores" 8
.IX Xref "hv_stores"
.IX Item "hv_stores"
Like \f(CW\*(C`hv_store\*(C'\fR, but takes a literal string instead of a string/length pair
and omits the hash parameter.
.Sp
.Vb 2
\&        SV**    hv_stores(HV* tb, const char* key,
\&                          NULLOK SV* val)
.Ve
.IP "hv_store_ent" 8
.IX Xref "hv_store_ent"
.IX Item "hv_store_ent"
Stores \f(CW\*(C`val\*(C'\fR in a hash.  The hash key is specified as \f(CW\*(C`key\*(C'\fR.  The \f(CW\*(C`hash\*(C'\fR
parameter is the precomputed hash value; if it is zero then Perl will
compute it.  The return value is the new hash entry so created.  It will be
\&\s-1NULL\s0 if the operation failed or if the value did not need to be actually
stored within the hash (as in the case of tied hashes).  Otherwise the
contents of the return value can be accessed using the \f(CW\*(C`He?\*(C'\fR macros
described here.  Note that the caller is responsible for suitably
incrementing the reference count of \f(CW\*(C`val\*(C'\fR before the call, and
decrementing it if the function returned \s-1NULL\s0.  Effectively a successful
hv_store_ent takes ownership of one reference to \f(CW\*(C`val\*(C'\fR.  This is
usually what you want; a newly created \s-1SV\s0 has a reference count of one, so
if all your code does is create SVs then store them in a hash, hv_store
will own the only reference to the new \s-1SV\s0, and your code doesn't need to do
anything further to tidy up.  Note that hv_store_ent only reads the \f(CW\*(C`key\*(C'\fR;
unlike \f(CW\*(C`val\*(C'\fR it does not take ownership of it, so maintaining the correct
reference count on \f(CW\*(C`key\*(C'\fR is entirely the caller's responsibility.  hv_store
is not implemented as a call to hv_store_ent, and does not create a temporary
\&\s-1SV\s0 for the key, so if your key data is not already in \s-1SV\s0 form then use
hv_store in preference to hv_store_ent.
.Sp
See \*(L"Understanding the Magic of Tied Hashes and Arrays\*(R" in perlguts for more
information on how to use this function on tied hashes.
.Sp
.Vb 1
\&        HE*     hv_store_ent(HV *hv, SV *key, SV *val, U32 hash)
.Ve
.IP "hv_undef" 8
.IX Xref "hv_undef"
.IX Item "hv_undef"
Undefines the hash.  The \s-1XS\s0 equivalent of \f(CW\*(C`undef(%hash)\*(C'\fR.
.Sp
As well as freeing all the elements of the hash (like \fIhv_clear()\fR), this
also frees any auxiliary data and storage associated with the hash.
.Sp
If any destructors are triggered as a result, the hv itself may
be freed.
.Sp
See also \*(L"hv_clear\*(R".
.Sp
.Vb 1
\&        void    hv_undef(HV *hv)
.Ve
.IP "newHV" 8
.IX Xref "newHV"
.IX Item "newHV"
Creates a new \s-1HV\s0.  The reference count is set to 1.
.Sp
.Vb 1
\&        HV*     newHV()
.Ve
.SH "Hook manipulation"
.IX Header "Hook manipulation"
.IP "wrap_op_checker" 8
.IX Xref "wrap_op_checker"
.IX Item "wrap_op_checker"
Puts a C function into the chain of check functions for a specified op
type.  This is the preferred way to manipulate the \*(L"PL_check\*(R" array.
\&\fIopcode\fR specifies which type of op is to be affected.  \fInew_checker\fR
is a pointer to the C function that is to be added to that opcode's
check chain, and \fIold_checker_p\fR points to the storage location where a
pointer to the next function in the chain will be stored.  The value of
\&\fInew_pointer\fR is written into the \*(L"PL_check\*(R" array, while the value
previously stored there is written to \fI*old_checker_p\fR.
.Sp
\&\*(L"PL_check\*(R" is global to an entire process, and a module wishing to
hook op checking may find itself invoked more than once per process,
typically in different threads.  To handle that situation, this function
is idempotent.  The location \fI*old_checker_p\fR must initially (once
per process) contain a null pointer.  A C variable of static duration
(declared at file scope, typically also marked \f(CW\*(C`static\*(C'\fR to give
it internal linkage) will be implicitly initialised appropriately,
if it does not have an explicit initialiser.  This function will only
actually modify the check chain if it finds \fI*old_checker_p\fR to be null.
This function is also thread safe on the small scale.  It uses appropriate
locking to avoid race conditions in accessing \*(L"PL_check\*(R".
.Sp
When this function is called, the function referenced by \fInew_checker\fR
must be ready to be called, except for \fI*old_checker_p\fR being unfilled.
In a threading situation, \fInew_checker\fR may be called immediately,
even before this function has returned.  \fI*old_checker_p\fR will always
be appropriately set before \fInew_checker\fR is called.  If \fInew_checker\fR
decides not to do anything special with an op that it is given (which
is the usual case for most uses of op check hooking), it must chain the
check function referenced by \fI*old_checker_p\fR.
.Sp
If you want to influence compilation of calls to a specific subroutine,
then use \*(L"cv_set_call_checker\*(R" rather than hooking checking of all
\&\f(CW\*(C`entersub\*(C'\fR ops.
.Sp
.Vb 3
\&        void    wrap_op_checker(Optype opcode,
\&                                Perl_check_t new_checker,
\&                                Perl_check_t *old_checker_p)
.Ve
.SH "Lexer interface"
.IX Header "Lexer interface"
.IP "lex_bufutf8" 8
.IX Xref "lex_bufutf8"
.IX Item "lex_bufutf8"
Indicates whether the octets in the lexer buffer
(\*(L"PL_parser\->linestr\*(R") should be interpreted as the \s-1UTF\-8\s0 encoding
of Unicode characters.  If not, they should be interpreted as Latin\-1
characters.  This is analogous to the \f(CW\*(C`SvUTF8\*(C'\fR flag for scalars.
.Sp
In \s-1UTF\-8\s0 mode, it is not guaranteed that the lexer buffer actually
contains valid \s-1UTF\-8\s0.  Lexing code must be robust in the face of invalid
encoding.
.Sp
The actual \f(CW\*(C`SvUTF8\*(C'\fR flag of the \*(L"PL_parser\->linestr\*(R" scalar
is significant, but not the whole story regarding the input character
encoding.  Normally, when a file is being read, the scalar contains octets
and its \f(CW\*(C`SvUTF8\*(C'\fR flag is off, but the octets should be interpreted as
\&\s-1UTF\-8\s0 if the \f(CW\*(C`use utf8\*(C'\fR pragma is in effect.  During a string eval,
however, the scalar may have the \f(CW\*(C`SvUTF8\*(C'\fR flag on, and in this case its
octets should be interpreted as \s-1UTF\-8\s0 unless the \f(CW\*(C`use bytes\*(C'\fR pragma
is in effect.  This logic may change in the future; use this function
instead of implementing the logic yourself.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        bool    lex_bufutf8()
.Ve
.IP "lex_discard_to" 8
.IX Xref "lex_discard_to"
.IX Item "lex_discard_to"
Discards the first part of the \*(L"PL_parser\->linestr\*(R" buffer,
up to \fIptr\fR.  The remaining content of the buffer will be moved, and
all pointers into the buffer updated appropriately.  \fIptr\fR must not
be later in the buffer than the position of \*(L"PL_parser\->bufptr\*(R":
it is not permitted to discard text that has yet to be lexed.
.Sp
Normally it is not necessarily to do this directly, because it suffices to
use the implicit discarding behaviour of \*(L"lex_next_chunk\*(R" and things
based on it.  However, if a token stretches across multiple lines,
and the lexing code has kept multiple lines of text in the buffer for
that purpose, then after completion of the token it would be wise to
explicitly discard the now-unneeded earlier lines, to avoid future
multi-line tokens growing the buffer without bound.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        void    lex_discard_to(char *ptr)
.Ve
.IP "lex_grow_linestr" 8
.IX Xref "lex_grow_linestr"
.IX Item "lex_grow_linestr"
Reallocates the lexer buffer (\*(L"PL_parser\->linestr\*(R") to accommodate
at least \fIlen\fR octets (including terminating \s-1NUL\s0).  Returns a
pointer to the reallocated buffer.  This is necessary before making
any direct modification of the buffer that would increase its length.
\&\*(L"lex_stuff_pvn\*(R" provides a more convenient way to insert text into
the buffer.
.Sp
Do not use \f(CW\*(C`SvGROW\*(C'\fR or \f(CW\*(C`sv_grow\*(C'\fR directly on \f(CW\*(C`PL_parser\->linestr\*(C'\fR;
this function updates all of the lexer's variables that point directly
into the buffer.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        char *  lex_grow_linestr(STRLEN len)
.Ve
.IP "lex_next_chunk" 8
.IX Xref "lex_next_chunk"
.IX Item "lex_next_chunk"
Reads in the next chunk of text to be lexed, appending it to
\&\*(L"PL_parser\->linestr\*(R".  This should be called when lexing code has
looked to the end of the current chunk and wants to know more.  It is
usual, but not necessary, for lexing to have consumed the entirety of
the current chunk at this time.
.Sp
If \*(L"PL_parser\->bufptr\*(R" is pointing to the very end of the current
chunk (i.e., the current chunk has been entirely consumed), normally the
current chunk will be discarded at the same time that the new chunk is
read in.  If \fIflags\fR includes \f(CW\*(C`LEX_KEEP_PREVIOUS\*(C'\fR, the current chunk
will not be discarded.  If the current chunk has not been entirely
consumed, then it will not be discarded regardless of the flag.
.Sp
Returns true if some new text was added to the buffer, or false if the
buffer has reached the end of the input text.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        bool    lex_next_chunk(U32 flags)
.Ve
.IP "lex_peek_unichar" 8
.IX Xref "lex_peek_unichar"
.IX Item "lex_peek_unichar"
Looks ahead one (Unicode) character in the text currently being lexed.
Returns the codepoint (unsigned integer value) of the next character,
or \-1 if lexing has reached the end of the input text.  To consume the
peeked character, use \*(L"lex_read_unichar\*(R".
.Sp
If the next character is in (or extends into) the next chunk of input
text, the next chunk will be read in.  Normally the current chunk will be
discarded at the same time, but if \fIflags\fR includes \f(CW\*(C`LEX_KEEP_PREVIOUS\*(C'\fR
then the current chunk will not be discarded.
.Sp
If the input is being interpreted as \s-1UTF\-8\s0 and a \s-1UTF\-8\s0 encoding error
is encountered, an exception is generated.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        I32     lex_peek_unichar(U32 flags)
.Ve
.IP "lex_read_space" 8
.IX Xref "lex_read_space"
.IX Item "lex_read_space"
Reads optional spaces, in Perl style, in the text currently being
lexed.  The spaces may include ordinary whitespace characters and
Perl-style comments.  \f(CW\*(C`#line\*(C'\fR directives are processed if encountered.
\&\*(L"PL_parser\->bufptr\*(R" is moved past the spaces, so that it points
at a non-space character (or the end of the input text).
.Sp
If spaces extend into the next chunk of input text, the next chunk will
be read in.  Normally the current chunk will be discarded at the same
time, but if \fIflags\fR includes \f(CW\*(C`LEX_KEEP_PREVIOUS\*(C'\fR then the current
chunk will not be discarded.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        void    lex_read_space(U32 flags)
.Ve
.IP "lex_read_to" 8
.IX Xref "lex_read_to"
.IX Item "lex_read_to"
Consume text in the lexer buffer, from \*(L"PL_parser\->bufptr\*(R" up
to \fIptr\fR.  This advances \*(L"PL_parser\->bufptr\*(R" to match \fIptr\fR,
performing the correct bookkeeping whenever a newline character is passed.
This is the normal way to consume lexed text.
.Sp
Interpretation of the buffer's octets can be abstracted out by
using the slightly higher-level functions \*(L"lex_peek_unichar\*(R" and
\&\*(L"lex_read_unichar\*(R".
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        void    lex_read_to(char *ptr)
.Ve
.IP "lex_read_unichar" 8
.IX Xref "lex_read_unichar"
.IX Item "lex_read_unichar"
Reads the next (Unicode) character in the text currently being lexed.
Returns the codepoint (unsigned integer value) of the character read,
and moves \*(L"PL_parser\->bufptr\*(R" past the character, or returns \-1
if lexing has reached the end of the input text.  To non-destructively
examine the next character, use \*(L"lex_peek_unichar\*(R" instead.
.Sp
If the next character is in (or extends into) the next chunk of input
text, the next chunk will be read in.  Normally the current chunk will be
discarded at the same time, but if \fIflags\fR includes \f(CW\*(C`LEX_KEEP_PREVIOUS\*(C'\fR
then the current chunk will not be discarded.
.Sp
If the input is being interpreted as \s-1UTF\-8\s0 and a \s-1UTF\-8\s0 encoding error
is encountered, an exception is generated.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        I32     lex_read_unichar(U32 flags)
.Ve
.IP "lex_start" 8
.IX Xref "lex_start"
.IX Item "lex_start"
Creates and initialises a new lexer/parser state object, supplying
a context in which to lex and parse from a new source of Perl code.
A pointer to the new state object is placed in \*(L"PL_parser\*(R".  An entry
is made on the save stack so that upon unwinding the new state object
will be destroyed and the former value of \*(L"PL_parser\*(R" will be restored.
Nothing else need be done to clean up the parsing context.
.Sp
The code to be parsed comes from \fIline\fR and \fIrsfp\fR.  \fIline\fR, if
non-null, provides a string (in \s-1SV\s0 form) containing code to be parsed.
A copy of the string is made, so subsequent modification of \fIline\fR
does not affect parsing.  \fIrsfp\fR, if non-null, provides an input stream
from which code will be read to be parsed.  If both are non-null, the
code in \fIline\fR comes first and must consist of complete lines of input,
and \fIrsfp\fR supplies the remainder of the source.
.Sp
The \fIflags\fR parameter is reserved for future use.  Currently it is only
used by perl internally, so extensions should always pass zero.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        void    lex_start(SV *line, PerlIO *rsfp, U32 flags)
.Ve
.IP "lex_stuff_pv" 8
.IX Xref "lex_stuff_pv"
.IX Item "lex_stuff_pv"
Insert characters into the lexer buffer (\*(L"PL_parser\->linestr\*(R"),
immediately after the current lexing point (\*(L"PL_parser\->bufptr\*(R"),
reallocating the buffer if necessary.  This means that lexing code that
runs later will see the characters as if they had appeared in the input.
It is not recommended to do this as part of normal parsing, and most
uses of this facility run the risk of the inserted characters being
interpreted in an unintended manner.
.Sp
The string to be inserted is represented by octets starting at \fIpv\fR
and continuing to the first nul.  These octets are interpreted as either
\&\s-1UTF\-8\s0 or Latin\-1, according to whether the \f(CW\*(C`LEX_STUFF_UTF8\*(C'\fR flag is set
in \fIflags\fR.  The characters are recoded for the lexer buffer, according
to how the buffer is currently being interpreted (\*(L"lex_bufutf8\*(R").
If it is not convenient to nul-terminate a string to be inserted, the
\&\*(L"lex_stuff_pvn\*(R" function is more appropriate.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        void    lex_stuff_pv(const char *pv, U32 flags)
.Ve
.IP "lex_stuff_pvn" 8
.IX Xref "lex_stuff_pvn"
.IX Item "lex_stuff_pvn"
Insert characters into the lexer buffer (\*(L"PL_parser\->linestr\*(R"),
immediately after the current lexing point (\*(L"PL_parser\->bufptr\*(R"),
reallocating the buffer if necessary.  This means that lexing code that
runs later will see the characters as if they had appeared in the input.
It is not recommended to do this as part of normal parsing, and most
uses of this facility run the risk of the inserted characters being
interpreted in an unintended manner.
.Sp
The string to be inserted is represented by \fIlen\fR octets starting
at \fIpv\fR.  These octets are interpreted as either \s-1UTF\-8\s0 or Latin\-1,
according to whether the \f(CW\*(C`LEX_STUFF_UTF8\*(C'\fR flag is set in \fIflags\fR.
The characters are recoded for the lexer buffer, according to how the
buffer is currently being interpreted (\*(L"lex_bufutf8\*(R").  If a string
to be inserted is available as a Perl scalar, the \*(L"lex_stuff_sv\*(R"
function is more convenient.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 2
\&        void    lex_stuff_pvn(const char *pv, STRLEN len,
\&                              U32 flags)
.Ve
.IP "lex_stuff_pvs" 8
.IX Xref "lex_stuff_pvs"
.IX Item "lex_stuff_pvs"
Like \*(L"lex_stuff_pvn\*(R", but takes a literal string instead of a
string/length pair.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        void    lex_stuff_pvs(const char *pv, U32 flags)
.Ve
.IP "lex_stuff_sv" 8
.IX Xref "lex_stuff_sv"
.IX Item "lex_stuff_sv"
Insert characters into the lexer buffer (\*(L"PL_parser\->linestr\*(R"),
immediately after the current lexing point (\*(L"PL_parser\->bufptr\*(R"),
reallocating the buffer if necessary.  This means that lexing code that
runs later will see the characters as if they had appeared in the input.
It is not recommended to do this as part of normal parsing, and most
uses of this facility run the risk of the inserted characters being
interpreted in an unintended manner.
.Sp
The string to be inserted is the string value of \fIsv\fR.  The characters
are recoded for the lexer buffer, according to how the buffer is currently
being interpreted (\*(L"lex_bufutf8\*(R").  If a string to be inserted is
not already a Perl scalar, the \*(L"lex_stuff_pvn\*(R" function avoids the
need to construct a scalar.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        void    lex_stuff_sv(SV *sv, U32 flags)
.Ve
.IP "lex_unstuff" 8
.IX Xref "lex_unstuff"
.IX Item "lex_unstuff"
Discards text about to be lexed, from \*(L"PL_parser\->bufptr\*(R" up to
\&\fIptr\fR.  Text following \fIptr\fR will be moved, and the buffer shortened.
This hides the discarded text from any lexing code that runs later,
as if the text had never appeared.
.Sp
This is not the normal way to consume lexed text.  For that, use
\&\*(L"lex_read_to\*(R".
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        void    lex_unstuff(char *ptr)
.Ve
.IP "parse_arithexpr" 8
.IX Xref "parse_arithexpr"
.IX Item "parse_arithexpr"
Parse a Perl arithmetic expression.  This may contain operators of precedence
down to the bit shift operators.  The expression must be followed (and thus
terminated) either by a comparison or lower-precedence operator or by
something that would normally terminate an expression such as semicolon.
If \fIflags\fR includes \f(CW\*(C`PARSE_OPTIONAL\*(C'\fR then the expression is optional,
otherwise it is mandatory.  It is up to the caller to ensure that the
dynamic parser state (\*(L"PL_parser\*(R" et al) is correctly set to reflect
the source of the code to be parsed and the lexical context for the
expression.
.Sp
The op tree representing the expression is returned.  If an optional
expression is absent, a null pointer is returned, otherwise the pointer
will be non-null.
.Sp
If an error occurs in parsing or compilation, in most cases a valid op
tree is returned anyway.  The error is reflected in the parser state,
normally resulting in a single exception at the top level of parsing
which covers all the compilation errors that occurred.  Some compilation
errors, however, will throw an exception immediately.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        OP *    parse_arithexpr(U32 flags)
.Ve
.IP "parse_barestmt" 8
.IX Xref "parse_barestmt"
.IX Item "parse_barestmt"
Parse a single unadorned Perl statement.  This may be a normal imperative
statement or a declaration that has compile-time effect.  It does not
include any label or other affixture.  It is up to the caller to ensure
that the dynamic parser state (\*(L"PL_parser\*(R" et al) is correctly set to
reflect the source of the code to be parsed and the lexical context for
the statement.
.Sp
The op tree representing the statement is returned.  This may be a
null pointer if the statement is null, for example if it was actually
a subroutine definition (which has compile-time side effects).  If not
null, it will be ops directly implementing the statement, suitable to
pass to \*(L"newSTATEOP\*(R".  It will not normally include a \f(CW\*(C`nextstate\*(C'\fR or
equivalent op (except for those embedded in a scope contained entirely
within the statement).
.Sp
If an error occurs in parsing or compilation, in most cases a valid op
tree (most likely null) is returned anyway.  The error is reflected in
the parser state, normally resulting in a single exception at the top
level of parsing which covers all the compilation errors that occurred.
Some compilation errors, however, will throw an exception immediately.
.Sp
The \fIflags\fR parameter is reserved for future use, and must always
be zero.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        OP *    parse_barestmt(U32 flags)
.Ve
.IP "parse_block" 8
.IX Xref "parse_block"
.IX Item "parse_block"
Parse a single complete Perl code block.  This consists of an opening
brace, a sequence of statements, and a closing brace.  The block
constitutes a lexical scope, so \f(CW\*(C`my\*(C'\fR variables and various compile-time
effects can be contained within it.  It is up to the caller to ensure
that the dynamic parser state (\*(L"PL_parser\*(R" et al) is correctly set to
reflect the source of the code to be parsed and the lexical context for
the statement.
.Sp
The op tree representing the code block is returned.  This is always a
real op, never a null pointer.  It will normally be a \f(CW\*(C`lineseq\*(C'\fR list,
including \f(CW\*(C`nextstate\*(C'\fR or equivalent ops.  No ops to construct any kind
of runtime scope are included by virtue of it being a block.
.Sp
If an error occurs in parsing or compilation, in most cases a valid op
tree (most likely null) is returned anyway.  The error is reflected in
the parser state, normally resulting in a single exception at the top
level of parsing which covers all the compilation errors that occurred.
Some compilation errors, however, will throw an exception immediately.
.Sp
The \fIflags\fR parameter is reserved for future use, and must always
be zero.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        OP *    parse_block(U32 flags)
.Ve
.IP "parse_fullexpr" 8
.IX Xref "parse_fullexpr"
.IX Item "parse_fullexpr"
Parse a single complete Perl expression.  This allows the full
expression grammar, including the lowest-precedence operators such
as \f(CW\*(C`or\*(C'\fR.  The expression must be followed (and thus terminated) by a
token that an expression would normally be terminated by: end-of-file,
closing bracketing punctuation, semicolon, or one of the keywords that
signals a postfix expression-statement modifier.  If \fIflags\fR includes
\&\f(CW\*(C`PARSE_OPTIONAL\*(C'\fR then the expression is optional, otherwise it is
mandatory.  It is up to the caller to ensure that the dynamic parser
state (\*(L"PL_parser\*(R" et al) is correctly set to reflect the source of
the code to be parsed and the lexical context for the expression.
.Sp
The op tree representing the expression is returned.  If an optional
expression is absent, a null pointer is returned, otherwise the pointer
will be non-null.
.Sp
If an error occurs in parsing or compilation, in most cases a valid op
tree is returned anyway.  The error is reflected in the parser state,
normally resulting in a single exception at the top level of parsing
which covers all the compilation errors that occurred.  Some compilation
errors, however, will throw an exception immediately.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        OP *    parse_fullexpr(U32 flags)
.Ve
.IP "parse_fullstmt" 8
.IX Xref "parse_fullstmt"
.IX Item "parse_fullstmt"
Parse a single complete Perl statement.  This may be a normal imperative
statement or a declaration that has compile-time effect, and may include
optional labels.  It is up to the caller to ensure that the dynamic
parser state (\*(L"PL_parser\*(R" et al) is correctly set to reflect the source
of the code to be parsed and the lexical context for the statement.
.Sp
The op tree representing the statement is returned.  This may be a
null pointer if the statement is null, for example if it was actually
a subroutine definition (which has compile-time side effects).  If not
null, it will be the result of a \*(L"newSTATEOP\*(R" call, normally including
a \f(CW\*(C`nextstate\*(C'\fR or equivalent op.
.Sp
If an error occurs in parsing or compilation, in most cases a valid op
tree (most likely null) is returned anyway.  The error is reflected in
the parser state, normally resulting in a single exception at the top
level of parsing which covers all the compilation errors that occurred.
Some compilation errors, however, will throw an exception immediately.
.Sp
The \fIflags\fR parameter is reserved for future use, and must always
be zero.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        OP *    parse_fullstmt(U32 flags)
.Ve
.IP "parse_label" 8
.IX Xref "parse_label"
.IX Item "parse_label"
Parse a single label, possibly optional, of the type that may prefix a
Perl statement.  It is up to the caller to ensure that the dynamic parser
state (\*(L"PL_parser\*(R" et al) is correctly set to reflect the source of
the code to be parsed.  If \fIflags\fR includes \f(CW\*(C`PARSE_OPTIONAL\*(C'\fR then the
label is optional, otherwise it is mandatory.
.Sp
The name of the label is returned in the form of a fresh scalar.  If an
optional label is absent, a null pointer is returned.
.Sp
If an error occurs in parsing, which can only occur if the label is
mandatory, a valid label is returned anyway.  The error is reflected in
the parser state, normally resulting in a single exception at the top
level of parsing which covers all the compilation errors that occurred.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        SV *    parse_label(U32 flags)
.Ve
.IP "parse_listexpr" 8
.IX Xref "parse_listexpr"
.IX Item "parse_listexpr"
Parse a Perl list expression.  This may contain operators of precedence
down to the comma operator.  The expression must be followed (and thus
terminated) either by a low-precedence logic operator such as \f(CW\*(C`or\*(C'\fR or by
something that would normally terminate an expression such as semicolon.
If \fIflags\fR includes \f(CW\*(C`PARSE_OPTIONAL\*(C'\fR then the expression is optional,
otherwise it is mandatory.  It is up to the caller to ensure that the
dynamic parser state (\*(L"PL_parser\*(R" et al) is correctly set to reflect
the source of the code to be parsed and the lexical context for the
expression.
.Sp
The op tree representing the expression is returned.  If an optional
expression is absent, a null pointer is returned, otherwise the pointer
will be non-null.
.Sp
If an error occurs in parsing or compilation, in most cases a valid op
tree is returned anyway.  The error is reflected in the parser state,
normally resulting in a single exception at the top level of parsing
which covers all the compilation errors that occurred.  Some compilation
errors, however, will throw an exception immediately.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        OP *    parse_listexpr(U32 flags)
.Ve
.IP "parse_stmtseq" 8
.IX Xref "parse_stmtseq"
.IX Item "parse_stmtseq"
Parse a sequence of zero or more Perl statements.  These may be normal
imperative statements, including optional labels, or declarations
that have compile-time effect, or any mixture thereof.  The statement
sequence ends when a closing brace or end-of-file is encountered in a
place where a new statement could have validly started.  It is up to
the caller to ensure that the dynamic parser state (\*(L"PL_parser\*(R" et al)
is correctly set to reflect the source of the code to be parsed and the
lexical context for the statements.
.Sp
The op tree representing the statement sequence is returned.  This may
be a null pointer if the statements were all null, for example if there
were no statements or if there were only subroutine definitions (which
have compile-time side effects).  If not null, it will be a \f(CW\*(C`lineseq\*(C'\fR
list, normally including \f(CW\*(C`nextstate\*(C'\fR or equivalent ops.
.Sp
If an error occurs in parsing or compilation, in most cases a valid op
tree is returned anyway.  The error is reflected in the parser state,
normally resulting in a single exception at the top level of parsing
which covers all the compilation errors that occurred.  Some compilation
errors, however, will throw an exception immediately.
.Sp
The \fIflags\fR parameter is reserved for future use, and must always
be zero.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        OP *    parse_stmtseq(U32 flags)
.Ve
.IP "parse_termexpr" 8
.IX Xref "parse_termexpr"
.IX Item "parse_termexpr"
Parse a Perl term expression.  This may contain operators of precedence
down to the assignment operators.  The expression must be followed (and thus
terminated) either by a comma or lower-precedence operator or by
something that would normally terminate an expression such as semicolon.
If \fIflags\fR includes \f(CW\*(C`PARSE_OPTIONAL\*(C'\fR then the expression is optional,
otherwise it is mandatory.  It is up to the caller to ensure that the
dynamic parser state (\*(L"PL_parser\*(R" et al) is correctly set to reflect
the source of the code to be parsed and the lexical context for the
expression.
.Sp
The op tree representing the expression is returned.  If an optional
expression is absent, a null pointer is returned, otherwise the pointer
will be non-null.
.Sp
If an error occurs in parsing or compilation, in most cases a valid op
tree is returned anyway.  The error is reflected in the parser state,
normally resulting in a single exception at the top level of parsing
which covers all the compilation errors that occurred.  Some compilation
errors, however, will throw an exception immediately.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        OP *    parse_termexpr(U32 flags)
.Ve
.IP "PL_parser" 8
.IX Xref "PL_parser"
.IX Item "PL_parser"
Pointer to a structure encapsulating the state of the parsing operation
currently in progress.  The pointer can be locally changed to perform
a nested parse without interfering with the state of an outer parse.
Individual members of \f(CW\*(C`PL_parser\*(C'\fR have their own documentation.
.IP "PL_parser\->bufend" 8
.IX Xref "PL_parser->bufend"
.IX Item "PL_parser->bufend"
Direct pointer to the end of the chunk of text currently being lexed, the
end of the lexer buffer.  This is equal to \f(CW\*(C`SvPVX(PL_parser\->linestr)
+ SvCUR(PL_parser\->linestr)\*(C'\fR.  A \s-1NUL\s0 character (zero octet) is
always located at the end of the buffer, and does not count as part of
the buffer's contents.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.IP "PL_parser\->bufptr" 8
.IX Xref "PL_parser->bufptr"
.IX Item "PL_parser->bufptr"
Points to the current position of lexing inside the lexer buffer.
Characters around this point may be freely examined, within
the range delimited by \f(CW\*(C`SvPVX("PL_parser\->linestr")\*(C'\fR and
\&\*(L"PL_parser\->bufend\*(R".  The octets of the buffer may be intended to be
interpreted as either \s-1UTF\-8\s0 or Latin\-1, as indicated by \*(L"lex_bufutf8\*(R".
.Sp
Lexing code (whether in the Perl core or not) moves this pointer past
the characters that it consumes.  It is also expected to perform some
bookkeeping whenever a newline character is consumed.  This movement
can be more conveniently performed by the function \*(L"lex_read_to\*(R",
which handles newlines appropriately.
.Sp
Interpretation of the buffer's octets can be abstracted out by
using the slightly higher-level functions \*(L"lex_peek_unichar\*(R" and
\&\*(L"lex_read_unichar\*(R".
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.IP "PL_parser\->linestart" 8
.IX Xref "PL_parser->linestart"
.IX Item "PL_parser->linestart"
Points to the start of the current line inside the lexer buffer.
This is useful for indicating at which column an error occurred, and
not much else.  This must be updated by any lexing code that consumes
a newline; the function \*(L"lex_read_to\*(R" handles this detail.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.IP "PL_parser\->linestr" 8
.IX Xref "PL_parser->linestr"
.IX Item "PL_parser->linestr"
Buffer scalar containing the chunk currently under consideration of the
text currently being lexed.  This is always a plain string scalar (for
which \f(CW\*(C`SvPOK\*(C'\fR is true).  It is not intended to be used as a scalar by
normal scalar means; instead refer to the buffer directly by the pointer
variables described below.
.Sp
The lexer maintains various \f(CW\*(C`char*\*(C'\fR pointers to things in the
\&\f(CW\*(C`PL_parser\->linestr\*(C'\fR buffer.  If \f(CW\*(C`PL_parser\->linestr\*(C'\fR is ever
reallocated, all of these pointers must be updated.  Don't attempt to
do this manually, but rather use \*(L"lex_grow_linestr\*(R" if you need to
reallocate the buffer.
.Sp
The content of the text chunk in the buffer is commonly exactly one
complete line of input, up to and including a newline terminator,
but there are situations where it is otherwise.  The octets of the
buffer may be intended to be interpreted as either \s-1UTF\-8\s0 or Latin\-1.
The function \*(L"lex_bufutf8\*(R" tells you which.  Do not use the \f(CW\*(C`SvUTF8\*(C'\fR
flag on this scalar, which may disagree with it.
.Sp
For direct examination of the buffer, the variable
\&\*(L"PL_parser\->bufend\*(R" points to the end of the buffer.  The current
lexing position is pointed to by \*(L"PL_parser\->bufptr\*(R".  Direct use
of these pointers is usually preferable to examination of the scalar
through normal scalar means.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.SH "Magical Functions"
.IX Header "Magical Functions"
.IP "mg_clear" 8
.IX Xref "mg_clear"
.IX Item "mg_clear"
Clear something magical that the \s-1SV\s0 represents.  See \f(CW\*(C`sv_magic\*(C'\fR.
.Sp
.Vb 1
\&        int     mg_clear(SV* sv)
.Ve
.IP "mg_copy" 8
.IX Xref "mg_copy"
.IX Item "mg_copy"
Copies the magic from one \s-1SV\s0 to another.  See \f(CW\*(C`sv_magic\*(C'\fR.
.Sp
.Vb 2
\&        int     mg_copy(SV *sv, SV *nsv, const char *key,
\&                        I32 klen)
.Ve
.IP "mg_find" 8
.IX Xref "mg_find"
.IX Item "mg_find"
Finds the magic pointer for type matching the \s-1SV\s0.  See \f(CW\*(C`sv_magic\*(C'\fR.
.Sp
.Vb 1
\&        MAGIC*  mg_find(const SV* sv, int type)
.Ve
.IP "mg_findext" 8
.IX Xref "mg_findext"
.IX Item "mg_findext"
Finds the magic pointer of \f(CW\*(C`type\*(C'\fR with the given \f(CW\*(C`vtbl\*(C'\fR for the \f(CW\*(C`SV\*(C'\fR.  See
\&\f(CW\*(C`sv_magicext\*(C'\fR.
.Sp
.Vb 2
\&        MAGIC*  mg_findext(const SV* sv, int type,
\&                           const MGVTBL *vtbl)
.Ve
.IP "mg_free" 8
.IX Xref "mg_free"
.IX Item "mg_free"
Free any magic storage used by the \s-1SV\s0.  See \f(CW\*(C`sv_magic\*(C'\fR.
.Sp
.Vb 1
\&        int     mg_free(SV* sv)
.Ve
.IP "mg_free_type" 8
.IX Xref "mg_free_type"
.IX Item "mg_free_type"
Remove any magic of type \fIhow\fR from the \s-1SV\s0 \fIsv\fR.  See \*(L"sv_magic\*(R".
.Sp
.Vb 1
\&        void    mg_free_type(SV *sv, int how)
.Ve
.IP "mg_get" 8
.IX Xref "mg_get"
.IX Item "mg_get"
Do magic before a value is retrieved from the \s-1SV\s0.  See \f(CW\*(C`sv_magic\*(C'\fR.
.Sp
.Vb 1
\&        int     mg_get(SV* sv)
.Ve
.IP "mg_length" 8
.IX Xref "mg_length"
.IX Item "mg_length"
Report on the \s-1SV\s0's length.  See \f(CW\*(C`sv_magic\*(C'\fR.
.Sp
.Vb 1
\&        U32     mg_length(SV* sv)
.Ve
.IP "mg_magical" 8
.IX Xref "mg_magical"
.IX Item "mg_magical"
Turns on the magical status of an \s-1SV\s0.  See \f(CW\*(C`sv_magic\*(C'\fR.
.Sp
.Vb 1
\&        void    mg_magical(SV* sv)
.Ve
.IP "mg_set" 8
.IX Xref "mg_set"
.IX Item "mg_set"
Do magic after a value is assigned to the \s-1SV\s0.  See \f(CW\*(C`sv_magic\*(C'\fR.
.Sp
.Vb 1
\&        int     mg_set(SV* sv)
.Ve
.IP "SvGETMAGIC" 8
.IX Xref "SvGETMAGIC"
.IX Item "SvGETMAGIC"
Invokes \f(CW\*(C`mg_get\*(C'\fR on an \s-1SV\s0 if it has 'get' magic.  This macro evaluates its
argument more than once.
.Sp
.Vb 1
\&        void    SvGETMAGIC(SV* sv)
.Ve
.IP "SvLOCK" 8
.IX Xref "SvLOCK"
.IX Item "SvLOCK"
Arranges for a mutual exclusion lock to be obtained on sv if a suitable module
has been loaded.
.Sp
.Vb 1
\&        void    SvLOCK(SV* sv)
.Ve
.IP "SvSETMAGIC" 8
.IX Xref "SvSETMAGIC"
.IX Item "SvSETMAGIC"
Invokes \f(CW\*(C`mg_set\*(C'\fR on an \s-1SV\s0 if it has 'set' magic.  This macro evaluates its
argument more than once.
.Sp
.Vb 1
\&        void    SvSETMAGIC(SV* sv)
.Ve
.IP "SvSetMagicSV" 8
.IX Xref "SvSetMagicSV"
.IX Item "SvSetMagicSV"
Like \f(CW\*(C`SvSetSV\*(C'\fR, but does any set magic required afterwards.
.Sp
.Vb 1
\&        void    SvSetMagicSV(SV* dsb, SV* ssv)
.Ve
.IP "SvSetMagicSV_nosteal" 8
.IX Xref "SvSetMagicSV_nosteal"
.IX Item "SvSetMagicSV_nosteal"
Like \f(CW\*(C`SvSetSV_nosteal\*(C'\fR, but does any set magic required afterwards.
.Sp
.Vb 1
\&        void    SvSetMagicSV_nosteal(SV* dsv, SV* ssv)
.Ve
.IP "SvSetSV" 8
.IX Xref "SvSetSV"
.IX Item "SvSetSV"
Calls \f(CW\*(C`sv_setsv\*(C'\fR if dsv is not the same as ssv.  May evaluate arguments
more than once.
.Sp
.Vb 1
\&        void    SvSetSV(SV* dsb, SV* ssv)
.Ve
.IP "SvSetSV_nosteal" 8
.IX Xref "SvSetSV_nosteal"
.IX Item "SvSetSV_nosteal"
Calls a non-destructive version of \f(CW\*(C`sv_setsv\*(C'\fR if dsv is not the same as
ssv.  May evaluate arguments more than once.
.Sp
.Vb 1
\&        void    SvSetSV_nosteal(SV* dsv, SV* ssv)
.Ve
.IP "SvSHARE" 8
.IX Xref "SvSHARE"
.IX Item "SvSHARE"
Arranges for sv to be shared between threads if a suitable module
has been loaded.
.Sp
.Vb 1
\&        void    SvSHARE(SV* sv)
.Ve
.IP "SvUNLOCK" 8
.IX Xref "SvUNLOCK"
.IX Item "SvUNLOCK"
Releases a mutual exclusion lock on sv if a suitable module
has been loaded.
.Sp
.Vb 1
\&        void    SvUNLOCK(SV* sv)
.Ve
.SH "Memory Management"
.IX Header "Memory Management"
.IP "Copy" 8
.IX Xref "Copy"
.IX Item "Copy"
The XSUB-writer's interface to the C \f(CW\*(C`memcpy\*(C'\fR function.  The \f(CW\*(C`src\*(C'\fR is the
source, \f(CW\*(C`dest\*(C'\fR is the destination, \f(CW\*(C`nitems\*(C'\fR is the number of items, and \f(CW\*(C`type\*(C'\fR is
the type.  May fail on overlapping copies.  See also \f(CW\*(C`Move\*(C'\fR.
.Sp
.Vb 1
\&        void    Copy(void* src, void* dest, int nitems, type)
.Ve
.IP "CopyD" 8
.IX Xref "CopyD"
.IX Item "CopyD"
Like \f(CW\*(C`Copy\*(C'\fR but returns dest. Useful for encouraging compilers to tail-call
optimise.
.Sp
.Vb 1
\&        void *  CopyD(void* src, void* dest, int nitems, type)
.Ve
.IP "Move" 8
.IX Xref "Move"
.IX Item "Move"
The XSUB-writer's interface to the C \f(CW\*(C`memmove\*(C'\fR function.  The \f(CW\*(C`src\*(C'\fR is the
source, \f(CW\*(C`dest\*(C'\fR is the destination, \f(CW\*(C`nitems\*(C'\fR is the number of items, and \f(CW\*(C`type\*(C'\fR is
the type.  Can do overlapping moves.  See also \f(CW\*(C`Copy\*(C'\fR.
.Sp
.Vb 1
\&        void    Move(void* src, void* dest, int nitems, type)
.Ve
.IP "MoveD" 8
.IX Xref "MoveD"
.IX Item "MoveD"
Like \f(CW\*(C`Move\*(C'\fR but returns dest. Useful for encouraging compilers to tail-call
optimise.
.Sp
.Vb 1
\&        void *  MoveD(void* src, void* dest, int nitems, type)
.Ve
.IP "Newx" 8
.IX Xref "Newx"
.IX Item "Newx"
The XSUB-writer's interface to the C \f(CW\*(C`malloc\*(C'\fR function.
.Sp
In 5.9.3, \fINewx()\fR and friends replace the older \fINew()\fR \s-1API\s0, and drops
the first parameter, \fIx\fR, a debug aid which allowed callers to identify
themselves.  This aid has been superseded by a new build option,
\&\s-1PERL_MEM_LOG\s0 (see \*(L"\s-1PERL_MEM_LOG\s0\*(R" in perlhacktips).  The older \s-1API\s0 is still
there for use in \s-1XS\s0 modules supporting older perls.
.Sp
.Vb 1
\&        void    Newx(void* ptr, int nitems, type)
.Ve
.IP "Newxc" 8
.IX Xref "Newxc"
.IX Item "Newxc"
The XSUB-writer's interface to the C \f(CW\*(C`malloc\*(C'\fR function, with
cast.  See also \f(CW\*(C`Newx\*(C'\fR.
.Sp
.Vb 1
\&        void    Newxc(void* ptr, int nitems, type, cast)
.Ve
.IP "Newxz" 8
.IX Xref "Newxz"
.IX Item "Newxz"
The XSUB-writer's interface to the C \f(CW\*(C`malloc\*(C'\fR function.  The allocated
memory is zeroed with \f(CW\*(C`memzero\*(C'\fR.  See also \f(CW\*(C`Newx\*(C'\fR.
.Sp
.Vb 1
\&        void    Newxz(void* ptr, int nitems, type)
.Ve
.IP "Poison" 8
.IX Xref "Poison"
.IX Item "Poison"
PoisonWith(0xEF) for catching access to freed memory.
.Sp
.Vb 1
\&        void    Poison(void* dest, int nitems, type)
.Ve
.IP "PoisonFree" 8
.IX Xref "PoisonFree"
.IX Item "PoisonFree"
PoisonWith(0xEF) for catching access to freed memory.
.Sp
.Vb 1
\&        void    PoisonFree(void* dest, int nitems, type)
.Ve
.IP "PoisonNew" 8
.IX Xref "PoisonNew"
.IX Item "PoisonNew"
PoisonWith(0xAB) for catching access to allocated but uninitialized memory.
.Sp
.Vb 1
\&        void    PoisonNew(void* dest, int nitems, type)
.Ve
.IP "PoisonWith" 8
.IX Xref "PoisonWith"
.IX Item "PoisonWith"
Fill up memory with a byte pattern (a byte repeated over and over
again) that hopefully catches attempts to access uninitialized memory.
.Sp
.Vb 2
\&        void    PoisonWith(void* dest, int nitems, type,
\&                           U8 byte)
.Ve
.IP "Renew" 8
.IX Xref "Renew"
.IX Item "Renew"
The XSUB-writer's interface to the C \f(CW\*(C`realloc\*(C'\fR function.
.Sp
.Vb 1
\&        void    Renew(void* ptr, int nitems, type)
.Ve
.IP "Renewc" 8
.IX Xref "Renewc"
.IX Item "Renewc"
The XSUB-writer's interface to the C \f(CW\*(C`realloc\*(C'\fR function, with
cast.
.Sp
.Vb 1
\&        void    Renewc(void* ptr, int nitems, type, cast)
.Ve
.IP "Safefree" 8
.IX Xref "Safefree"
.IX Item "Safefree"
The XSUB-writer's interface to the C \f(CW\*(C`free\*(C'\fR function.
.Sp
.Vb 1
\&        void    Safefree(void* ptr)
.Ve
.IP "savepv" 8
.IX Xref "savepv"
.IX Item "savepv"
Perl's version of \f(CW\*(C`strdup()\*(C'\fR. Returns a pointer to a newly allocated
string which is a duplicate of \f(CW\*(C`pv\*(C'\fR. The size of the string is
determined by \f(CW\*(C`strlen()\*(C'\fR. The memory allocated for the new string can
be freed with the \f(CW\*(C`Safefree()\*(C'\fR function.
.Sp
.Vb 1
\&        char*   savepv(const char* pv)
.Ve
.IP "savepvn" 8
.IX Xref "savepvn"
.IX Item "savepvn"
Perl's version of what \f(CW\*(C`strndup()\*(C'\fR would be if it existed. Returns a
pointer to a newly allocated string which is a duplicate of the first
\&\f(CW\*(C`len\*(C'\fR bytes from \f(CW\*(C`pv\*(C'\fR, plus a trailing \s-1NUL\s0 byte. The memory allocated for
the new string can be freed with the \f(CW\*(C`Safefree()\*(C'\fR function.
.Sp
.Vb 1
\&        char*   savepvn(const char* pv, I32 len)
.Ve
.IP "savepvs" 8
.IX Xref "savepvs"
.IX Item "savepvs"
Like \f(CW\*(C`savepvn\*(C'\fR, but takes a literal string instead of a string/length pair.
.Sp
.Vb 1
\&        char*   savepvs(const char* s)
.Ve
.IP "savesharedpv" 8
.IX Xref "savesharedpv"
.IX Item "savesharedpv"
A version of \f(CW\*(C`savepv()\*(C'\fR which allocates the duplicate string in memory
which is shared between threads.
.Sp
.Vb 1
\&        char*   savesharedpv(const char* pv)
.Ve
.IP "savesharedpvn" 8
.IX Xref "savesharedpvn"
.IX Item "savesharedpvn"
A version of \f(CW\*(C`savepvn()\*(C'\fR which allocates the duplicate string in memory
which is shared between threads. (With the specific difference that a \s-1NULL\s0
pointer is not acceptable)
.Sp
.Vb 2
\&        char*   savesharedpvn(const char *const pv,
\&                              const STRLEN len)
.Ve
.IP "savesharedpvs" 8
.IX Xref "savesharedpvs"
.IX Item "savesharedpvs"
A version of \f(CW\*(C`savepvs()\*(C'\fR which allocates the duplicate string in memory
which is shared between threads.
.Sp
.Vb 1
\&        char*   savesharedpvs(const char* s)
.Ve
.IP "savesharedsvpv" 8
.IX Xref "savesharedsvpv"
.IX Item "savesharedsvpv"
A version of \f(CW\*(C`savesharedpv()\*(C'\fR which allocates the duplicate string in
memory which is shared between threads.
.Sp
.Vb 1
\&        char*   savesharedsvpv(SV *sv)
.Ve
.IP "savesvpv" 8
.IX Xref "savesvpv"
.IX Item "savesvpv"
A version of \f(CW\*(C`savepv()\*(C'\fR/\f(CW\*(C`savepvn()\*(C'\fR which gets the string to duplicate from
the passed in \s-1SV\s0 using \f(CW\*(C`SvPV()\*(C'\fR
.Sp
.Vb 1
\&        char*   savesvpv(SV* sv)
.Ve
.IP "StructCopy" 8
.IX Xref "StructCopy"
.IX Item "StructCopy"
This is an architecture-independent macro to copy one structure to another.
.Sp
.Vb 1
\&        void    StructCopy(type src, type dest, type)
.Ve
.IP "Zero" 8
.IX Xref "Zero"
.IX Item "Zero"
The XSUB-writer's interface to the C \f(CW\*(C`memzero\*(C'\fR function.  The \f(CW\*(C`dest\*(C'\fR is the
destination, \f(CW\*(C`nitems\*(C'\fR is the number of items, and \f(CW\*(C`type\*(C'\fR is the type.
.Sp
.Vb 1
\&        void    Zero(void* dest, int nitems, type)
.Ve
.IP "ZeroD" 8
.IX Xref "ZeroD"
.IX Item "ZeroD"
Like \f(CW\*(C`Zero\*(C'\fR but returns dest. Useful for encouraging compilers to tail-call
optimise.
.Sp
.Vb 1
\&        void *  ZeroD(void* dest, int nitems, type)
.Ve
.SH "Miscellaneous Functions"
.IX Header "Miscellaneous Functions"
.IP "fbm_compile" 8
.IX Xref "fbm_compile"
.IX Item "fbm_compile"
Analyses the string in order to make fast searches on it using \fIfbm_instr()\fR
\&\*(-- the Boyer-Moore algorithm.
.Sp
.Vb 1
\&        void    fbm_compile(SV* sv, U32 flags)
.Ve
.IP "fbm_instr" 8
.IX Xref "fbm_instr"
.IX Item "fbm_instr"
Returns the location of the \s-1SV\s0 in the string delimited by \f(CW\*(C`str\*(C'\fR and
\&\f(CW\*(C`strend\*(C'\fR.  It returns \f(CW\*(C`NULL\*(C'\fR if the string can't be found.  The \f(CW\*(C`sv\*(C'\fR
does not have to be fbm_compiled, but the search will not be as fast
then.
.Sp
.Vb 3
\&        char*   fbm_instr(unsigned char* big,
\&                          unsigned char* bigend, SV* littlestr,
\&                          U32 flags)
.Ve
.IP "foldEQ" 8
.IX Xref "foldEQ"
.IX Item "foldEQ"
Returns true if the leading len bytes of the strings s1 and s2 are the same
case-insensitively; false otherwise.  Uppercase and lowercase \s-1ASCII\s0 range bytes
match themselves and their opposite case counterparts.  Non-cased and non-ASCII
range bytes match only themselves.
.Sp
.Vb 1
\&        I32     foldEQ(const char* a, const char* b, I32 len)
.Ve
.IP "foldEQ_locale" 8
.IX Xref "foldEQ_locale"
.IX Item "foldEQ_locale"
Returns true if the leading len bytes of the strings s1 and s2 are the same
case-insensitively in the current locale; false otherwise.
.Sp
.Vb 2
\&        I32     foldEQ_locale(const char* a, const char* b,
\&                              I32 len)
.Ve
.IP "form" 8
.IX Xref "form"
.IX Item "form"
Takes a sprintf-style format pattern and conventional
(non-SV) arguments and returns the formatted string.
.Sp
.Vb 1
\&    (char *) Perl_form(pTHX_ const char* pat, ...)
.Ve
.Sp
can be used any place a string (char *) is required:
.Sp
.Vb 1
\&    char * s = Perl_form("%d.%d",major,minor);
.Ve
.Sp
Uses a single private buffer so if you want to format several strings you
must explicitly copy the earlier strings away (and free the copies when you
are done).
.Sp
.Vb 1
\&        char*   form(const char* pat, ...)
.Ve
.IP "getcwd_sv" 8
.IX Xref "getcwd_sv"
.IX Item "getcwd_sv"
Fill the sv with current working directory
.Sp
.Vb 1
\&        int     getcwd_sv(SV* sv)
.Ve
.IP "mess" 8
.IX Xref "mess"
.IX Item "mess"
Take a sprintf-style format pattern and argument list.  These are used to
generate a string message.  If the message does not end with a newline,
then it will be extended with some indication of the current location
in the code, as described for \*(L"mess_sv\*(R".
.Sp
Normally, the resulting message is returned in a new mortal \s-1SV\s0.
During global destruction a single \s-1SV\s0 may be shared between uses of
this function.
.Sp
.Vb 1
\&        SV *    mess(const char *pat, ...)
.Ve
.IP "mess_sv" 8
.IX Xref "mess_sv"
.IX Item "mess_sv"
Expands a message, intended for the user, to include an indication of
the current location in the code, if the message does not already appear
to be complete.
.Sp
\&\f(CW\*(C`basemsg\*(C'\fR is the initial message or object.  If it is a reference, it
will be used as-is and will be the result of this function.  Otherwise it
is used as a string, and if it already ends with a newline, it is taken
to be complete, and the result of this function will be the same string.
If the message does not end with a newline, then a segment such as \f(CW\*(C`at
foo.pl line 37\*(C'\fR will be appended, and possibly other clauses indicating
the current state of execution.  The resulting message will end with a
dot and a newline.
.Sp
Normally, the resulting message is returned in a new mortal \s-1SV\s0.
During global destruction a single \s-1SV\s0 may be shared between uses of this
function.  If \f(CW\*(C`consume\*(C'\fR is true, then the function is permitted (but not
required) to modify and return \f(CW\*(C`basemsg\*(C'\fR instead of allocating a new \s-1SV\s0.
.Sp
.Vb 1
\&        SV *    mess_sv(SV *basemsg, bool consume)
.Ve
.IP "my_snprintf" 8
.IX Xref "my_snprintf"
.IX Item "my_snprintf"
The C library \f(CW\*(C`snprintf\*(C'\fR functionality, if available and
standards-compliant (uses \f(CW\*(C`vsnprintf\*(C'\fR, actually).  However, if the
\&\f(CW\*(C`vsnprintf\*(C'\fR is not available, will unfortunately use the unsafe
\&\f(CW\*(C`vsprintf\*(C'\fR which can overrun the buffer (there is an overrun check,
but that may be too late).  Consider using \f(CW\*(C`sv_vcatpvf\*(C'\fR instead, or
getting \f(CW\*(C`vsnprintf\*(C'\fR.
.Sp
.Vb 2
\&        int     my_snprintf(char *buffer, const Size_t len,
\&                            const char *format, ...)
.Ve
.IP "my_sprintf" 8
.IX Xref "my_sprintf"
.IX Item "my_sprintf"
The C library \f(CW\*(C`sprintf\*(C'\fR, wrapped if necessary, to ensure that it will return
the length of the string written to the buffer. Only rare pre-ANSI systems
need the wrapper function \- usually this is a direct call to \f(CW\*(C`sprintf\*(C'\fR.
.Sp
.Vb 1
\&        int     my_sprintf(char *buffer, const char *pat, ...)
.Ve
.IP "my_vsnprintf" 8
.IX Xref "my_vsnprintf"
.IX Item "my_vsnprintf"
The C library \f(CW\*(C`vsnprintf\*(C'\fR if available and standards-compliant.
However, if if the \f(CW\*(C`vsnprintf\*(C'\fR is not available, will unfortunately
use the unsafe \f(CW\*(C`vsprintf\*(C'\fR which can overrun the buffer (there is an
overrun check, but that may be too late).  Consider using
\&\f(CW\*(C`sv_vcatpvf\*(C'\fR instead, or getting \f(CW\*(C`vsnprintf\*(C'\fR.
.Sp
.Vb 2
\&        int     my_vsnprintf(char *buffer, const Size_t len,
\&                             const char *format, va_list ap)
.Ve
.IP "new_version" 8
.IX Xref "new_version"
.IX Item "new_version"
Returns a new version object based on the passed in \s-1SV:\s0
.Sp
.Vb 1
\&    SV *sv = new_version(SV *ver);
.Ve
.Sp
Does not alter the passed in ver \s-1SV\s0.  See \*(L"upg_version\*(R" if you
want to upgrade the \s-1SV\s0.
.Sp
.Vb 1
\&        SV*     new_version(SV *ver)
.Ve
.IP "prescan_version" 8
.IX Xref "prescan_version"
.IX Item "prescan_version"
Validate that a given string can be parsed as a version object, but doesn't
actually perform the parsing.  Can use either strict or lax validation rules.
Can optionally set a number of hint variables to save the parsing code
some time when tokenizing.
.Sp
.Vb 5
\&        const char* prescan_version(const char *s, bool strict,
\&                                    const char** errstr,
\&                                    bool *sqv,
\&                                    int *ssaw_decimal,
\&                                    int *swidth, bool *salpha)
.Ve
.IP "scan_version" 8
.IX Xref "scan_version"
.IX Item "scan_version"
Returns a pointer to the next character after the parsed
version string, as well as upgrading the passed in \s-1SV\s0 to
an \s-1RV\s0.
.Sp
Function must be called with an already existing \s-1SV\s0 like
.Sp
.Vb 2
\&    sv = newSV(0);
\&    s = scan_version(s, SV *sv, bool qv);
.Ve
.Sp
Performs some preprocessing to the string to ensure that
it has the correct characteristics of a version.  Flags the
object if it contains an underscore (which denotes this
is an alpha version).  The boolean qv denotes that the version
should be interpreted as if it had multiple decimals, even if
it doesn't.
.Sp
.Vb 1
\&        const char* scan_version(const char *s, SV *rv, bool qv)
.Ve
.IP "strEQ" 8
.IX Xref "strEQ"
.IX Item "strEQ"
Test two strings to see if they are equal.  Returns true or false.
.Sp
.Vb 1
\&        bool    strEQ(char* s1, char* s2)
.Ve
.IP "strGE" 8
.IX Xref "strGE"
.IX Item "strGE"
Test two strings to see if the first, \f(CW\*(C`s1\*(C'\fR, is greater than or equal to
the second, \f(CW\*(C`s2\*(C'\fR.  Returns true or false.
.Sp
.Vb 1
\&        bool    strGE(char* s1, char* s2)
.Ve
.IP "strGT" 8
.IX Xref "strGT"
.IX Item "strGT"
Test two strings to see if the first, \f(CW\*(C`s1\*(C'\fR, is greater than the second,
\&\f(CW\*(C`s2\*(C'\fR.  Returns true or false.
.Sp
.Vb 1
\&        bool    strGT(char* s1, char* s2)
.Ve
.IP "strLE" 8
.IX Xref "strLE"
.IX Item "strLE"
Test two strings to see if the first, \f(CW\*(C`s1\*(C'\fR, is less than or equal to the
second, \f(CW\*(C`s2\*(C'\fR.  Returns true or false.
.Sp
.Vb 1
\&        bool    strLE(char* s1, char* s2)
.Ve
.IP "strLT" 8
.IX Xref "strLT"
.IX Item "strLT"
Test two strings to see if the first, \f(CW\*(C`s1\*(C'\fR, is less than the second,
\&\f(CW\*(C`s2\*(C'\fR.  Returns true or false.
.Sp
.Vb 1
\&        bool    strLT(char* s1, char* s2)
.Ve
.IP "strNE" 8
.IX Xref "strNE"
.IX Item "strNE"
Test two strings to see if they are different.  Returns true or
false.
.Sp
.Vb 1
\&        bool    strNE(char* s1, char* s2)
.Ve
.IP "strnEQ" 8
.IX Xref "strnEQ"
.IX Item "strnEQ"
Test two strings to see if they are equal.  The \f(CW\*(C`len\*(C'\fR parameter indicates
the number of bytes to compare.  Returns true or false. (A wrapper for
\&\f(CW\*(C`strncmp\*(C'\fR).
.Sp
.Vb 1
\&        bool    strnEQ(char* s1, char* s2, STRLEN len)
.Ve
.IP "strnNE" 8
.IX Xref "strnNE"
.IX Item "strnNE"
Test two strings to see if they are different.  The \f(CW\*(C`len\*(C'\fR parameter
indicates the number of bytes to compare.  Returns true or false. (A
wrapper for \f(CW\*(C`strncmp\*(C'\fR).
.Sp
.Vb 1
\&        bool    strnNE(char* s1, char* s2, STRLEN len)
.Ve
.IP "sv_destroyable" 8
.IX Xref "sv_destroyable"
.IX Item "sv_destroyable"
Dummy routine which reports that object can be destroyed when there is no
sharing module present.  It ignores its single \s-1SV\s0 argument, and returns
\&'true'.  Exists to avoid test for a \s-1NULL\s0 function pointer and because it
could potentially warn under some level of strict-ness.
.Sp
.Vb 1
\&        bool    sv_destroyable(SV *sv)
.Ve
.IP "sv_nosharing" 8
.IX Xref "sv_nosharing"
.IX Item "sv_nosharing"
Dummy routine which \*(L"shares\*(R" an \s-1SV\s0 when there is no sharing module present.
Or \*(L"locks\*(R" it. Or \*(L"unlocks\*(R" it. In other words, ignores its single \s-1SV\s0 argument.
Exists to avoid test for a \s-1NULL\s0 function pointer and because it could
potentially warn under some level of strict-ness.
.Sp
.Vb 1
\&        void    sv_nosharing(SV *sv)
.Ve
.IP "upg_version" 8
.IX Xref "upg_version"
.IX Item "upg_version"
In-place upgrade of the supplied \s-1SV\s0 to a version object.
.Sp
.Vb 1
\&    SV *sv = upg_version(SV *sv, bool qv);
.Ve
.Sp
Returns a pointer to the upgraded \s-1SV\s0.  Set the boolean qv if you want
to force this \s-1SV\s0 to be interpreted as an \*(L"extended\*(R" version.
.Sp
.Vb 1
\&        SV*     upg_version(SV *ver, bool qv)
.Ve
.IP "vcmp" 8
.IX Xref "vcmp"
.IX Item "vcmp"
Version object aware cmp.  Both operands must already have been 
converted into version objects.
.Sp
.Vb 1
\&        int     vcmp(SV *lhv, SV *rhv)
.Ve
.IP "vmess" 8
.IX Xref "vmess"
.IX Item "vmess"
\&\f(CW\*(C`pat\*(C'\fR and \f(CW\*(C`args\*(C'\fR are a sprintf-style format pattern and encapsulated
argument list.  These are used to generate a string message.  If the
message does not end with a newline, then it will be extended with
some indication of the current location in the code, as described for
\&\*(L"mess_sv\*(R".
.Sp
Normally, the resulting message is returned in a new mortal \s-1SV\s0.
During global destruction a single \s-1SV\s0 may be shared between uses of
this function.
.Sp
.Vb 1
\&        SV *    vmess(const char *pat, va_list *args)
.Ve
.IP "vnormal" 8
.IX Xref "vnormal"
.IX Item "vnormal"
Accepts a version object and returns the normalized string
representation.  Call like:
.Sp
.Vb 1
\&    sv = vnormal(rv);
.Ve
.Sp
\&\s-1NOTE:\s0 you can pass either the object directly or the \s-1SV\s0
contained within the \s-1RV\s0.
.Sp
The \s-1SV\s0 returned has a refcount of 1.
.Sp
.Vb 1
\&        SV*     vnormal(SV *vs)
.Ve
.IP "vnumify" 8
.IX Xref "vnumify"
.IX Item "vnumify"
Accepts a version object and returns the normalized floating
point representation.  Call like:
.Sp
.Vb 1
\&    sv = vnumify(rv);
.Ve
.Sp
\&\s-1NOTE:\s0 you can pass either the object directly or the \s-1SV\s0
contained within the \s-1RV\s0.
.Sp
The \s-1SV\s0 returned has a refcount of 1.
.Sp
.Vb 1
\&        SV*     vnumify(SV *vs)
.Ve
.IP "vstringify" 8
.IX Xref "vstringify"
.IX Item "vstringify"
In order to maintain maximum compatibility with earlier versions
of Perl, this function will return either the floating point
notation or the multiple dotted notation, depending on whether
the original version contained 1 or more dots, respectively.
.Sp
The \s-1SV\s0 returned has a refcount of 1.
.Sp
.Vb 1
\&        SV*     vstringify(SV *vs)
.Ve
.IP "vverify" 8
.IX Xref "vverify"
.IX Item "vverify"
Validates that the \s-1SV\s0 contains valid internal structure for a version object.
It may be passed either the version object (\s-1RV\s0) or the hash itself (\s-1HV\s0).  If
the structure is valid, it returns the \s-1HV\s0.  If the structure is invalid,
it returns \s-1NULL\s0.
.Sp
.Vb 1
\&    SV *hv = vverify(sv);
.Ve
.Sp
Note that it only confirms the bare minimum structure (so as not to get
confused by derived classes which may contain additional hash entries):
.Sp
.Vb 1
\&        SV*     vverify(SV *vs)
.Ve
.SH "MRO Functions"
.IX Header "MRO Functions"
.IP "mro_get_linear_isa" 8
.IX Xref "mro_get_linear_isa"
.IX Item "mro_get_linear_isa"
Returns the mro linearisation for the given stash.  By default, this
will be whatever \f(CW\*(C`mro_get_linear_isa_dfs\*(C'\fR returns unless some
other \s-1MRO\s0 is in effect for the stash.  The return value is a
read-only AV*.
.Sp
You are responsible for \f(CW\*(C`SvREFCNT_inc()\*(C'\fR on the
return value if you plan to store it anywhere
semi-permanently (otherwise it might be deleted
out from under you the next time the cache is
invalidated).
.Sp
.Vb 1
\&        AV*     mro_get_linear_isa(HV* stash)
.Ve
.IP "mro_method_changed_in" 8
.IX Xref "mro_method_changed_in"
.IX Item "mro_method_changed_in"
Invalidates method caching on any child classes
of the given stash, so that they might notice
the changes in this one.
.Sp
Ideally, all instances of \f(CW\*(C`PL_sub_generation++\*(C'\fR in
perl source outside of \fImro.c\fR should be
replaced by calls to this.
.Sp
Perl automatically handles most of the common
ways a method might be redefined.  However, there
are a few ways you could change a method in a stash
without the cache code noticing, in which case you
need to call this method afterwards:
.Sp
1) Directly manipulating the stash \s-1HV\s0 entries from
\&\s-1XS\s0 code.
.Sp
2) Assigning a reference to a readonly scalar
constant into a stash entry in order to create
a constant subroutine (like constant.pm
does).
.Sp
This same method is available from pure perl
via, \f(CW\*(C`mro::method_changed_in(classname)\*(C'\fR.
.Sp
.Vb 1
\&        void    mro_method_changed_in(HV* stash)
.Ve
.IP "mro_register" 8
.IX Xref "mro_register"
.IX Item "mro_register"
Registers a custom mro plugin.  See perlmroapi for details.
.Sp
.Vb 1
\&        void    mro_register(const struct mro_alg *mro)
.Ve
.SH "Multicall Functions"
.IX Header "Multicall Functions"
.IP "dMULTICALL" 8
.IX Xref "dMULTICALL"
.IX Item "dMULTICALL"
Declare local variables for a multicall. See \*(L"\s-1LIGHTWEIGHT\s0 \s-1CALLBACKS\s0\*(R" in perlcall.
.Sp
.Vb 1
\&                dMULTICALL;
.Ve
.IP "\s-1MULTICALL\s0" 8
.IX Xref "MULTICALL"
.IX Item "MULTICALL"
Make a lightweight callback. See \*(L"\s-1LIGHTWEIGHT\s0 \s-1CALLBACKS\s0\*(R" in perlcall.
.Sp
.Vb 1
\&                MULTICALL;
.Ve
.IP "\s-1POP_MULTICALL\s0" 8
.IX Xref "POP_MULTICALL"
.IX Item "POP_MULTICALL"
Closing bracket for a lightweight callback.
See \*(L"\s-1LIGHTWEIGHT\s0 \s-1CALLBACKS\s0\*(R" in perlcall.
.Sp
.Vb 1
\&                POP_MULTICALL;
.Ve
.IP "\s-1PUSH_MULTICALL\s0" 8
.IX Xref "PUSH_MULTICALL"
.IX Item "PUSH_MULTICALL"
Opening bracket for a lightweight callback.
See \*(L"\s-1LIGHTWEIGHT\s0 \s-1CALLBACKS\s0\*(R" in perlcall.
.Sp
.Vb 1
\&                PUSH_MULTICALL;
.Ve
.SH "Numeric functions"
.IX Header "Numeric functions"
.IP "grok_bin" 8
.IX Xref "grok_bin"
.IX Item "grok_bin"
converts a string representing a binary number to numeric form.
.Sp
On entry \fIstart\fR and \fI*len\fR give the string to scan, \fI*flags\fR gives
conversion flags, and \fIresult\fR should be \s-1NULL\s0 or a pointer to an \s-1NV\s0.
The scan stops at the end of the string, or the first invalid character.
Unless \f(CW\*(C`PERL_SCAN_SILENT_ILLDIGIT\*(C'\fR is set in \fI*flags\fR, encountering an
invalid character will also trigger a warning.
On return \fI*len\fR is set to the length of the scanned string,
and \fI*flags\fR gives output flags.
.Sp
If the value is <= \f(CW\*(C`UV_MAX\*(C'\fR it is returned as a \s-1UV\s0, the output flags are clear,
and nothing is written to \fI*result\fR. If the value is > \s-1UV_MAX\s0 \f(CW\*(C`grok_bin\*(C'\fR
returns \s-1UV_MAX\s0, sets \f(CW\*(C`PERL_SCAN_GREATER_THAN_UV_MAX\*(C'\fR in the output flags,
and writes the value to \fI*result\fR (or the value is discarded if \fIresult\fR
is \s-1NULL\s0).
.Sp
The binary number may optionally be prefixed with \*(L"0b\*(R" or \*(L"b\*(R" unless
\&\f(CW\*(C`PERL_SCAN_DISALLOW_PREFIX\*(C'\fR is set in \fI*flags\fR on entry. If
\&\f(CW\*(C`PERL_SCAN_ALLOW_UNDERSCORES\*(C'\fR is set in \fI*flags\fR then the binary
number may use '_' characters to separate digits.
.Sp
.Vb 2
\&        UV      grok_bin(const char* start, STRLEN* len_p,
\&                         I32* flags, NV *result)
.Ve
.IP "grok_hex" 8
.IX Xref "grok_hex"
.IX Item "grok_hex"
converts a string representing a hex number to numeric form.
.Sp
On entry \fIstart\fR and \fI*len\fR give the string to scan, \fI*flags\fR gives
conversion flags, and \fIresult\fR should be \s-1NULL\s0 or a pointer to an \s-1NV\s0.
The scan stops at the end of the string, or the first invalid character.
Unless \f(CW\*(C`PERL_SCAN_SILENT_ILLDIGIT\*(C'\fR is set in \fI*flags\fR, encountering an
invalid character will also trigger a warning.
On return \fI*len\fR is set to the length of the scanned string,
and \fI*flags\fR gives output flags.
.Sp
If the value is <= \s-1UV_MAX\s0 it is returned as a \s-1UV\s0, the output flags are clear,
and nothing is written to \fI*result\fR. If the value is > \s-1UV_MAX\s0 \f(CW\*(C`grok_hex\*(C'\fR
returns \s-1UV_MAX\s0, sets \f(CW\*(C`PERL_SCAN_GREATER_THAN_UV_MAX\*(C'\fR in the output flags,
and writes the value to \fI*result\fR (or the value is discarded if \fIresult\fR
is \s-1NULL\s0).
.Sp
The hex number may optionally be prefixed with \*(L"0x\*(R" or \*(L"x\*(R" unless
\&\f(CW\*(C`PERL_SCAN_DISALLOW_PREFIX\*(C'\fR is set in \fI*flags\fR on entry. If
\&\f(CW\*(C`PERL_SCAN_ALLOW_UNDERSCORES\*(C'\fR is set in \fI*flags\fR then the hex
number may use '_' characters to separate digits.
.Sp
.Vb 2
\&        UV      grok_hex(const char* start, STRLEN* len_p,
\&                         I32* flags, NV *result)
.Ve
.IP "grok_number" 8
.IX Xref "grok_number"
.IX Item "grok_number"
Recognise (or not) a number.  The type of the number is returned
(0 if unrecognised), otherwise it is a bit-ORed combination of
\&\s-1IS_NUMBER_IN_UV\s0, \s-1IS_NUMBER_GREATER_THAN_UV_MAX\s0, \s-1IS_NUMBER_NOT_INT\s0,
\&\s-1IS_NUMBER_NEG\s0, \s-1IS_NUMBER_INFINITY\s0, \s-1IS_NUMBER_NAN\s0 (defined in perl.h).
.Sp
If the value of the number can fit an in \s-1UV\s0, it is returned in the *valuep
\&\s-1IS_NUMBER_IN_UV\s0 will be set to indicate that *valuep is valid, \s-1IS_NUMBER_IN_UV\s0
will never be set unless *valuep is valid, but *valuep may have been assigned
to during processing even though \s-1IS_NUMBER_IN_UV\s0 is not set on return.
If valuep is \s-1NULL\s0, \s-1IS_NUMBER_IN_UV\s0 will be set for the same cases as when
valuep is non-NULL, but no actual assignment (or \s-1SEGV\s0) will occur.
.Sp
\&\s-1IS_NUMBER_NOT_INT\s0 will be set with \s-1IS_NUMBER_IN_UV\s0 if trailing decimals were
seen (in which case *valuep gives the true value truncated to an integer), and
\&\s-1IS_NUMBER_NEG\s0 if the number is negative (in which case *valuep holds the
absolute value).  \s-1IS_NUMBER_IN_UV\s0 is not set if e notation was used or the
number is larger than a \s-1UV\s0.
.Sp
.Vb 2
\&        int     grok_number(const char *pv, STRLEN len,
\&                            UV *valuep)
.Ve
.IP "grok_numeric_radix" 8
.IX Xref "grok_numeric_radix"
.IX Item "grok_numeric_radix"
Scan and skip for a numeric decimal separator (radix).
.Sp
.Vb 2
\&        bool    grok_numeric_radix(const char **sp,
\&                                   const char *send)
.Ve
.IP "grok_oct" 8
.IX Xref "grok_oct"
.IX Item "grok_oct"
converts a string representing an octal number to numeric form.
.Sp
On entry \fIstart\fR and \fI*len\fR give the string to scan, \fI*flags\fR gives
conversion flags, and \fIresult\fR should be \s-1NULL\s0 or a pointer to an \s-1NV\s0.
The scan stops at the end of the string, or the first invalid character.
Unless \f(CW\*(C`PERL_SCAN_SILENT_ILLDIGIT\*(C'\fR is set in \fI*flags\fR, encountering an
8 or 9 will also trigger a warning.
On return \fI*len\fR is set to the length of the scanned string,
and \fI*flags\fR gives output flags.
.Sp
If the value is <= \s-1UV_MAX\s0 it is returned as a \s-1UV\s0, the output flags are clear,
and nothing is written to \fI*result\fR. If the value is > \s-1UV_MAX\s0 \f(CW\*(C`grok_oct\*(C'\fR
returns \s-1UV_MAX\s0, sets \f(CW\*(C`PERL_SCAN_GREATER_THAN_UV_MAX\*(C'\fR in the output flags,
and writes the value to \fI*result\fR (or the value is discarded if \fIresult\fR
is \s-1NULL\s0).
.Sp
If \f(CW\*(C`PERL_SCAN_ALLOW_UNDERSCORES\*(C'\fR is set in \fI*flags\fR then the octal
number may use '_' characters to separate digits.
.Sp
.Vb 2
\&        UV      grok_oct(const char* start, STRLEN* len_p,
\&                         I32* flags, NV *result)
.Ve
.IP "Perl_signbit" 8
.IX Xref "Perl_signbit"
.IX Item "Perl_signbit"
Return a non-zero integer if the sign bit on an \s-1NV\s0 is set, and 0 if
it is not.
.Sp
If Configure detects this system has a \fIsignbit()\fR that will work with
our NVs, then we just use it via the #define in perl.h.  Otherwise,
fall back on this implementation.  As a first pass, this gets everything
right except \-0.0.  Alas, catching \-0.0 is the main use for this function,
so this is not too helpful yet.  Still, at least we have the scaffolding
in place to support other systems, should that prove useful.
.Sp
Configure notes:  This function is called 'Perl_signbit' instead of a
plain 'signbit' because it is easy to imagine a system having a \fIsignbit()\fR
function or macro that doesn't happen to work with our particular choice
of NVs.  We shouldn't just re\-#define signbit as Perl_signbit and expect
the standard system headers to be happy.  Also, this is a no-context
function (no pTHX_) because \fIPerl_signbit()\fR is usually re\-#defined in
perl.h as a simple macro call to the system's \fIsignbit()\fR.
Users should just always call \fIPerl_signbit()\fR.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        int     Perl_signbit(NV f)
.Ve
.IP "scan_bin" 8
.IX Xref "scan_bin"
.IX Item "scan_bin"
For backwards compatibility. Use \f(CW\*(C`grok_bin\*(C'\fR instead.
.Sp
.Vb 2
\&        NV      scan_bin(const char* start, STRLEN len,
\&                         STRLEN* retlen)
.Ve
.IP "scan_hex" 8
.IX Xref "scan_hex"
.IX Item "scan_hex"
For backwards compatibility. Use \f(CW\*(C`grok_hex\*(C'\fR instead.
.Sp
.Vb 2
\&        NV      scan_hex(const char* start, STRLEN len,
\&                         STRLEN* retlen)
.Ve
.IP "scan_oct" 8
.IX Xref "scan_oct"
.IX Item "scan_oct"
For backwards compatibility. Use \f(CW\*(C`grok_oct\*(C'\fR instead.
.Sp
.Vb 2
\&        NV      scan_oct(const char* start, STRLEN len,
\&                         STRLEN* retlen)
.Ve
.SH "Optree construction"
.IX Header "Optree construction"
.IP "newASSIGNOP" 8
.IX Xref "newASSIGNOP"
.IX Item "newASSIGNOP"
Constructs, checks, and returns an assignment op.  \fIleft\fR and \fIright\fR
supply the parameters of the assignment; they are consumed by this
function and become part of the constructed op tree.
.Sp
If \fIoptype\fR is \f(CW\*(C`OP_ANDASSIGN\*(C'\fR, \f(CW\*(C`OP_ORASSIGN\*(C'\fR, or \f(CW\*(C`OP_DORASSIGN\*(C'\fR, then
a suitable conditional optree is constructed.  If \fIoptype\fR is the opcode
of a binary operator, such as \f(CW\*(C`OP_BIT_OR\*(C'\fR, then an op is constructed that
performs the binary operation and assigns the result to the left argument.
Either way, if \fIoptype\fR is non-zero then \fIflags\fR has no effect.
.Sp
If \fIoptype\fR is zero, then a plain scalar or list assignment is
constructed.  Which type of assignment it is is automatically determined.
\&\fIflags\fR gives the eight bits of \f(CW\*(C`op_flags\*(C'\fR, except that \f(CW\*(C`OPf_KIDS\*(C'\fR
will be set automatically, and, shifted up eight bits, the eight bits
of \f(CW\*(C`op_private\*(C'\fR, except that the bit with value 1 or 2 is automatically
set as required.
.Sp
.Vb 2
\&        OP *    newASSIGNOP(I32 flags, OP *left, I32 optype,
\&                            OP *right)
.Ve
.IP "newBINOP" 8
.IX Xref "newBINOP"
.IX Item "newBINOP"
Constructs, checks, and returns an op of any binary type.  \fItype\fR
is the opcode.  \fIflags\fR gives the eight bits of \f(CW\*(C`op_flags\*(C'\fR, except
that \f(CW\*(C`OPf_KIDS\*(C'\fR will be set automatically, and, shifted up eight bits,
the eight bits of \f(CW\*(C`op_private\*(C'\fR, except that the bit with value 1 or
2 is automatically set as required.  \fIfirst\fR and \fIlast\fR supply up to
two ops to be the direct children of the binary op; they are consumed
by this function and become part of the constructed op tree.
.Sp
.Vb 2
\&        OP *    newBINOP(I32 type, I32 flags, OP *first,
\&                         OP *last)
.Ve
.IP "newCONDOP" 8
.IX Xref "newCONDOP"
.IX Item "newCONDOP"
Constructs, checks, and returns a conditional-expression (\f(CW\*(C`cond_expr\*(C'\fR)
op.  \fIflags\fR gives the eight bits of \f(CW\*(C`op_flags\*(C'\fR, except that \f(CW\*(C`OPf_KIDS\*(C'\fR
will be set automatically, and, shifted up eight bits, the eight bits of
\&\f(CW\*(C`op_private\*(C'\fR, except that the bit with value 1 is automatically set.
\&\fIfirst\fR supplies the expression selecting between the two branches,
and \fItrueop\fR and \fIfalseop\fR supply the branches; they are consumed by
this function and become part of the constructed op tree.
.Sp
.Vb 2
\&        OP *    newCONDOP(I32 flags, OP *first, OP *trueop,
\&                          OP *falseop)
.Ve
.IP "newFOROP" 8
.IX Xref "newFOROP"
.IX Item "newFOROP"
Constructs, checks, and returns an op tree expressing a \f(CW\*(C`foreach\*(C'\fR
loop (iteration through a list of values).  This is a heavyweight loop,
with structure that allows exiting the loop by \f(CW\*(C`last\*(C'\fR and suchlike.
.Sp
\&\fIsv\fR optionally supplies the variable that will be aliased to each
item in turn; if null, it defaults to \f(CW$_\fR (either lexical or global).
\&\fIexpr\fR supplies the list of values to iterate over.  \fIblock\fR supplies
the main body of the loop, and \fIcont\fR optionally supplies a \f(CW\*(C`continue\*(C'\fR
block that operates as a second half of the body.  All of these optree
inputs are consumed by this function and become part of the constructed
op tree.
.Sp
\&\fIflags\fR gives the eight bits of \f(CW\*(C`op_flags\*(C'\fR for the \f(CW\*(C`leaveloop\*(C'\fR
op and, shifted up eight bits, the eight bits of \f(CW\*(C`op_private\*(C'\fR for
the \f(CW\*(C`leaveloop\*(C'\fR op, except that (in both cases) some bits will be set
automatically.
.Sp
.Vb 2
\&        OP *    newFOROP(I32 flags, OP *sv, OP *expr, OP *block,
\&                         OP *cont)
.Ve
.IP "newGIVENOP" 8
.IX Xref "newGIVENOP"
.IX Item "newGIVENOP"
Constructs, checks, and returns an op tree expressing a \f(CW\*(C`given\*(C'\fR block.
\&\fIcond\fR supplies the expression that will be locally assigned to a lexical
variable, and \fIblock\fR supplies the body of the \f(CW\*(C`given\*(C'\fR construct; they
are consumed by this function and become part of the constructed op tree.
\&\fIdefsv_off\fR is the pad offset of the scalar lexical variable that will
be affected.
.Sp
.Vb 2
\&        OP *    newGIVENOP(OP *cond, OP *block,
\&                           PADOFFSET defsv_off)
.Ve
.IP "newGVOP" 8
.IX Xref "newGVOP"
.IX Item "newGVOP"
Constructs, checks, and returns an op of any type that involves an
embedded reference to a \s-1GV\s0.  \fItype\fR is the opcode.  \fIflags\fR gives the
eight bits of \f(CW\*(C`op_flags\*(C'\fR.  \fIgv\fR identifies the \s-1GV\s0 that the op should
reference; calling this function does not transfer ownership of any
reference to it.
.Sp
.Vb 1
\&        OP *    newGVOP(I32 type, I32 flags, GV *gv)
.Ve
.IP "newLISTOP" 8
.IX Xref "newLISTOP"
.IX Item "newLISTOP"
Constructs, checks, and returns an op of any list type.  \fItype\fR is
the opcode.  \fIflags\fR gives the eight bits of \f(CW\*(C`op_flags\*(C'\fR, except that
\&\f(CW\*(C`OPf_KIDS\*(C'\fR will be set automatically if required.  \fIfirst\fR and \fIlast\fR
supply up to two ops to be direct children of the list op; they are
consumed by this function and become part of the constructed op tree.
.Sp
.Vb 2
\&        OP *    newLISTOP(I32 type, I32 flags, OP *first,
\&                          OP *last)
.Ve
.IP "newLOGOP" 8
.IX Xref "newLOGOP"
.IX Item "newLOGOP"
Constructs, checks, and returns a logical (flow control) op.  \fItype\fR
is the opcode.  \fIflags\fR gives the eight bits of \f(CW\*(C`op_flags\*(C'\fR, except
that \f(CW\*(C`OPf_KIDS\*(C'\fR will be set automatically, and, shifted up eight bits,
the eight bits of \f(CW\*(C`op_private\*(C'\fR, except that the bit with value 1 is
automatically set.  \fIfirst\fR supplies the expression controlling the
flow, and \fIother\fR supplies the side (alternate) chain of ops; they are
consumed by this function and become part of the constructed op tree.
.Sp
.Vb 2
\&        OP *    newLOGOP(I32 type, I32 flags, OP *first,
\&                         OP *other)
.Ve
.IP "newLOOPEX" 8
.IX Xref "newLOOPEX"
.IX Item "newLOOPEX"
Constructs, checks, and returns a loop-exiting op (such as \f(CW\*(C`goto\*(C'\fR
or \f(CW\*(C`last\*(C'\fR).  \fItype\fR is the opcode.  \fIlabel\fR supplies the parameter
determining the target of the op; it is consumed by this function and
become part of the constructed op tree.
.Sp
.Vb 1
\&        OP *    newLOOPEX(I32 type, OP *label)
.Ve
.IP "newLOOPOP" 8
.IX Xref "newLOOPOP"
.IX Item "newLOOPOP"
Constructs, checks, and returns an op tree expressing a loop.  This is
only a loop in the control flow through the op tree; it does not have
the heavyweight loop structure that allows exiting the loop by \f(CW\*(C`last\*(C'\fR
and suchlike.  \fIflags\fR gives the eight bits of \f(CW\*(C`op_flags\*(C'\fR for the
top-level op, except that some bits will be set automatically as required.
\&\fIexpr\fR supplies the expression controlling loop iteration, and \fIblock\fR
supplies the body of the loop; they are consumed by this function and
become part of the constructed op tree.  \fIdebuggable\fR is currently
unused and should always be 1.
.Sp
.Vb 2
\&        OP *    newLOOPOP(I32 flags, I32 debuggable, OP *expr,
\&                          OP *block)
.Ve
.IP "newNULLLIST" 8
.IX Xref "newNULLLIST"
.IX Item "newNULLLIST"
Constructs, checks, and returns a new \f(CW\*(C`stub\*(C'\fR op, which represents an
empty list expression.
.Sp
.Vb 1
\&        OP *    newNULLLIST()
.Ve
.IP "newOP" 8
.IX Xref "newOP"
.IX Item "newOP"
Constructs, checks, and returns an op of any base type (any type that
has no extra fields).  \fItype\fR is the opcode.  \fIflags\fR gives the
eight bits of \f(CW\*(C`op_flags\*(C'\fR, and, shifted up eight bits, the eight bits
of \f(CW\*(C`op_private\*(C'\fR.
.Sp
.Vb 1
\&        OP *    newOP(I32 type, I32 flags)
.Ve
.IP "newPADOP" 8
.IX Xref "newPADOP"
.IX Item "newPADOP"
Constructs, checks, and returns an op of any type that involves a
reference to a pad element.  \fItype\fR is the opcode.  \fIflags\fR gives the
eight bits of \f(CW\*(C`op_flags\*(C'\fR.  A pad slot is automatically allocated, and
is populated with \fIsv\fR; this function takes ownership of one reference
to it.
.Sp
This function only exists if Perl has been compiled to use ithreads.
.Sp
.Vb 1
\&        OP *    newPADOP(I32 type, I32 flags, SV *sv)
.Ve
.IP "newPMOP" 8
.IX Xref "newPMOP"
.IX Item "newPMOP"
Constructs, checks, and returns an op of any pattern matching type.
\&\fItype\fR is the opcode.  \fIflags\fR gives the eight bits of \f(CW\*(C`op_flags\*(C'\fR
and, shifted up eight bits, the eight bits of \f(CW\*(C`op_private\*(C'\fR.
.Sp
.Vb 1
\&        OP *    newPMOP(I32 type, I32 flags)
.Ve
.IP "newPVOP" 8
.IX Xref "newPVOP"
.IX Item "newPVOP"
Constructs, checks, and returns an op of any type that involves an
embedded C\-level pointer (\s-1PV\s0).  \fItype\fR is the opcode.  \fIflags\fR gives
the eight bits of \f(CW\*(C`op_flags\*(C'\fR.  \fIpv\fR supplies the C\-level pointer, which
must have been allocated using \*(L"PerlMemShared_malloc\*(R"; the memory will
be freed when the op is destroyed.
.Sp
.Vb 1
\&        OP *    newPVOP(I32 type, I32 flags, char *pv)
.Ve
.IP "newRANGE" 8
.IX Xref "newRANGE"
.IX Item "newRANGE"
Constructs and returns a \f(CW\*(C`range\*(C'\fR op, with subordinate \f(CW\*(C`flip\*(C'\fR and
\&\f(CW\*(C`flop\*(C'\fR ops.  \fIflags\fR gives the eight bits of \f(CW\*(C`op_flags\*(C'\fR for the
\&\f(CW\*(C`flip\*(C'\fR op and, shifted up eight bits, the eight bits of \f(CW\*(C`op_private\*(C'\fR
for both the \f(CW\*(C`flip\*(C'\fR and \f(CW\*(C`range\*(C'\fR ops, except that the bit with value
1 is automatically set.  \fIleft\fR and \fIright\fR supply the expressions
controlling the endpoints of the range; they are consumed by this function
and become part of the constructed op tree.
.Sp
.Vb 1
\&        OP *    newRANGE(I32 flags, OP *left, OP *right)
.Ve
.IP "newSLICEOP" 8
.IX Xref "newSLICEOP"
.IX Item "newSLICEOP"
Constructs, checks, and returns an \f(CW\*(C`lslice\*(C'\fR (list slice) op.  \fIflags\fR
gives the eight bits of \f(CW\*(C`op_flags\*(C'\fR, except that \f(CW\*(C`OPf_KIDS\*(C'\fR will
be set automatically, and, shifted up eight bits, the eight bits of
\&\f(CW\*(C`op_private\*(C'\fR, except that the bit with value 1 or 2 is automatically
set as required.  \fIlistval\fR and \fIsubscript\fR supply the parameters of
the slice; they are consumed by this function and become part of the
constructed op tree.
.Sp
.Vb 2
\&        OP *    newSLICEOP(I32 flags, OP *subscript,
\&                           OP *listval)
.Ve
.IP "newSTATEOP" 8
.IX Xref "newSTATEOP"
.IX Item "newSTATEOP"
Constructs a state op (\s-1COP\s0).  The state op is normally a \f(CW\*(C`nextstate\*(C'\fR op,
but will be a \f(CW\*(C`dbstate\*(C'\fR op if debugging is enabled for currently-compiled
code.  The state op is populated from \*(L"PL_curcop\*(R" (or \*(L"PL_compiling\*(R").
If \fIlabel\fR is non-null, it supplies the name of a label to attach to
the state op; this function takes ownership of the memory pointed at by
\&\fIlabel\fR, and will free it.  \fIflags\fR gives the eight bits of \f(CW\*(C`op_flags\*(C'\fR
for the state op.
.Sp
If \fIo\fR is null, the state op is returned.  Otherwise the state op is
combined with \fIo\fR into a \f(CW\*(C`lineseq\*(C'\fR list op, which is returned.  \fIo\fR
is consumed by this function and becomes part of the returned op tree.
.Sp
.Vb 1
\&        OP *    newSTATEOP(I32 flags, char *label, OP *o)
.Ve
.IP "newSVOP" 8
.IX Xref "newSVOP"
.IX Item "newSVOP"
Constructs, checks, and returns an op of any type that involves an
embedded \s-1SV\s0.  \fItype\fR is the opcode.  \fIflags\fR gives the eight bits
of \f(CW\*(C`op_flags\*(C'\fR.  \fIsv\fR gives the \s-1SV\s0 to embed in the op; this function
takes ownership of one reference to it.
.Sp
.Vb 1
\&        OP *    newSVOP(I32 type, I32 flags, SV *sv)
.Ve
.IP "newUNOP" 8
.IX Xref "newUNOP"
.IX Item "newUNOP"
Constructs, checks, and returns an op of any unary type.  \fItype\fR is
the opcode.  \fIflags\fR gives the eight bits of \f(CW\*(C`op_flags\*(C'\fR, except that
\&\f(CW\*(C`OPf_KIDS\*(C'\fR will be set automatically if required, and, shifted up eight
bits, the eight bits of \f(CW\*(C`op_private\*(C'\fR, except that the bit with value 1
is automatically set.  \fIfirst\fR supplies an optional op to be the direct
child of the unary op; it is consumed by this function and become part
of the constructed op tree.
.Sp
.Vb 1
\&        OP *    newUNOP(I32 type, I32 flags, OP *first)
.Ve
.IP "newWHENOP" 8
.IX Xref "newWHENOP"
.IX Item "newWHENOP"
Constructs, checks, and returns an op tree expressing a \f(CW\*(C`when\*(C'\fR block.
\&\fIcond\fR supplies the test expression, and \fIblock\fR supplies the block
that will be executed if the test evaluates to true; they are consumed
by this function and become part of the constructed op tree.  \fIcond\fR
will be interpreted DWIMically, often as a comparison against \f(CW$_\fR,
and may be null to generate a \f(CW\*(C`default\*(C'\fR block.
.Sp
.Vb 1
\&        OP *    newWHENOP(OP *cond, OP *block)
.Ve
.IP "newWHILEOP" 8
.IX Xref "newWHILEOP"
.IX Item "newWHILEOP"
Constructs, checks, and returns an op tree expressing a \f(CW\*(C`while\*(C'\fR loop.
This is a heavyweight loop, with structure that allows exiting the loop
by \f(CW\*(C`last\*(C'\fR and suchlike.
.Sp
\&\fIloop\fR is an optional preconstructed \f(CW\*(C`enterloop\*(C'\fR op to use in the
loop; if it is null then a suitable op will be constructed automatically.
\&\fIexpr\fR supplies the loop's controlling expression.  \fIblock\fR supplies the
main body of the loop, and \fIcont\fR optionally supplies a \f(CW\*(C`continue\*(C'\fR block
that operates as a second half of the body.  All of these optree inputs
are consumed by this function and become part of the constructed op tree.
.Sp
\&\fIflags\fR gives the eight bits of \f(CW\*(C`op_flags\*(C'\fR for the \f(CW\*(C`leaveloop\*(C'\fR
op and, shifted up eight bits, the eight bits of \f(CW\*(C`op_private\*(C'\fR for
the \f(CW\*(C`leaveloop\*(C'\fR op, except that (in both cases) some bits will be set
automatically.  \fIdebuggable\fR is currently unused and should always be 1.
\&\fIhas_my\fR can be supplied as true to force the
loop body to be enclosed in its own scope.
.Sp
.Vb 3
\&        OP *    newWHILEOP(I32 flags, I32 debuggable,
\&                           LOOP *loop, OP *expr, OP *block,
\&                           OP *cont, I32 has_my)
.Ve
.SH "Optree Manipulation Functions"
.IX Header "Optree Manipulation Functions"
.IP "ck_entersub_args_list" 8
.IX Xref "ck_entersub_args_list"
.IX Item "ck_entersub_args_list"
Performs the default fixup of the arguments part of an \f(CW\*(C`entersub\*(C'\fR
op tree.  This consists of applying list context to each of the
argument ops.  This is the standard treatment used on a call marked
with \f(CW\*(C`&\*(C'\fR, or a method call, or a call through a subroutine reference,
or any other call where the callee can't be identified at compile time,
or a call where the callee has no prototype.
.Sp
.Vb 1
\&        OP *    ck_entersub_args_list(OP *entersubop)
.Ve
.IP "ck_entersub_args_proto" 8
.IX Xref "ck_entersub_args_proto"
.IX Item "ck_entersub_args_proto"
Performs the fixup of the arguments part of an \f(CW\*(C`entersub\*(C'\fR op tree
based on a subroutine prototype.  This makes various modifications to
the argument ops, from applying context up to inserting \f(CW\*(C`refgen\*(C'\fR ops,
and checking the number and syntactic types of arguments, as directed by
the prototype.  This is the standard treatment used on a subroutine call,
not marked with \f(CW\*(C`&\*(C'\fR, where the callee can be identified at compile time
and has a prototype.
.Sp
\&\fIprotosv\fR supplies the subroutine prototype to be applied to the call.
It may be a normal defined scalar, of which the string value will be used.
Alternatively, for convenience, it may be a subroutine object (a \f(CW\*(C`CV*\*(C'\fR
that has been cast to \f(CW\*(C`SV*\*(C'\fR) which has a prototype.  The prototype
supplied, in whichever form, does not need to match the actual callee
referenced by the op tree.
.Sp
If the argument ops disagree with the prototype, for example by having
an unacceptable number of arguments, a valid op tree is returned anyway.
The error is reflected in the parser state, normally resulting in a single
exception at the top level of parsing which covers all the compilation
errors that occurred.  In the error message, the callee is referred to
by the name defined by the \fInamegv\fR parameter.
.Sp
.Vb 2
\&        OP *    ck_entersub_args_proto(OP *entersubop,
\&                                       GV *namegv, SV *protosv)
.Ve
.IP "ck_entersub_args_proto_or_list" 8
.IX Xref "ck_entersub_args_proto_or_list"
.IX Item "ck_entersub_args_proto_or_list"
Performs the fixup of the arguments part of an \f(CW\*(C`entersub\*(C'\fR op tree either
based on a subroutine prototype or using default list-context processing.
This is the standard treatment used on a subroutine call, not marked
with \f(CW\*(C`&\*(C'\fR, where the callee can be identified at compile time.
.Sp
\&\fIprotosv\fR supplies the subroutine prototype to be applied to the call,
or indicates that there is no prototype.  It may be a normal scalar,
in which case if it is defined then the string value will be used
as a prototype, and if it is undefined then there is no prototype.
Alternatively, for convenience, it may be a subroutine object (a \f(CW\*(C`CV*\*(C'\fR
that has been cast to \f(CW\*(C`SV*\*(C'\fR), of which the prototype will be used if it
has one.  The prototype (or lack thereof) supplied, in whichever form,
does not need to match the actual callee referenced by the op tree.
.Sp
If the argument ops disagree with the prototype, for example by having
an unacceptable number of arguments, a valid op tree is returned anyway.
The error is reflected in the parser state, normally resulting in a single
exception at the top level of parsing which covers all the compilation
errors that occurred.  In the error message, the callee is referred to
by the name defined by the \fInamegv\fR parameter.
.Sp
.Vb 3
\&        OP *    ck_entersub_args_proto_or_list(OP *entersubop,
\&                                               GV *namegv,
\&                                               SV *protosv)
.Ve
.IP "cv_const_sv" 8
.IX Xref "cv_const_sv"
.IX Item "cv_const_sv"
If \f(CW\*(C`cv\*(C'\fR is a constant sub eligible for inlining. returns the constant
value returned by the sub.  Otherwise, returns \s-1NULL\s0.
.Sp
Constant subs can be created with \f(CW\*(C`newCONSTSUB\*(C'\fR or as described in
\&\*(L"Constant Functions\*(R" in perlsub.
.Sp
.Vb 1
\&        SV*     cv_const_sv(const CV *const cv)
.Ve
.IP "cv_get_call_checker" 8
.IX Xref "cv_get_call_checker"
.IX Item "cv_get_call_checker"
Retrieves the function that will be used to fix up a call to \fIcv\fR.
Specifically, the function is applied to an \f(CW\*(C`entersub\*(C'\fR op tree for a
subroutine call, not marked with \f(CW\*(C`&\*(C'\fR, where the callee can be identified
at compile time as \fIcv\fR.
.Sp
The C\-level function pointer is returned in \fI*ckfun_p\fR, and an \s-1SV\s0
argument for it is returned in \fI*ckobj_p\fR.  The function is intended
to be called in this manner:
.Sp
.Vb 1
\&    entersubop = (*ckfun_p)(aTHX_ entersubop, namegv, (*ckobj_p));
.Ve
.Sp
In this call, \fIentersubop\fR is a pointer to the \f(CW\*(C`entersub\*(C'\fR op,
which may be replaced by the check function, and \fInamegv\fR is a \s-1GV\s0
supplying the name that should be used by the check function to refer
to the callee of the \f(CW\*(C`entersub\*(C'\fR op if it needs to emit any diagnostics.
It is permitted to apply the check function in non-standard situations,
such as to a call to a different subroutine or to a method call.
.Sp
By default, the function is
Perl_ck_entersub_args_proto_or_list,
and the \s-1SV\s0 parameter is \fIcv\fR itself.  This implements standard
prototype processing.  It can be changed, for a particular subroutine,
by \*(L"cv_set_call_checker\*(R".
.Sp
.Vb 3
\&        void    cv_get_call_checker(CV *cv,
\&                                    Perl_call_checker *ckfun_p,
\&                                    SV **ckobj_p)
.Ve
.IP "cv_set_call_checker" 8
.IX Xref "cv_set_call_checker"
.IX Item "cv_set_call_checker"
Sets the function that will be used to fix up a call to \fIcv\fR.
Specifically, the function is applied to an \f(CW\*(C`entersub\*(C'\fR op tree for a
subroutine call, not marked with \f(CW\*(C`&\*(C'\fR, where the callee can be identified
at compile time as \fIcv\fR.
.Sp
The C\-level function pointer is supplied in \fIckfun\fR, and an \s-1SV\s0 argument
for it is supplied in \fIckobj\fR.  The function is intended to be called
in this manner:
.Sp
.Vb 1
\&    entersubop = ckfun(aTHX_ entersubop, namegv, ckobj);
.Ve
.Sp
In this call, \fIentersubop\fR is a pointer to the \f(CW\*(C`entersub\*(C'\fR op,
which may be replaced by the check function, and \fInamegv\fR is a \s-1GV\s0
supplying the name that should be used by the check function to refer
to the callee of the \f(CW\*(C`entersub\*(C'\fR op if it needs to emit any diagnostics.
It is permitted to apply the check function in non-standard situations,
such as to a call to a different subroutine or to a method call.
.Sp
The current setting for a particular \s-1CV\s0 can be retrieved by
\&\*(L"cv_get_call_checker\*(R".
.Sp
.Vb 3
\&        void    cv_set_call_checker(CV *cv,
\&                                    Perl_call_checker ckfun,
\&                                    SV *ckobj)
.Ve
.IP "\s-1LINKLIST\s0" 8
.IX Xref "LINKLIST"
.IX Item "LINKLIST"
Given the root of an optree, link the tree in execution order using the
\&\f(CW\*(C`op_next\*(C'\fR pointers and return the first op executed. If this has
already been done, it will not be redone, and \f(CW\*(C`o\->op_next\*(C'\fR will be
returned. If \f(CW\*(C`o\->op_next\*(C'\fR is not already set, \fIo\fR should be at
least an \f(CW\*(C`UNOP\*(C'\fR.
.Sp
.Vb 1
\&        OP*     LINKLIST(OP *o)
.Ve
.IP "newCONSTSUB" 8
.IX Xref "newCONSTSUB"
.IX Item "newCONSTSUB"
See \*(L"newCONSTSUB_flags\*(R".
.Sp
.Vb 1
\&        CV*     newCONSTSUB(HV* stash, const char* name, SV* sv)
.Ve
.IP "newCONSTSUB_flags" 8
.IX Xref "newCONSTSUB_flags"
.IX Item "newCONSTSUB_flags"
Creates a constant sub equivalent to Perl \f(CW\*(C`sub FOO () { 123 }\*(C'\fR which is
eligible for inlining at compile-time.
.Sp
Currently, the only useful value for \f(CW\*(C`flags\*(C'\fR is SVf_UTF8.
.Sp
Passing \s-1NULL\s0 for \s-1SV\s0 creates a constant sub equivalent to \f(CW\*(C`sub BAR () {}\*(C'\fR,
which won't be called if used as a destructor, but will suppress the overhead
of a call to \f(CW\*(C`AUTOLOAD\*(C'\fR.  (This form, however, isn't eligible for inlining at
compile time.)
.Sp
.Vb 2
\&        CV*     newCONSTSUB_flags(HV* stash, const char* name,
\&                                  STRLEN len, U32 flags, SV* sv)
.Ve
.IP "newXS" 8
.IX Xref "newXS"
.IX Item "newXS"
Used by \f(CW\*(C`xsubpp\*(C'\fR to hook up XSUBs as Perl subs.  \fIfilename\fR needs to be
static storage, as it is used directly as \fICvFILE()\fR, without a copy being made.
.IP "op_append_elem" 8
.IX Xref "op_append_elem"
.IX Item "op_append_elem"
Append an item to the list of ops contained directly within a list-type
op, returning the lengthened list.  \fIfirst\fR is the list-type op,
and \fIlast\fR is the op to append to the list.  \fIoptype\fR specifies the
intended opcode for the list.  If \fIfirst\fR is not already a list of the
right type, it will be upgraded into one.  If either \fIfirst\fR or \fIlast\fR
is null, the other is returned unchanged.
.Sp
.Vb 1
\&        OP *    op_append_elem(I32 optype, OP *first, OP *last)
.Ve
.IP "op_append_list" 8
.IX Xref "op_append_list"
.IX Item "op_append_list"
Concatenate the lists of ops contained directly within two list-type ops,
returning the combined list.  \fIfirst\fR and \fIlast\fR are the list-type ops
to concatenate.  \fIoptype\fR specifies the intended opcode for the list.
If either \fIfirst\fR or \fIlast\fR is not already a list of the right type,
it will be upgraded into one.  If either \fIfirst\fR or \fIlast\fR is null,
the other is returned unchanged.
.Sp
.Vb 1
\&        OP *    op_append_list(I32 optype, OP *first, OP *last)
.Ve
.IP "\s-1OP_CLASS\s0" 8
.IX Xref "OP_CLASS"
.IX Item "OP_CLASS"
Return the class of the provided \s-1OP:\s0 that is, which of the *OP
structures it uses. For core ops this currently gets the information out
of PL_opargs, which does not always accurately reflect the type used.
For custom ops the type is returned from the registration, and it is up
to the registree to ensure it is accurate. The value returned will be
one of the OA_* constants from op.h.
.Sp
.Vb 1
\&        U32     OP_CLASS(OP *o)
.Ve
.IP "\s-1OP_DESC\s0" 8
.IX Xref "OP_DESC"
.IX Item "OP_DESC"
Return a short description of the provided \s-1OP\s0.
.Sp
.Vb 1
\&        const char * OP_DESC(OP *o)
.Ve
.IP "op_linklist" 8
.IX Xref "op_linklist"
.IX Item "op_linklist"
This function is the implementation of the \*(L"\s-1LINKLIST\s0\*(R" macro. It should
not be called directly.
.Sp
.Vb 1
\&        OP*     op_linklist(OP *o)
.Ve
.IP "op_lvalue" 8
.IX Xref "op_lvalue"
.IX Item "op_lvalue"
Propagate lvalue (\*(L"modifiable\*(R") context to an op and its children.
\&\fItype\fR represents the context type, roughly based on the type of op that
would do the modifying, although \f(CW\*(C`local()\*(C'\fR is represented by \s-1OP_NULL\s0,
because it has no op type of its own (it is signalled by a flag on
the lvalue op).
.Sp
This function detects things that can't be modified, such as \f(CW\*(C`$x+1\*(C'\fR, and
generates errors for them. For example, \f(CW\*(C`$x+1 = 2\*(C'\fR would cause it to be
called with an op of type \s-1OP_ADD\s0 and a \f(CW\*(C`type\*(C'\fR argument of \s-1OP_SASSIGN\s0.
.Sp
It also flags things that need to behave specially in an lvalue context,
such as \f(CW\*(C`$$x = 5\*(C'\fR which might have to vivify a reference in \f(CW$x\fR.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        OP *    op_lvalue(OP *o, I32 type)
.Ve
.IP "\s-1OP_NAME\s0" 8
.IX Xref "OP_NAME"
.IX Item "OP_NAME"
Return the name of the provided \s-1OP\s0. For core ops this looks up the name
from the op_type; for custom ops from the op_ppaddr.
.Sp
.Vb 1
\&        const char * OP_NAME(OP *o)
.Ve
.IP "op_prepend_elem" 8
.IX Xref "op_prepend_elem"
.IX Item "op_prepend_elem"
Prepend an item to the list of ops contained directly within a list-type
op, returning the lengthened list.  \fIfirst\fR is the op to prepend to the
list, and \fIlast\fR is the list-type op.  \fIoptype\fR specifies the intended
opcode for the list.  If \fIlast\fR is not already a list of the right type,
it will be upgraded into one.  If either \fIfirst\fR or \fIlast\fR is null,
the other is returned unchanged.
.Sp
.Vb 1
\&        OP *    op_prepend_elem(I32 optype, OP *first, OP *last)
.Ve
.IP "op_scope" 8
.IX Xref "op_scope"
.IX Item "op_scope"
Wraps up an op tree with some additional ops so that at runtime a dynamic
scope will be created.  The original ops run in the new dynamic scope,
and then, provided that they exit normally, the scope will be unwound.
The additional ops used to create and unwind the dynamic scope will
normally be an \f(CW\*(C`enter\*(C'\fR/\f(CW\*(C`leave\*(C'\fR pair, but a \f(CW\*(C`scope\*(C'\fR op may be used
instead if the ops are simple enough to not need the full dynamic scope
structure.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        OP *    op_scope(OP *o)
.Ve
.IP "rv2cv_op_cv" 8
.IX Xref "rv2cv_op_cv"
.IX Item "rv2cv_op_cv"
Examines an op, which is expected to identify a subroutine at runtime,
and attempts to determine at compile time which subroutine it identifies.
This is normally used during Perl compilation to determine whether
a prototype can be applied to a function call.  \fIcvop\fR is the op
being considered, normally an \f(CW\*(C`rv2cv\*(C'\fR op.  A pointer to the identified
subroutine is returned, if it could be determined statically, and a null
pointer is returned if it was not possible to determine statically.
.Sp
Currently, the subroutine can be identified statically if the \s-1RV\s0 that the
\&\f(CW\*(C`rv2cv\*(C'\fR is to operate on is provided by a suitable \f(CW\*(C`gv\*(C'\fR or \f(CW\*(C`const\*(C'\fR op.
A \f(CW\*(C`gv\*(C'\fR op is suitable if the \s-1GV\s0's \s-1CV\s0 slot is populated.  A \f(CW\*(C`const\*(C'\fR op is
suitable if the constant value must be an \s-1RV\s0 pointing to a \s-1CV\s0.  Details of
this process may change in future versions of Perl.  If the \f(CW\*(C`rv2cv\*(C'\fR op
has the \f(CW\*(C`OPpENTERSUB_AMPER\*(C'\fR flag set then no attempt is made to identify
the subroutine statically: this flag is used to suppress compile-time
magic on a subroutine call, forcing it to use default runtime behaviour.
.Sp
If \fIflags\fR has the bit \f(CW\*(C`RV2CVOPCV_MARK_EARLY\*(C'\fR set, then the handling
of a \s-1GV\s0 reference is modified.  If a \s-1GV\s0 was examined and its \s-1CV\s0 slot was
found to be empty, then the \f(CW\*(C`gv\*(C'\fR op has the \f(CW\*(C`OPpEARLY_CV\*(C'\fR flag set.
If the op is not optimised away, and the \s-1CV\s0 slot is later populated with
a subroutine having a prototype, that flag eventually triggers the warning
\&\*(L"called too early to check prototype\*(R".
.Sp
If \fIflags\fR has the bit \f(CW\*(C`RV2CVOPCV_RETURN_NAME_GV\*(C'\fR set, then instead
of returning a pointer to the subroutine it returns a pointer to the
\&\s-1GV\s0 giving the most appropriate name for the subroutine in this context.
Normally this is just the \f(CW\*(C`CvGV\*(C'\fR of the subroutine, but for an anonymous
(\f(CW\*(C`CvANON\*(C'\fR) subroutine that is referenced through a \s-1GV\s0 it will be the
referencing \s-1GV\s0.  The resulting \f(CW\*(C`GV*\*(C'\fR is cast to \f(CW\*(C`CV*\*(C'\fR to be returned.
A null pointer is returned as usual if there is no statically-determinable
subroutine.
.Sp
.Vb 1
\&        CV *    rv2cv_op_cv(OP *cvop, U32 flags)
.Ve
.SH "Pad Data Structures"
.IX Header "Pad Data Structures"
.IP "CvPADLIST" 8
.IX Xref "CvPADLIST"
.IX Item "CvPADLIST"
\&\s-1CV\s0's can have CvPADLIST(cv) set to point to an \s-1AV\s0.  This is the \s-1CV\s0's
scratchpad, which stores lexical variables and opcode temporary and
per-thread values.
.Sp
For these purposes \*(L"forms\*(R" are a kind-of \s-1CV\s0, eval"\*(L"s are too (except they're
not callable at will and are always thrown away after the eval\*(R"" is done
executing). Require'd files are simply evals without any outer lexical
scope.
.Sp
XSUBs don't have CvPADLIST set \- dXSTARG fetches values from PL_curpad,
but that is really the callers pad (a slot of which is allocated by
every entersub).
.Sp
The CvPADLIST \s-1AV\s0 has the \s-1REFCNT\s0 of its component items managed \*(L"manually\*(R"
(mostly in pad.c) rather than by normal av.c rules.  So we turn off AvREAL
just before freeing it, to let av.c know not to touch the entries.
The items in the \s-1AV\s0 are not SVs as for a normal \s-1AV\s0, but other AVs:
.Sp
0'th Entry of the CvPADLIST is an \s-1AV\s0 which represents the \*(L"names\*(R" or rather
the \*(L"static type information\*(R" for lexicals.
.Sp
The CvDEPTH'th entry of CvPADLIST \s-1AV\s0 is an \s-1AV\s0 which is the stack frame at that
depth of recursion into the \s-1CV\s0.
The 0'th slot of a frame \s-1AV\s0 is an \s-1AV\s0 which is \f(CW@_\fR.
other entries are storage for variables and op targets.
.Sp
Iterating over the names \s-1AV\s0 iterates over all possible pad
items. Pad slots that are SVs_PADTMP (targets/GVs/constants) end up having
&PL_sv_undef \*(L"names\*(R" (see \fIpad_alloc()\fR).
.Sp
Only my/our variable (SVs_PADMY/SVs_PADOUR) slots get valid names.
The rest are op targets/GVs/constants which are statically allocated
or resolved at compile time.  These don't have names by which they
can be looked up from Perl code at run time through eval"\*(L" like
my/our variables can be.  Since they can't be looked up by \*(R"name"
but only by their index allocated at compile time (which is usually
in PL_op\->op_targ), wasting a name \s-1SV\s0 for them doesn't make sense.
.Sp
The SVs in the names \s-1AV\s0 have their \s-1PV\s0 being the name of the variable.
xlow+1..xhigh inclusive in the \s-1NV\s0 union is a range of cop_seq numbers for
which the name is valid (accessed through the macros \s-1COP_SEQ_RANGE_LOW\s0 and
_HIGH).  During compilation, these fields may hold the special value
\&\s-1PERL_PADSEQ_INTRO\s0 to indicate various stages:
.Sp
.Vb 5
\&   COP_SEQ_RANGE_LOW        _HIGH
\&   \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-        \-\-\-\-\-
\&   PERL_PADSEQ_INTRO            0   variable not yet introduced:   { my ($x
\&   valid\-seq#   PERL_PADSEQ_INTRO   variable in scope:             { my ($x)
\&   valid\-seq#          valid\-seq#   compilation of scope complete: { my ($x) }
.Ve
.Sp
For typed lexicals name \s-1SV\s0 is SVt_PVMG and SvSTASH
points at the type.  For \f(CW\*(C`our\*(C'\fR lexicals, the type is also SVt_PVMG, with the
SvOURSTASH slot pointing at the stash of the associated global (so that
duplicate \f(CW\*(C`our\*(C'\fR declarations in the same package can be detected).  SvUVX is
sometimes hijacked to store the generation number during compilation.
.Sp
If SvFAKE is set on the name \s-1SV\s0, then that slot in the frame \s-1AV\s0 is
a \s-1REFCNT\s0'ed reference to a lexical from \*(L"outside\*(R". In this case,
the name \s-1SV\s0 does not use xlow and xhigh to store a cop_seq range, since it is
in scope throughout. Instead xhigh stores some flags containing info about
the real lexical (is it declared in an anon, and is it capable of being
instantiated multiple times?), and for fake ANONs, xlow contains the index
within the parent's pad where the lexical's value is stored, to make
cloning quicker.
.Sp
If the 'name' is '&' the corresponding entry in frame \s-1AV\s0
is a \s-1CV\s0 representing a possible closure.
(SvFAKE and name of '&' is not a meaningful combination currently but could
become so if \f(CW\*(C`my sub foo {}\*(C'\fR is implemented.)
.Sp
Note that formats are treated as anon subs, and are cloned each time
write is called (if necessary).
.Sp
The flag SVs_PADSTALE is cleared on lexicals each time the \fImy()\fR is executed,
and set on scope exit. This allows the 'Variable \f(CW$x\fR is not available' warning
to be generated in evals, such as
.Sp
.Vb 1
\&    { my $x = 1; sub f { eval \*(Aq$x\*(Aq} } f();
.Ve
.Sp
For state vars, SVs_PADSTALE is overloaded to mean 'not yet initialised'
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        PADLIST * CvPADLIST(CV *cv)
.Ve
.IP "pad_add_name_pvs" 8
.IX Xref "pad_add_name_pvs"
.IX Item "pad_add_name_pvs"
Exactly like \*(L"pad_add_name_pvn\*(R", but takes a literal string instead
of a string/length pair.
.Sp
.Vb 2
\&        PADOFFSET pad_add_name_pvs(const char *name, U32 flags,
\&                                   HV *typestash, HV *ourstash)
.Ve
.IP "pad_findmy_pvs" 8
.IX Xref "pad_findmy_pvs"
.IX Item "pad_findmy_pvs"
Exactly like \*(L"pad_findmy_pvn\*(R", but takes a literal string instead
of a string/length pair.
.Sp
.Vb 1
\&        PADOFFSET pad_findmy_pvs(const char *name, U32 flags)
.Ve
.IP "pad_new" 8
.IX Xref "pad_new"
.IX Item "pad_new"
Create a new padlist, updating the global variables for the
currently-compiling padlist to point to the new padlist.  The following
flags can be \s-1OR\s0'ed together:
.Sp
.Vb 3
\&    padnew_CLONE        this pad is for a cloned CV
\&    padnew_SAVE         save old globals on the save stack
\&    padnew_SAVESUB      also save extra stuff for start of sub
\&
\&        PADLIST * pad_new(int flags)
.Ve
.IP "PL_comppad" 8
.IX Xref "PL_comppad"
.IX Item "PL_comppad"
During compilation, this points to the array containing the values
part of the pad for the currently-compiling code.  (At runtime a \s-1CV\s0 may
have many such value arrays; at compile time just one is constructed.)
At runtime, this points to the array containing the currently-relevant
values for the pad for the currently-executing code.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.IP "PL_comppad_name" 8
.IX Xref "PL_comppad_name"
.IX Item "PL_comppad_name"
During compilation, this points to the array containing the names part
of the pad for the currently-compiling code.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.IP "PL_curpad" 8
.IX Xref "PL_curpad"
.IX Item "PL_curpad"
Points directly to the body of the \*(L"PL_comppad\*(R" array.
(I.e., this is \f(CW\*(C`AvARRAY(PL_comppad)\*(C'\fR.)
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.SH "Per-Interpreter Variables"
.IX Header "Per-Interpreter Variables"
.IP "PL_modglobal" 8
.IX Xref "PL_modglobal"
.IX Item "PL_modglobal"
\&\f(CW\*(C`PL_modglobal\*(C'\fR is a general purpose, interpreter global \s-1HV\s0 for use by
extensions that need to keep information on a per-interpreter basis.
In a pinch, it can also be used as a symbol table for extensions
to share data among each other.  It is a good idea to use keys
prefixed by the package name of the extension that owns the data.
.Sp
.Vb 1
\&        HV*     PL_modglobal
.Ve
.IP "PL_na" 8
.IX Xref "PL_na"
.IX Item "PL_na"
A convenience variable which is typically used with \f(CW\*(C`SvPV\*(C'\fR when one
doesn't care about the length of the string.  It is usually more efficient
to either declare a local variable and use that instead or to use the
\&\f(CW\*(C`SvPV_nolen\*(C'\fR macro.
.Sp
.Vb 1
\&        STRLEN  PL_na
.Ve
.IP "PL_opfreehook" 8
.IX Xref "PL_opfreehook"
.IX Item "PL_opfreehook"
When non\-\f(CW\*(C`NULL\*(C'\fR, the function pointed by this variable will be called each time an \s-1OP\s0 is freed with the corresponding \s-1OP\s0 as the argument.
This allows extensions to free any extra attribute they have locally attached to an \s-1OP\s0.
It is also assured to first fire for the parent \s-1OP\s0 and then for its kids.
.Sp
When you replace this variable, it is considered a good practice to store the possibly previously installed hook and that you recall it inside your own.
.Sp
.Vb 1
\&        Perl_ophook_t   PL_opfreehook
.Ve
.IP "PL_peepp" 8
.IX Xref "PL_peepp"
.IX Item "PL_peepp"
Pointer to the per-subroutine peephole optimiser.  This is a function
that gets called at the end of compilation of a Perl subroutine (or
equivalently independent piece of Perl code) to perform fixups of
some ops and to perform small-scale optimisations.  The function is
called once for each subroutine that is compiled, and is passed, as sole
parameter, a pointer to the op that is the entry point to the subroutine.
It modifies the op tree in place.
.Sp
The peephole optimiser should never be completely replaced.  Rather,
add code to it by wrapping the existing optimiser.  The basic way to do
this can be seen in \*(L"Compile pass 3: peephole optimization\*(R" in perlguts.
If the new code wishes to operate on ops throughout the subroutine's
structure, rather than just at the top level, it is likely to be more
convenient to wrap the \*(L"PL_rpeepp\*(R" hook.
.Sp
.Vb 1
\&        peep_t  PL_peepp
.Ve
.IP "PL_rpeepp" 8
.IX Xref "PL_rpeepp"
.IX Item "PL_rpeepp"
Pointer to the recursive peephole optimiser.  This is a function
that gets called at the end of compilation of a Perl subroutine (or
equivalently independent piece of Perl code) to perform fixups of some
ops and to perform small-scale optimisations.  The function is called
once for each chain of ops linked through their \f(CW\*(C`op_next\*(C'\fR fields;
it is recursively called to handle each side chain.  It is passed, as
sole parameter, a pointer to the op that is at the head of the chain.
It modifies the op tree in place.
.Sp
The peephole optimiser should never be completely replaced.  Rather,
add code to it by wrapping the existing optimiser.  The basic way to do
this can be seen in \*(L"Compile pass 3: peephole optimization\*(R" in perlguts.
If the new code wishes to operate only on ops at a subroutine's top level,
rather than throughout the structure, it is likely to be more convenient
to wrap the \*(L"PL_peepp\*(R" hook.
.Sp
.Vb 1
\&        peep_t  PL_rpeepp
.Ve
.IP "PL_sv_no" 8
.IX Xref "PL_sv_no"
.IX Item "PL_sv_no"
This is the \f(CW\*(C`false\*(C'\fR \s-1SV\s0.  See \f(CW\*(C`PL_sv_yes\*(C'\fR.  Always refer to this as
\&\f(CW&PL_sv_no\fR.
.Sp
.Vb 1
\&        SV      PL_sv_no
.Ve
.IP "PL_sv_undef" 8
.IX Xref "PL_sv_undef"
.IX Item "PL_sv_undef"
This is the \f(CW\*(C`undef\*(C'\fR \s-1SV\s0.  Always refer to this as \f(CW&PL_sv_undef\fR.
.Sp
.Vb 1
\&        SV      PL_sv_undef
.Ve
.IP "PL_sv_yes" 8
.IX Xref "PL_sv_yes"
.IX Item "PL_sv_yes"
This is the \f(CW\*(C`true\*(C'\fR \s-1SV\s0.  See \f(CW\*(C`PL_sv_no\*(C'\fR.  Always refer to this as
\&\f(CW&PL_sv_yes\fR.
.Sp
.Vb 1
\&        SV      PL_sv_yes
.Ve
.SH "REGEXP Functions"
.IX Header "REGEXP Functions"
.IP "SvRX" 8
.IX Xref "SvRX"
.IX Item "SvRX"
Convenience macro to get the \s-1REGEXP\s0 from a \s-1SV\s0. This is approximately
equivalent to the following snippet:
.Sp
.Vb 6
\&    if (SvMAGICAL(sv))
\&        mg_get(sv);
\&    if (SvROK(sv))
\&        sv = MUTABLE_SV(SvRV(sv));
\&    if (SvTYPE(sv) == SVt_REGEXP)
\&        return (REGEXP*) sv;
.Ve
.Sp
\&\s-1NULL\s0 will be returned if a REGEXP* is not found.
.Sp
.Vb 1
\&        REGEXP * SvRX(SV *sv)
.Ve
.IP "SvRXOK" 8
.IX Xref "SvRXOK"
.IX Item "SvRXOK"
Returns a boolean indicating whether the \s-1SV\s0 (or the one it references)
is a \s-1REGEXP\s0.
.Sp
If you want to do something with the REGEXP* later use SvRX instead
and check for \s-1NULL\s0.
.Sp
.Vb 1
\&        bool    SvRXOK(SV* sv)
.Ve
.SH "Simple Exception Handling Macros"
.IX Header "Simple Exception Handling Macros"
.IP "dXCPT" 8
.IX Xref "dXCPT"
.IX Item "dXCPT"
Set up necessary local variables for exception handling.
See \*(L"Exception Handling\*(R" in perlguts.
.Sp
.Vb 1
\&                dXCPT;
.Ve
.IP "\s-1XCPT_CATCH\s0" 8
.IX Xref "XCPT_CATCH"
.IX Item "XCPT_CATCH"
Introduces a catch block.  See \*(L"Exception Handling\*(R" in perlguts.
.IP "\s-1XCPT_RETHROW\s0" 8
.IX Xref "XCPT_RETHROW"
.IX Item "XCPT_RETHROW"
Rethrows a previously caught exception.  See \*(L"Exception Handling\*(R" in perlguts.
.Sp
.Vb 1
\&                XCPT_RETHROW;
.Ve
.IP "\s-1XCPT_TRY_END\s0" 8
.IX Xref "XCPT_TRY_END"
.IX Item "XCPT_TRY_END"
Ends a try block.  See \*(L"Exception Handling\*(R" in perlguts.
.IP "\s-1XCPT_TRY_START\s0" 8
.IX Xref "XCPT_TRY_START"
.IX Item "XCPT_TRY_START"
Starts a try block.  See \*(L"Exception Handling\*(R" in perlguts.
.SH "Stack Manipulation Macros"
.IX Header "Stack Manipulation Macros"
.IP "dMARK" 8
.IX Xref "dMARK"
.IX Item "dMARK"
Declare a stack marker variable, \f(CW\*(C`mark\*(C'\fR, for the \s-1XSUB\s0.  See \f(CW\*(C`MARK\*(C'\fR and
\&\f(CW\*(C`dORIGMARK\*(C'\fR.
.Sp
.Vb 1
\&                dMARK;
.Ve
.IP "dORIGMARK" 8
.IX Xref "dORIGMARK"
.IX Item "dORIGMARK"
Saves the original stack mark for the \s-1XSUB\s0.  See \f(CW\*(C`ORIGMARK\*(C'\fR.
.Sp
.Vb 1
\&                dORIGMARK;
.Ve
.IP "dSP" 8
.IX Xref "dSP"
.IX Item "dSP"
Declares a local copy of perl's stack pointer for the \s-1XSUB\s0, available via
the \f(CW\*(C`SP\*(C'\fR macro.  See \f(CW\*(C`SP\*(C'\fR.
.Sp
.Vb 1
\&                dSP;
.Ve
.IP "\s-1EXTEND\s0" 8
.IX Xref "EXTEND"
.IX Item "EXTEND"
Used to extend the argument stack for an \s-1XSUB\s0's return values. Once
used, guarantees that there is room for at least \f(CW\*(C`nitems\*(C'\fR to be pushed
onto the stack.
.Sp
.Vb 1
\&        void    EXTEND(SP, int nitems)
.Ve
.IP "\s-1MARK\s0" 8
.IX Xref "MARK"
.IX Item "MARK"
Stack marker variable for the \s-1XSUB\s0.  See \f(CW\*(C`dMARK\*(C'\fR.
.IP "mPUSHi" 8
.IX Xref "mPUSHi"
.IX Item "mPUSHi"
Push an integer onto the stack.  The stack must have room for this element.
Does not use \f(CW\*(C`TARG\*(C'\fR.  See also \f(CW\*(C`PUSHi\*(C'\fR, \f(CW\*(C`mXPUSHi\*(C'\fR and \f(CW\*(C`XPUSHi\*(C'\fR.
.Sp
.Vb 1
\&        void    mPUSHi(IV iv)
.Ve
.IP "mPUSHn" 8
.IX Xref "mPUSHn"
.IX Item "mPUSHn"
Push a double onto the stack.  The stack must have room for this element.
Does not use \f(CW\*(C`TARG\*(C'\fR.  See also \f(CW\*(C`PUSHn\*(C'\fR, \f(CW\*(C`mXPUSHn\*(C'\fR and \f(CW\*(C`XPUSHn\*(C'\fR.
.Sp
.Vb 1
\&        void    mPUSHn(NV nv)
.Ve
.IP "mPUSHp" 8
.IX Xref "mPUSHp"
.IX Item "mPUSHp"
Push a string onto the stack.  The stack must have room for this element.
The \f(CW\*(C`len\*(C'\fR indicates the length of the string.  Does not use \f(CW\*(C`TARG\*(C'\fR.
See also \f(CW\*(C`PUSHp\*(C'\fR, \f(CW\*(C`mXPUSHp\*(C'\fR and \f(CW\*(C`XPUSHp\*(C'\fR.
.Sp
.Vb 1
\&        void    mPUSHp(char* str, STRLEN len)
.Ve
.IP "mPUSHs" 8
.IX Xref "mPUSHs"
.IX Item "mPUSHs"
Push an \s-1SV\s0 onto the stack and mortalizes the \s-1SV\s0.  The stack must have room
for this element.  Does not use \f(CW\*(C`TARG\*(C'\fR.  See also \f(CW\*(C`PUSHs\*(C'\fR and \f(CW\*(C`mXPUSHs\*(C'\fR.
.Sp
.Vb 1
\&        void    mPUSHs(SV* sv)
.Ve
.IP "mPUSHu" 8
.IX Xref "mPUSHu"
.IX Item "mPUSHu"
Push an unsigned integer onto the stack.  The stack must have room for this
element.  Does not use \f(CW\*(C`TARG\*(C'\fR.  See also \f(CW\*(C`PUSHu\*(C'\fR, \f(CW\*(C`mXPUSHu\*(C'\fR and \f(CW\*(C`XPUSHu\*(C'\fR.
.Sp
.Vb 1
\&        void    mPUSHu(UV uv)
.Ve
.IP "mXPUSHi" 8
.IX Xref "mXPUSHi"
.IX Item "mXPUSHi"
Push an integer onto the stack, extending the stack if necessary.
Does not use \f(CW\*(C`TARG\*(C'\fR.  See also \f(CW\*(C`XPUSHi\*(C'\fR, \f(CW\*(C`mPUSHi\*(C'\fR and \f(CW\*(C`PUSHi\*(C'\fR.
.Sp
.Vb 1
\&        void    mXPUSHi(IV iv)
.Ve
.IP "mXPUSHn" 8
.IX Xref "mXPUSHn"
.IX Item "mXPUSHn"
Push a double onto the stack, extending the stack if necessary.
Does not use \f(CW\*(C`TARG\*(C'\fR.  See also \f(CW\*(C`XPUSHn\*(C'\fR, \f(CW\*(C`mPUSHn\*(C'\fR and \f(CW\*(C`PUSHn\*(C'\fR.
.Sp
.Vb 1
\&        void    mXPUSHn(NV nv)
.Ve
.IP "mXPUSHp" 8
.IX Xref "mXPUSHp"
.IX Item "mXPUSHp"
Push a string onto the stack, extending the stack if necessary.  The \f(CW\*(C`len\*(C'\fR
indicates the length of the string.  Does not use \f(CW\*(C`TARG\*(C'\fR.  See also \f(CW\*(C`XPUSHp\*(C'\fR,
\&\f(CW\*(C`mPUSHp\*(C'\fR and \f(CW\*(C`PUSHp\*(C'\fR.
.Sp
.Vb 1
\&        void    mXPUSHp(char* str, STRLEN len)
.Ve
.IP "mXPUSHs" 8
.IX Xref "mXPUSHs"
.IX Item "mXPUSHs"
Push an \s-1SV\s0 onto the stack, extending the stack if necessary and mortalizes
the \s-1SV\s0.  Does not use \f(CW\*(C`TARG\*(C'\fR.  See also \f(CW\*(C`XPUSHs\*(C'\fR and \f(CW\*(C`mPUSHs\*(C'\fR.
.Sp
.Vb 1
\&        void    mXPUSHs(SV* sv)
.Ve
.IP "mXPUSHu" 8
.IX Xref "mXPUSHu"
.IX Item "mXPUSHu"
Push an unsigned integer onto the stack, extending the stack if necessary.
Does not use \f(CW\*(C`TARG\*(C'\fR.  See also \f(CW\*(C`XPUSHu\*(C'\fR, \f(CW\*(C`mPUSHu\*(C'\fR and \f(CW\*(C`PUSHu\*(C'\fR.
.Sp
.Vb 1
\&        void    mXPUSHu(UV uv)
.Ve
.IP "\s-1ORIGMARK\s0" 8
.IX Xref "ORIGMARK"
.IX Item "ORIGMARK"
The original stack mark for the \s-1XSUB\s0.  See \f(CW\*(C`dORIGMARK\*(C'\fR.
.IP "POPi" 8
.IX Xref "POPi"
.IX Item "POPi"
Pops an integer off the stack.
.Sp
.Vb 1
\&        IV      POPi
.Ve
.IP "POPl" 8
.IX Xref "POPl"
.IX Item "POPl"
Pops a long off the stack.
.Sp
.Vb 1
\&        long    POPl
.Ve
.IP "POPn" 8
.IX Xref "POPn"
.IX Item "POPn"
Pops a double off the stack.
.Sp
.Vb 1
\&        NV      POPn
.Ve
.IP "POPp" 8
.IX Xref "POPp"
.IX Item "POPp"
Pops a string off the stack. Deprecated. New code should use POPpx.
.Sp
.Vb 1
\&        char*   POPp
.Ve
.IP "POPpbytex" 8
.IX Xref "POPpbytex"
.IX Item "POPpbytex"
Pops a string off the stack which must consist of bytes i.e. characters < 256.
.Sp
.Vb 1
\&        char*   POPpbytex
.Ve
.IP "POPpx" 8
.IX Xref "POPpx"
.IX Item "POPpx"
Pops a string off the stack.
.Sp
.Vb 1
\&        char*   POPpx
.Ve
.IP "POPs" 8
.IX Xref "POPs"
.IX Item "POPs"
Pops an \s-1SV\s0 off the stack.
.Sp
.Vb 1
\&        SV*     POPs
.Ve
.IP "PUSHi" 8
.IX Xref "PUSHi"
.IX Item "PUSHi"
Push an integer onto the stack.  The stack must have room for this element.
Handles 'set' magic.  Uses \f(CW\*(C`TARG\*(C'\fR, so \f(CW\*(C`dTARGET\*(C'\fR or \f(CW\*(C`dXSTARG\*(C'\fR should be
called to declare it.  Do not call multiple \f(CW\*(C`TARG\*(C'\fR\-oriented macros to 
return lists from \s-1XSUB\s0's \- see \f(CW\*(C`mPUSHi\*(C'\fR instead.  See also \f(CW\*(C`XPUSHi\*(C'\fR and
\&\f(CW\*(C`mXPUSHi\*(C'\fR.
.Sp
.Vb 1
\&        void    PUSHi(IV iv)
.Ve
.IP "\s-1PUSHMARK\s0" 8
.IX Xref "PUSHMARK"
.IX Item "PUSHMARK"
Opening bracket for arguments on a callback.  See \f(CW\*(C`PUTBACK\*(C'\fR and
perlcall.
.Sp
.Vb 1
\&        void    PUSHMARK(SP)
.Ve
.IP "PUSHmortal" 8
.IX Xref "PUSHmortal"
.IX Item "PUSHmortal"
Push a new mortal \s-1SV\s0 onto the stack.  The stack must have room for this
element.  Does not use \f(CW\*(C`TARG\*(C'\fR.  See also \f(CW\*(C`PUSHs\*(C'\fR, \f(CW\*(C`XPUSHmortal\*(C'\fR and \f(CW\*(C`XPUSHs\*(C'\fR.
.Sp
.Vb 1
\&        void    PUSHmortal()
.Ve
.IP "PUSHn" 8
.IX Xref "PUSHn"
.IX Item "PUSHn"
Push a double onto the stack.  The stack must have room for this element.
Handles 'set' magic.  Uses \f(CW\*(C`TARG\*(C'\fR, so \f(CW\*(C`dTARGET\*(C'\fR or \f(CW\*(C`dXSTARG\*(C'\fR should be
called to declare it.  Do not call multiple \f(CW\*(C`TARG\*(C'\fR\-oriented macros to
return lists from \s-1XSUB\s0's \- see \f(CW\*(C`mPUSHn\*(C'\fR instead.  See also \f(CW\*(C`XPUSHn\*(C'\fR and
\&\f(CW\*(C`mXPUSHn\*(C'\fR.
.Sp
.Vb 1
\&        void    PUSHn(NV nv)
.Ve
.IP "PUSHp" 8
.IX Xref "PUSHp"
.IX Item "PUSHp"
Push a string onto the stack.  The stack must have room for this element.
The \f(CW\*(C`len\*(C'\fR indicates the length of the string.  Handles 'set' magic.  Uses
\&\f(CW\*(C`TARG\*(C'\fR, so \f(CW\*(C`dTARGET\*(C'\fR or \f(CW\*(C`dXSTARG\*(C'\fR should be called to declare it.  Do not
call multiple \f(CW\*(C`TARG\*(C'\fR\-oriented macros to return lists from \s-1XSUB\s0's \- see
\&\f(CW\*(C`mPUSHp\*(C'\fR instead.  See also \f(CW\*(C`XPUSHp\*(C'\fR and \f(CW\*(C`mXPUSHp\*(C'\fR.
.Sp
.Vb 1
\&        void    PUSHp(char* str, STRLEN len)
.Ve
.IP "PUSHs" 8
.IX Xref "PUSHs"
.IX Item "PUSHs"
Push an \s-1SV\s0 onto the stack.  The stack must have room for this element.
Does not handle 'set' magic.  Does not use \f(CW\*(C`TARG\*(C'\fR.  See also \f(CW\*(C`PUSHmortal\*(C'\fR,
\&\f(CW\*(C`XPUSHs\*(C'\fR and \f(CW\*(C`XPUSHmortal\*(C'\fR.
.Sp
.Vb 1
\&        void    PUSHs(SV* sv)
.Ve
.IP "PUSHu" 8
.IX Xref "PUSHu"
.IX Item "PUSHu"
Push an unsigned integer onto the stack.  The stack must have room for this
element.  Handles 'set' magic.  Uses \f(CW\*(C`TARG\*(C'\fR, so \f(CW\*(C`dTARGET\*(C'\fR or \f(CW\*(C`dXSTARG\*(C'\fR
should be called to declare it.  Do not call multiple \f(CW\*(C`TARG\*(C'\fR\-oriented
macros to return lists from \s-1XSUB\s0's \- see \f(CW\*(C`mPUSHu\*(C'\fR instead.  See also
\&\f(CW\*(C`XPUSHu\*(C'\fR and \f(CW\*(C`mXPUSHu\*(C'\fR.
.Sp
.Vb 1
\&        void    PUSHu(UV uv)
.Ve
.IP "\s-1PUTBACK\s0" 8
.IX Xref "PUTBACK"
.IX Item "PUTBACK"
Closing bracket for \s-1XSUB\s0 arguments.  This is usually handled by \f(CW\*(C`xsubpp\*(C'\fR.
See \f(CW\*(C`PUSHMARK\*(C'\fR and perlcall for other uses.
.Sp
.Vb 1
\&                PUTBACK;
.Ve
.IP "\s-1SP\s0" 8
.IX Xref "SP"
.IX Item "SP"
Stack pointer.  This is usually handled by \f(CW\*(C`xsubpp\*(C'\fR.  See \f(CW\*(C`dSP\*(C'\fR and
\&\f(CW\*(C`SPAGAIN\*(C'\fR.
.IP "\s-1SPAGAIN\s0" 8
.IX Xref "SPAGAIN"
.IX Item "SPAGAIN"
Refetch the stack pointer.  Used after a callback.  See perlcall.
.Sp
.Vb 1
\&                SPAGAIN;
.Ve
.IP "XPUSHi" 8
.IX Xref "XPUSHi"
.IX Item "XPUSHi"
Push an integer onto the stack, extending the stack if necessary.  Handles
\&'set' magic.  Uses \f(CW\*(C`TARG\*(C'\fR, so \f(CW\*(C`dTARGET\*(C'\fR or \f(CW\*(C`dXSTARG\*(C'\fR should be called to
declare it.  Do not call multiple \f(CW\*(C`TARG\*(C'\fR\-oriented macros to return lists
from \s-1XSUB\s0's \- see \f(CW\*(C`mXPUSHi\*(C'\fR instead.  See also \f(CW\*(C`PUSHi\*(C'\fR and \f(CW\*(C`mPUSHi\*(C'\fR.
.Sp
.Vb 1
\&        void    XPUSHi(IV iv)
.Ve
.IP "XPUSHmortal" 8
.IX Xref "XPUSHmortal"
.IX Item "XPUSHmortal"
Push a new mortal \s-1SV\s0 onto the stack, extending the stack if necessary.
Does not use \f(CW\*(C`TARG\*(C'\fR.  See also \f(CW\*(C`XPUSHs\*(C'\fR, \f(CW\*(C`PUSHmortal\*(C'\fR and \f(CW\*(C`PUSHs\*(C'\fR.
.Sp
.Vb 1
\&        void    XPUSHmortal()
.Ve
.IP "XPUSHn" 8
.IX Xref "XPUSHn"
.IX Item "XPUSHn"
Push a double onto the stack, extending the stack if necessary.  Handles
\&'set' magic.  Uses \f(CW\*(C`TARG\*(C'\fR, so \f(CW\*(C`dTARGET\*(C'\fR or \f(CW\*(C`dXSTARG\*(C'\fR should be called to
declare it.  Do not call multiple \f(CW\*(C`TARG\*(C'\fR\-oriented macros to return lists
from \s-1XSUB\s0's \- see \f(CW\*(C`mXPUSHn\*(C'\fR instead.  See also \f(CW\*(C`PUSHn\*(C'\fR and \f(CW\*(C`mPUSHn\*(C'\fR.
.Sp
.Vb 1
\&        void    XPUSHn(NV nv)
.Ve
.IP "XPUSHp" 8
.IX Xref "XPUSHp"
.IX Item "XPUSHp"
Push a string onto the stack, extending the stack if necessary.  The \f(CW\*(C`len\*(C'\fR
indicates the length of the string.  Handles 'set' magic.  Uses \f(CW\*(C`TARG\*(C'\fR, so
\&\f(CW\*(C`dTARGET\*(C'\fR or \f(CW\*(C`dXSTARG\*(C'\fR should be called to declare it.  Do not call
multiple \f(CW\*(C`TARG\*(C'\fR\-oriented macros to return lists from \s-1XSUB\s0's \- see
\&\f(CW\*(C`mXPUSHp\*(C'\fR instead.  See also \f(CW\*(C`PUSHp\*(C'\fR and \f(CW\*(C`mPUSHp\*(C'\fR.
.Sp
.Vb 1
\&        void    XPUSHp(char* str, STRLEN len)
.Ve
.IP "XPUSHs" 8
.IX Xref "XPUSHs"
.IX Item "XPUSHs"
Push an \s-1SV\s0 onto the stack, extending the stack if necessary.  Does not
handle 'set' magic.  Does not use \f(CW\*(C`TARG\*(C'\fR.  See also \f(CW\*(C`XPUSHmortal\*(C'\fR,
\&\f(CW\*(C`PUSHs\*(C'\fR and \f(CW\*(C`PUSHmortal\*(C'\fR.
.Sp
.Vb 1
\&        void    XPUSHs(SV* sv)
.Ve
.IP "XPUSHu" 8
.IX Xref "XPUSHu"
.IX Item "XPUSHu"
Push an unsigned integer onto the stack, extending the stack if necessary.
Handles 'set' magic.  Uses \f(CW\*(C`TARG\*(C'\fR, so \f(CW\*(C`dTARGET\*(C'\fR or \f(CW\*(C`dXSTARG\*(C'\fR should be
called to declare it.  Do not call multiple \f(CW\*(C`TARG\*(C'\fR\-oriented macros to
return lists from \s-1XSUB\s0's \- see \f(CW\*(C`mXPUSHu\*(C'\fR instead.  See also \f(CW\*(C`PUSHu\*(C'\fR and
\&\f(CW\*(C`mPUSHu\*(C'\fR.
.Sp
.Vb 1
\&        void    XPUSHu(UV uv)
.Ve
.IP "\s-1XSRETURN\s0" 8
.IX Xref "XSRETURN"
.IX Item "XSRETURN"
Return from \s-1XSUB\s0, indicating number of items on the stack.  This is usually
handled by \f(CW\*(C`xsubpp\*(C'\fR.
.Sp
.Vb 1
\&        void    XSRETURN(int nitems)
.Ve
.IP "\s-1XSRETURN_EMPTY\s0" 8
.IX Xref "XSRETURN_EMPTY"
.IX Item "XSRETURN_EMPTY"
Return an empty list from an \s-1XSUB\s0 immediately.
.Sp
.Vb 1
\&                XSRETURN_EMPTY;
.Ve
.IP "\s-1XSRETURN_IV\s0" 8
.IX Xref "XSRETURN_IV"
.IX Item "XSRETURN_IV"
Return an integer from an \s-1XSUB\s0 immediately.  Uses \f(CW\*(C`XST_mIV\*(C'\fR.
.Sp
.Vb 1
\&        void    XSRETURN_IV(IV iv)
.Ve
.IP "\s-1XSRETURN_NO\s0" 8
.IX Xref "XSRETURN_NO"
.IX Item "XSRETURN_NO"
Return \f(CW&PL_sv_no\fR from an \s-1XSUB\s0 immediately.  Uses \f(CW\*(C`XST_mNO\*(C'\fR.
.Sp
.Vb 1
\&                XSRETURN_NO;
.Ve
.IP "\s-1XSRETURN_NV\s0" 8
.IX Xref "XSRETURN_NV"
.IX Item "XSRETURN_NV"
Return a double from an \s-1XSUB\s0 immediately.  Uses \f(CW\*(C`XST_mNV\*(C'\fR.
.Sp
.Vb 1
\&        void    XSRETURN_NV(NV nv)
.Ve
.IP "\s-1XSRETURN_PV\s0" 8
.IX Xref "XSRETURN_PV"
.IX Item "XSRETURN_PV"
Return a copy of a string from an \s-1XSUB\s0 immediately.  Uses \f(CW\*(C`XST_mPV\*(C'\fR.
.Sp
.Vb 1
\&        void    XSRETURN_PV(char* str)
.Ve
.IP "\s-1XSRETURN_UNDEF\s0" 8
.IX Xref "XSRETURN_UNDEF"
.IX Item "XSRETURN_UNDEF"
Return \f(CW&PL_sv_undef\fR from an \s-1XSUB\s0 immediately.  Uses \f(CW\*(C`XST_mUNDEF\*(C'\fR.
.Sp
.Vb 1
\&                XSRETURN_UNDEF;
.Ve
.IP "\s-1XSRETURN_UV\s0" 8
.IX Xref "XSRETURN_UV"
.IX Item "XSRETURN_UV"
Return an integer from an \s-1XSUB\s0 immediately.  Uses \f(CW\*(C`XST_mUV\*(C'\fR.
.Sp
.Vb 1
\&        void    XSRETURN_UV(IV uv)
.Ve
.IP "\s-1XSRETURN_YES\s0" 8
.IX Xref "XSRETURN_YES"
.IX Item "XSRETURN_YES"
Return \f(CW&PL_sv_yes\fR from an \s-1XSUB\s0 immediately.  Uses \f(CW\*(C`XST_mYES\*(C'\fR.
.Sp
.Vb 1
\&                XSRETURN_YES;
.Ve
.IP "XST_mIV" 8
.IX Xref "XST_mIV"
.IX Item "XST_mIV"
Place an integer into the specified position \f(CW\*(C`pos\*(C'\fR on the stack.  The
value is stored in a new mortal \s-1SV\s0.
.Sp
.Vb 1
\&        void    XST_mIV(int pos, IV iv)
.Ve
.IP "XST_mNO" 8
.IX Xref "XST_mNO"
.IX Item "XST_mNO"
Place \f(CW&PL_sv_no\fR into the specified position \f(CW\*(C`pos\*(C'\fR on the
stack.
.Sp
.Vb 1
\&        void    XST_mNO(int pos)
.Ve
.IP "XST_mNV" 8
.IX Xref "XST_mNV"
.IX Item "XST_mNV"
Place a double into the specified position \f(CW\*(C`pos\*(C'\fR on the stack.  The value
is stored in a new mortal \s-1SV\s0.
.Sp
.Vb 1
\&        void    XST_mNV(int pos, NV nv)
.Ve
.IP "XST_mPV" 8
.IX Xref "XST_mPV"
.IX Item "XST_mPV"
Place a copy of a string into the specified position \f(CW\*(C`pos\*(C'\fR on the stack. 
The value is stored in a new mortal \s-1SV\s0.
.Sp
.Vb 1
\&        void    XST_mPV(int pos, char* str)
.Ve
.IP "XST_mUNDEF" 8
.IX Xref "XST_mUNDEF"
.IX Item "XST_mUNDEF"
Place \f(CW&PL_sv_undef\fR into the specified position \f(CW\*(C`pos\*(C'\fR on the
stack.
.Sp
.Vb 1
\&        void    XST_mUNDEF(int pos)
.Ve
.IP "XST_mYES" 8
.IX Xref "XST_mYES"
.IX Item "XST_mYES"
Place \f(CW&PL_sv_yes\fR into the specified position \f(CW\*(C`pos\*(C'\fR on the
stack.
.Sp
.Vb 1
\&        void    XST_mYES(int pos)
.Ve
.SH "SV Flags"
.IX Header "SV Flags"
.IP "svtype" 8
.IX Xref "svtype"
.IX Item "svtype"
An enum of flags for Perl types.  These are found in the file \fBsv.h\fR
in the \f(CW\*(C`svtype\*(C'\fR enum.  Test these flags with the \f(CW\*(C`SvTYPE\*(C'\fR macro.
.IP "SVt_IV" 8
.IX Xref "SVt_IV"
.IX Item "SVt_IV"
Integer type flag for scalars.  See \f(CW\*(C`svtype\*(C'\fR.
.IP "SVt_NV" 8
.IX Xref "SVt_NV"
.IX Item "SVt_NV"
Double type flag for scalars.  See \f(CW\*(C`svtype\*(C'\fR.
.IP "SVt_PV" 8
.IX Xref "SVt_PV"
.IX Item "SVt_PV"
Pointer type flag for scalars.  See \f(CW\*(C`svtype\*(C'\fR.
.IP "SVt_PVAV" 8
.IX Xref "SVt_PVAV"
.IX Item "SVt_PVAV"
Type flag for arrays.  See \f(CW\*(C`svtype\*(C'\fR.
.IP "SVt_PVCV" 8
.IX Xref "SVt_PVCV"
.IX Item "SVt_PVCV"
Type flag for code refs.  See \f(CW\*(C`svtype\*(C'\fR.
.IP "SVt_PVHV" 8
.IX Xref "SVt_PVHV"
.IX Item "SVt_PVHV"
Type flag for hashes.  See \f(CW\*(C`svtype\*(C'\fR.
.IP "SVt_PVMG" 8
.IX Xref "SVt_PVMG"
.IX Item "SVt_PVMG"
Type flag for blessed scalars.  See \f(CW\*(C`svtype\*(C'\fR.
.SH "SV Manipulation Functions"
.IX Header "SV Manipulation Functions"
.IP "boolSV" 8
.IX Xref "boolSV"
.IX Item "boolSV"
Returns a true \s-1SV\s0 if \f(CW\*(C`b\*(C'\fR is a true value, or a false \s-1SV\s0 if \f(CW\*(C`b\*(C'\fR is 0.
.Sp
See also \f(CW\*(C`PL_sv_yes\*(C'\fR and \f(CW\*(C`PL_sv_no\*(C'\fR.
.Sp
.Vb 1
\&        SV *    boolSV(bool b)
.Ve
.IP "croak_xs_usage" 8
.IX Xref "croak_xs_usage"
.IX Item "croak_xs_usage"
A specialised variant of \f(CW\*(C`croak()\*(C'\fR for emitting the usage message for xsubs
.Sp
.Vb 1
\&    croak_xs_usage(cv, "eee_yow");
.Ve
.Sp
works out the package name and subroutine name from \f(CW\*(C`cv\*(C'\fR, and then calls
\&\f(CW\*(C`croak()\*(C'\fR. Hence if \f(CW\*(C`cv\*(C'\fR is \f(CW&ouch::awk\fR, it would call \f(CW\*(C`croak\*(C'\fR as:
.Sp
.Vb 1
\&    Perl_croak(aTHX_ "Usage: %"SVf"::%"SVf"(%s)", "ouch" "awk", "eee_yow");
\&
\&        void    croak_xs_usage(const CV *const cv,
\&                               const char *const params)
.Ve
.IP "get_sv" 8
.IX Xref "get_sv"
.IX Item "get_sv"
Returns the \s-1SV\s0 of the specified Perl scalar.  \f(CW\*(C`flags\*(C'\fR are passed to
\&\f(CW\*(C`gv_fetchpv\*(C'\fR. If \f(CW\*(C`GV_ADD\*(C'\fR is set and the
Perl variable does not exist then it will be created.  If \f(CW\*(C`flags\*(C'\fR is zero
and the variable does not exist then \s-1NULL\s0 is returned.
.Sp
\&\s-1NOTE:\s0 the perl_ form of this function is deprecated.
.Sp
.Vb 1
\&        SV*     get_sv(const char *name, I32 flags)
.Ve
.IP "newRV_inc" 8
.IX Xref "newRV_inc"
.IX Item "newRV_inc"
Creates an \s-1RV\s0 wrapper for an \s-1SV\s0.  The reference count for the original \s-1SV\s0 is
incremented.
.Sp
.Vb 1
\&        SV*     newRV_inc(SV* sv)
.Ve
.IP "newSVpvn_utf8" 8
.IX Xref "newSVpvn_utf8"
.IX Item "newSVpvn_utf8"
Creates a new \s-1SV\s0 and copies a string into it.  If utf8 is true, calls
\&\f(CW\*(C`SvUTF8_on\*(C'\fR on the new \s-1SV\s0.  Implemented as a wrapper around \f(CW\*(C`newSVpvn_flags\*(C'\fR.
.Sp
.Vb 2
\&        SV*     newSVpvn_utf8(NULLOK const char* s, STRLEN len,
\&                              U32 utf8)
.Ve
.IP "SvCUR" 8
.IX Xref "SvCUR"
.IX Item "SvCUR"
Returns the length of the string which is in the \s-1SV\s0.  See \f(CW\*(C`SvLEN\*(C'\fR.
.Sp
.Vb 1
\&        STRLEN  SvCUR(SV* sv)
.Ve
.IP "SvCUR_set" 8
.IX Xref "SvCUR_set"
.IX Item "SvCUR_set"
Set the current length of the string which is in the \s-1SV\s0.  See \f(CW\*(C`SvCUR\*(C'\fR
and \f(CW\*(C`SvIV_set\*(C'\fR.
.Sp
.Vb 1
\&        void    SvCUR_set(SV* sv, STRLEN len)
.Ve
.IP "SvEND" 8
.IX Xref "SvEND"
.IX Item "SvEND"
Returns a pointer to the spot just after the last character in
the string which is in the \s-1SV\s0, where there is usually a trailing
null (even though Perl scalars do not strictly require it).
See \f(CW\*(C`SvCUR\*(C'\fR.  Access the character as *(SvEND(sv)).
.Sp
Warning: If \f(CW\*(C`SvCUR\*(C'\fR is equal to \f(CW\*(C`SvLEN\*(C'\fR, then \f(CW\*(C`SvEND\*(C'\fR points to
unallocated memory.
.Sp
.Vb 1
\&        char*   SvEND(SV* sv)
.Ve
.IP "SvGAMAGIC" 8
.IX Xref "SvGAMAGIC"
.IX Item "SvGAMAGIC"
Returns true if the \s-1SV\s0 has get magic or
overloading.  If either is true then
the scalar is active data, and has the potential to return a new value every
time it is accessed.  Hence you must be careful to
only read it once per user logical operation and work
with that returned value.  If neither is true then
the scalar's value cannot change unless written to.
.Sp
.Vb 1
\&        U32     SvGAMAGIC(SV* sv)
.Ve
.IP "SvGROW" 8
.IX Xref "SvGROW"
.IX Item "SvGROW"
Expands the character buffer in the \s-1SV\s0 so that it has room for the
indicated number of bytes (remember to reserve space for an extra trailing
\&\s-1NUL\s0 character).  Calls \f(CW\*(C`sv_grow\*(C'\fR to perform the expansion if necessary.
Returns a pointer to the character buffer.
.Sp
.Vb 1
\&        char *  SvGROW(SV* sv, STRLEN len)
.Ve
.IP "SvIOK" 8
.IX Xref "SvIOK"
.IX Item "SvIOK"
Returns a U32 value indicating whether the \s-1SV\s0 contains an integer.
.Sp
.Vb 1
\&        U32     SvIOK(SV* sv)
.Ve
.IP "SvIOKp" 8
.IX Xref "SvIOKp"
.IX Item "SvIOKp"
Returns a U32 value indicating whether the \s-1SV\s0 contains an integer.  Checks
the \fBprivate\fR setting.  Use \f(CW\*(C`SvIOK\*(C'\fR instead.
.Sp
.Vb 1
\&        U32     SvIOKp(SV* sv)
.Ve
.IP "SvIOK_notUV" 8
.IX Xref "SvIOK_notUV"
.IX Item "SvIOK_notUV"
Returns a boolean indicating whether the \s-1SV\s0 contains a signed integer.
.Sp
.Vb 1
\&        bool    SvIOK_notUV(SV* sv)
.Ve
.IP "SvIOK_off" 8
.IX Xref "SvIOK_off"
.IX Item "SvIOK_off"
Unsets the \s-1IV\s0 status of an \s-1SV\s0.
.Sp
.Vb 1
\&        void    SvIOK_off(SV* sv)
.Ve
.IP "SvIOK_on" 8
.IX Xref "SvIOK_on"
.IX Item "SvIOK_on"
Tells an \s-1SV\s0 that it is an integer.
.Sp
.Vb 1
\&        void    SvIOK_on(SV* sv)
.Ve
.IP "SvIOK_only" 8
.IX Xref "SvIOK_only"
.IX Item "SvIOK_only"
Tells an \s-1SV\s0 that it is an integer and disables all other \s-1OK\s0 bits.
.Sp
.Vb 1
\&        void    SvIOK_only(SV* sv)
.Ve
.IP "SvIOK_only_UV" 8
.IX Xref "SvIOK_only_UV"
.IX Item "SvIOK_only_UV"
Tells and \s-1SV\s0 that it is an unsigned integer and disables all other \s-1OK\s0 bits.
.Sp
.Vb 1
\&        void    SvIOK_only_UV(SV* sv)
.Ve
.IP "SvIOK_UV" 8
.IX Xref "SvIOK_UV"
.IX Item "SvIOK_UV"
Returns a boolean indicating whether the \s-1SV\s0 contains an unsigned integer.
.Sp
.Vb 1
\&        bool    SvIOK_UV(SV* sv)
.Ve
.IP "SvIsCOW" 8
.IX Xref "SvIsCOW"
.IX Item "SvIsCOW"
Returns a boolean indicating whether the \s-1SV\s0 is Copy-On-Write (either shared
hash key scalars, or full Copy On Write scalars if 5.9.0 is configured for
\&\s-1COW\s0).
.Sp
.Vb 1
\&        bool    SvIsCOW(SV* sv)
.Ve
.IP "SvIsCOW_shared_hash" 8
.IX Xref "SvIsCOW_shared_hash"
.IX Item "SvIsCOW_shared_hash"
Returns a boolean indicating whether the \s-1SV\s0 is Copy-On-Write shared hash key
scalar.
.Sp
.Vb 1
\&        bool    SvIsCOW_shared_hash(SV* sv)
.Ve
.IP "SvIV" 8
.IX Xref "SvIV"
.IX Item "SvIV"
Coerces the given \s-1SV\s0 to an integer and returns it.  See \f(CW\*(C`SvIVx\*(C'\fR for a
version which guarantees to evaluate sv only once.
.Sp
.Vb 1
\&        IV      SvIV(SV* sv)
.Ve
.IP "SvIVX" 8
.IX Xref "SvIVX"
.IX Item "SvIVX"
Returns the raw value in the \s-1SV\s0's \s-1IV\s0 slot, without checks or conversions.
Only use when you are sure SvIOK is true.  See also \f(CW\*(C`SvIV()\*(C'\fR.
.Sp
.Vb 1
\&        IV      SvIVX(SV* sv)
.Ve
.IP "SvIVx" 8
.IX Xref "SvIVx"
.IX Item "SvIVx"
Coerces the given \s-1SV\s0 to an integer and returns it.
Guarantees to evaluate \f(CW\*(C`sv\*(C'\fR only once.  Only use
this if \f(CW\*(C`sv\*(C'\fR is an expression with side effects,
otherwise use the more efficient \f(CW\*(C`SvIV\*(C'\fR.
.Sp
.Vb 1
\&        IV      SvIVx(SV* sv)
.Ve
.IP "SvIV_nomg" 8
.IX Xref "SvIV_nomg"
.IX Item "SvIV_nomg"
Like \f(CW\*(C`SvIV\*(C'\fR but doesn't process magic.
.Sp
.Vb 1
\&        IV      SvIV_nomg(SV* sv)
.Ve
.IP "SvIV_set" 8
.IX Xref "SvIV_set"
.IX Item "SvIV_set"
Set the value of the \s-1IV\s0 pointer in sv to val.  It is possible to perform
the same function of this macro with an lvalue assignment to \f(CW\*(C`SvIVX\*(C'\fR.
With future Perls, however, it will be more efficient to use 
\&\f(CW\*(C`SvIV_set\*(C'\fR instead of the lvalue assignment to \f(CW\*(C`SvIVX\*(C'\fR.
.Sp
.Vb 1
\&        void    SvIV_set(SV* sv, IV val)
.Ve
.IP "SvLEN" 8
.IX Xref "SvLEN"
.IX Item "SvLEN"
Returns the size of the string buffer in the \s-1SV\s0, not including any part
attributable to \f(CW\*(C`SvOOK\*(C'\fR.  See \f(CW\*(C`SvCUR\*(C'\fR.
.Sp
.Vb 1
\&        STRLEN  SvLEN(SV* sv)
.Ve
.IP "SvLEN_set" 8
.IX Xref "SvLEN_set"
.IX Item "SvLEN_set"
Set the actual length of the string which is in the \s-1SV\s0.  See \f(CW\*(C`SvIV_set\*(C'\fR.
.Sp
.Vb 1
\&        void    SvLEN_set(SV* sv, STRLEN len)
.Ve
.IP "SvMAGIC_set" 8
.IX Xref "SvMAGIC_set"
.IX Item "SvMAGIC_set"
Set the value of the \s-1MAGIC\s0 pointer in sv to val.  See \f(CW\*(C`SvIV_set\*(C'\fR.
.Sp
.Vb 1
\&        void    SvMAGIC_set(SV* sv, MAGIC* val)
.Ve
.IP "SvNIOK" 8
.IX Xref "SvNIOK"
.IX Item "SvNIOK"
Returns a U32 value indicating whether the \s-1SV\s0 contains a number, integer or
double.
.Sp
.Vb 1
\&        U32     SvNIOK(SV* sv)
.Ve
.IP "SvNIOKp" 8
.IX Xref "SvNIOKp"
.IX Item "SvNIOKp"
Returns a U32 value indicating whether the \s-1SV\s0 contains a number, integer or
double.  Checks the \fBprivate\fR setting.  Use \f(CW\*(C`SvNIOK\*(C'\fR instead.
.Sp
.Vb 1
\&        U32     SvNIOKp(SV* sv)
.Ve
.IP "SvNIOK_off" 8
.IX Xref "SvNIOK_off"
.IX Item "SvNIOK_off"
Unsets the \s-1NV/IV\s0 status of an \s-1SV\s0.
.Sp
.Vb 1
\&        void    SvNIOK_off(SV* sv)
.Ve
.IP "SvNOK" 8
.IX Xref "SvNOK"
.IX Item "SvNOK"
Returns a U32 value indicating whether the \s-1SV\s0 contains a double.
.Sp
.Vb 1
\&        U32     SvNOK(SV* sv)
.Ve
.IP "SvNOKp" 8
.IX Xref "SvNOKp"
.IX Item "SvNOKp"
Returns a U32 value indicating whether the \s-1SV\s0 contains a double.  Checks the
\&\fBprivate\fR setting.  Use \f(CW\*(C`SvNOK\*(C'\fR instead.
.Sp
.Vb 1
\&        U32     SvNOKp(SV* sv)
.Ve
.IP "SvNOK_off" 8
.IX Xref "SvNOK_off"
.IX Item "SvNOK_off"
Unsets the \s-1NV\s0 status of an \s-1SV\s0.
.Sp
.Vb 1
\&        void    SvNOK_off(SV* sv)
.Ve
.IP "SvNOK_on" 8
.IX Xref "SvNOK_on"
.IX Item "SvNOK_on"
Tells an \s-1SV\s0 that it is a double.
.Sp
.Vb 1
\&        void    SvNOK_on(SV* sv)
.Ve
.IP "SvNOK_only" 8
.IX Xref "SvNOK_only"
.IX Item "SvNOK_only"
Tells an \s-1SV\s0 that it is a double and disables all other \s-1OK\s0 bits.
.Sp
.Vb 1
\&        void    SvNOK_only(SV* sv)
.Ve
.IP "SvNV" 8
.IX Xref "SvNV"
.IX Item "SvNV"
Coerce the given \s-1SV\s0 to a double and return it.  See \f(CW\*(C`SvNVx\*(C'\fR for a version
which guarantees to evaluate sv only once.
.Sp
.Vb 1
\&        NV      SvNV(SV* sv)
.Ve
.IP "SvNVX" 8
.IX Xref "SvNVX"
.IX Item "SvNVX"
Returns the raw value in the \s-1SV\s0's \s-1NV\s0 slot, without checks or conversions.
Only use when you are sure SvNOK is true.  See also \f(CW\*(C`SvNV()\*(C'\fR.
.Sp
.Vb 1
\&        NV      SvNVX(SV* sv)
.Ve
.IP "SvNVx" 8
.IX Xref "SvNVx"
.IX Item "SvNVx"
Coerces the given \s-1SV\s0 to a double and returns it.
Guarantees to evaluate \f(CW\*(C`sv\*(C'\fR only once.  Only use
this if \f(CW\*(C`sv\*(C'\fR is an expression with side effects,
otherwise use the more efficient \f(CW\*(C`SvNV\*(C'\fR.
.Sp
.Vb 1
\&        NV      SvNVx(SV* sv)
.Ve
.IP "SvNV_nomg" 8
.IX Xref "SvNV_nomg"
.IX Item "SvNV_nomg"
Like \f(CW\*(C`SvNV\*(C'\fR but doesn't process magic.
.Sp
.Vb 1
\&        NV      SvNV_nomg(SV* sv)
.Ve
.IP "SvNV_set" 8
.IX Xref "SvNV_set"
.IX Item "SvNV_set"
Set the value of the \s-1NV\s0 pointer in sv to val.  See \f(CW\*(C`SvIV_set\*(C'\fR.
.Sp
.Vb 1
\&        void    SvNV_set(SV* sv, NV val)
.Ve
.IP "SvOK" 8
.IX Xref "SvOK"
.IX Item "SvOK"
Returns a U32 value indicating whether the value is defined. This is
only meaningful for scalars.
.Sp
.Vb 1
\&        U32     SvOK(SV* sv)
.Ve
.IP "SvOOK" 8
.IX Xref "SvOOK"
.IX Item "SvOOK"
Returns a U32 indicating whether the pointer to the string buffer is offset.
This hack is used internally to speed up removal of characters from the
beginning of a SvPV.  When SvOOK is true, then the start of the
allocated string buffer is actually \f(CW\*(C`SvOOK_offset()\*(C'\fR bytes before SvPVX.
This offset used to be stored in SvIVX, but is now stored within the spare
part of the buffer.
.Sp
.Vb 1
\&        U32     SvOOK(SV* sv)
.Ve
.IP "SvOOK_offset" 8
.IX Xref "SvOOK_offset"
.IX Item "SvOOK_offset"
Reads into \fIlen\fR the offset from SvPVX back to the true start of the
allocated buffer, which will be non-zero if \f(CW\*(C`sv_chop\*(C'\fR has been used to
efficiently remove characters from start of the buffer.  Implemented as a
macro, which takes the address of \fIlen\fR, which must be of type \f(CW\*(C`STRLEN\*(C'\fR.
Evaluates \fIsv\fR more than once.  Sets \fIlen\fR to 0 if \f(CW\*(C`SvOOK(sv)\*(C'\fR is false.
.Sp
.Vb 1
\&        void    SvOOK_offset(NN SV*sv, STRLEN len)
.Ve
.IP "SvPOK" 8
.IX Xref "SvPOK"
.IX Item "SvPOK"
Returns a U32 value indicating whether the \s-1SV\s0 contains a character
string.
.Sp
.Vb 1
\&        U32     SvPOK(SV* sv)
.Ve
.IP "SvPOKp" 8
.IX Xref "SvPOKp"
.IX Item "SvPOKp"
Returns a U32 value indicating whether the \s-1SV\s0 contains a character string.
Checks the \fBprivate\fR setting.  Use \f(CW\*(C`SvPOK\*(C'\fR instead.
.Sp
.Vb 1
\&        U32     SvPOKp(SV* sv)
.Ve
.IP "SvPOK_off" 8
.IX Xref "SvPOK_off"
.IX Item "SvPOK_off"
Unsets the \s-1PV\s0 status of an \s-1SV\s0.
.Sp
.Vb 1
\&        void    SvPOK_off(SV* sv)
.Ve
.IP "SvPOK_on" 8
.IX Xref "SvPOK_on"
.IX Item "SvPOK_on"
Tells an \s-1SV\s0 that it is a string.
.Sp
.Vb 1
\&        void    SvPOK_on(SV* sv)
.Ve
.IP "SvPOK_only" 8
.IX Xref "SvPOK_only"
.IX Item "SvPOK_only"
Tells an \s-1SV\s0 that it is a string and disables all other \s-1OK\s0 bits.
Will also turn off the \s-1UTF\-8\s0 status.
.Sp
.Vb 1
\&        void    SvPOK_only(SV* sv)
.Ve
.IP "SvPOK_only_UTF8" 8
.IX Xref "SvPOK_only_UTF8"
.IX Item "SvPOK_only_UTF8"
Tells an \s-1SV\s0 that it is a string and disables all other \s-1OK\s0 bits,
and leaves the \s-1UTF\-8\s0 status as it was.
.Sp
.Vb 1
\&        void    SvPOK_only_UTF8(SV* sv)
.Ve
.IP "SvPV" 8
.IX Xref "SvPV"
.IX Item "SvPV"
Returns a pointer to the string in the \s-1SV\s0, or a stringified form of
the \s-1SV\s0 if the \s-1SV\s0 does not contain a string.  The \s-1SV\s0 may cache the
stringified version becoming \f(CW\*(C`SvPOK\*(C'\fR.  Handles 'get' magic.  See also
\&\f(CW\*(C`SvPVx\*(C'\fR for a version which guarantees to evaluate sv only once.
.Sp
.Vb 1
\&        char*   SvPV(SV* sv, STRLEN len)
.Ve
.IP "SvPVbyte" 8
.IX Xref "SvPVbyte"
.IX Item "SvPVbyte"
Like \f(CW\*(C`SvPV\*(C'\fR, but converts sv to byte representation first if necessary.
.Sp
.Vb 1
\&        char*   SvPVbyte(SV* sv, STRLEN len)
.Ve
.IP "SvPVbytex" 8
.IX Xref "SvPVbytex"
.IX Item "SvPVbytex"
Like \f(CW\*(C`SvPV\*(C'\fR, but converts sv to byte representation first if necessary.
Guarantees to evaluate sv only once; use the more efficient \f(CW\*(C`SvPVbyte\*(C'\fR
otherwise.
.Sp
.Vb 1
\&        char*   SvPVbytex(SV* sv, STRLEN len)
.Ve
.IP "SvPVbytex_force" 8
.IX Xref "SvPVbytex_force"
.IX Item "SvPVbytex_force"
Like \f(CW\*(C`SvPV_force\*(C'\fR, but converts sv to byte representation first if necessary.
Guarantees to evaluate sv only once; use the more efficient \f(CW\*(C`SvPVbyte_force\*(C'\fR
otherwise.
.Sp
.Vb 1
\&        char*   SvPVbytex_force(SV* sv, STRLEN len)
.Ve
.IP "SvPVbyte_force" 8
.IX Xref "SvPVbyte_force"
.IX Item "SvPVbyte_force"
Like \f(CW\*(C`SvPV_force\*(C'\fR, but converts sv to byte representation first if necessary.
.Sp
.Vb 1
\&        char*   SvPVbyte_force(SV* sv, STRLEN len)
.Ve
.IP "SvPVbyte_nolen" 8
.IX Xref "SvPVbyte_nolen"
.IX Item "SvPVbyte_nolen"
Like \f(CW\*(C`SvPV_nolen\*(C'\fR, but converts sv to byte representation first if necessary.
.Sp
.Vb 1
\&        char*   SvPVbyte_nolen(SV* sv)
.Ve
.IP "SvPVutf8" 8
.IX Xref "SvPVutf8"
.IX Item "SvPVutf8"
Like \f(CW\*(C`SvPV\*(C'\fR, but converts sv to utf8 first if necessary.
.Sp
.Vb 1
\&        char*   SvPVutf8(SV* sv, STRLEN len)
.Ve
.IP "SvPVutf8x" 8
.IX Xref "SvPVutf8x"
.IX Item "SvPVutf8x"
Like \f(CW\*(C`SvPV\*(C'\fR, but converts sv to utf8 first if necessary.
Guarantees to evaluate sv only once; use the more efficient \f(CW\*(C`SvPVutf8\*(C'\fR
otherwise.
.Sp
.Vb 1
\&        char*   SvPVutf8x(SV* sv, STRLEN len)
.Ve
.IP "SvPVutf8x_force" 8
.IX Xref "SvPVutf8x_force"
.IX Item "SvPVutf8x_force"
Like \f(CW\*(C`SvPV_force\*(C'\fR, but converts sv to utf8 first if necessary.
Guarantees to evaluate sv only once; use the more efficient \f(CW\*(C`SvPVutf8_force\*(C'\fR
otherwise.
.Sp
.Vb 1
\&        char*   SvPVutf8x_force(SV* sv, STRLEN len)
.Ve
.IP "SvPVutf8_force" 8
.IX Xref "SvPVutf8_force"
.IX Item "SvPVutf8_force"
Like \f(CW\*(C`SvPV_force\*(C'\fR, but converts sv to utf8 first if necessary.
.Sp
.Vb 1
\&        char*   SvPVutf8_force(SV* sv, STRLEN len)
.Ve
.IP "SvPVutf8_nolen" 8
.IX Xref "SvPVutf8_nolen"
.IX Item "SvPVutf8_nolen"
Like \f(CW\*(C`SvPV_nolen\*(C'\fR, but converts sv to utf8 first if necessary.
.Sp
.Vb 1
\&        char*   SvPVutf8_nolen(SV* sv)
.Ve
.IP "SvPVX" 8
.IX Xref "SvPVX"
.IX Item "SvPVX"
Returns a pointer to the physical string in the \s-1SV\s0.  The \s-1SV\s0 must contain a
string.
.Sp
This is also used to store the name of an autoloaded subroutine in an \s-1XS\s0
\&\s-1AUTOLOAD\s0 routine.  See \*(L"Autoloading with XSUBs\*(R" in perlguts.
.Sp
.Vb 1
\&        char*   SvPVX(SV* sv)
.Ve
.IP "SvPVx" 8
.IX Xref "SvPVx"
.IX Item "SvPVx"
A version of \f(CW\*(C`SvPV\*(C'\fR which guarantees to evaluate \f(CW\*(C`sv\*(C'\fR only once.
Only use this if \f(CW\*(C`sv\*(C'\fR is an expression with side effects, otherwise use the
more efficient \f(CW\*(C`SvPV\*(C'\fR.
.Sp
.Vb 1
\&        char*   SvPVx(SV* sv, STRLEN len)
.Ve
.IP "SvPV_force" 8
.IX Xref "SvPV_force"
.IX Item "SvPV_force"
Like \f(CW\*(C`SvPV\*(C'\fR but will force the \s-1SV\s0 into containing just a string
(\f(CW\*(C`SvPOK_only\*(C'\fR).  You want force if you are going to update the \f(CW\*(C`SvPVX\*(C'\fR
directly.
.Sp
.Vb 1
\&        char*   SvPV_force(SV* sv, STRLEN len)
.Ve
.IP "SvPV_force_nomg" 8
.IX Xref "SvPV_force_nomg"
.IX Item "SvPV_force_nomg"
Like \f(CW\*(C`SvPV\*(C'\fR but will force the \s-1SV\s0 into containing just a string
(\f(CW\*(C`SvPOK_only\*(C'\fR).  You want force if you are going to update the \f(CW\*(C`SvPVX\*(C'\fR
directly.  Doesn't process magic.
.Sp
.Vb 1
\&        char*   SvPV_force_nomg(SV* sv, STRLEN len)
.Ve
.IP "SvPV_nolen" 8
.IX Xref "SvPV_nolen"
.IX Item "SvPV_nolen"
Returns a pointer to the string in the \s-1SV\s0, or a stringified form of
the \s-1SV\s0 if the \s-1SV\s0 does not contain a string.  The \s-1SV\s0 may cache the
stringified form becoming \f(CW\*(C`SvPOK\*(C'\fR.  Handles 'get' magic.
.Sp
.Vb 1
\&        char*   SvPV_nolen(SV* sv)
.Ve
.IP "SvPV_nomg" 8
.IX Xref "SvPV_nomg"
.IX Item "SvPV_nomg"
Like \f(CW\*(C`SvPV\*(C'\fR but doesn't process magic.
.Sp
.Vb 1
\&        char*   SvPV_nomg(SV* sv, STRLEN len)
.Ve
.IP "SvPV_nomg_nolen" 8
.IX Xref "SvPV_nomg_nolen"
.IX Item "SvPV_nomg_nolen"
Like \f(CW\*(C`SvPV_nolen\*(C'\fR but doesn't process magic.
.Sp
.Vb 1
\&        char*   SvPV_nomg_nolen(SV* sv)
.Ve
.IP "SvPV_set" 8
.IX Xref "SvPV_set"
.IX Item "SvPV_set"
Set the value of the \s-1PV\s0 pointer in sv to val.  See \f(CW\*(C`SvIV_set\*(C'\fR.
.Sp
.Vb 1
\&        void    SvPV_set(SV* sv, char* val)
.Ve
.IP "SvREFCNT" 8
.IX Xref "SvREFCNT"
.IX Item "SvREFCNT"
Returns the value of the object's reference count.
.Sp
.Vb 1
\&        U32     SvREFCNT(SV* sv)
.Ve
.IP "SvREFCNT_dec" 8
.IX Xref "SvREFCNT_dec"
.IX Item "SvREFCNT_dec"
Decrements the reference count of the given \s-1SV\s0.
.Sp
.Vb 1
\&        void    SvREFCNT_dec(SV* sv)
.Ve
.IP "SvREFCNT_inc" 8
.IX Xref "SvREFCNT_inc"
.IX Item "SvREFCNT_inc"
Increments the reference count of the given \s-1SV\s0.
.Sp
All of the following SvREFCNT_inc* macros are optimized versions of
SvREFCNT_inc, and can be replaced with SvREFCNT_inc.
.Sp
.Vb 1
\&        SV*     SvREFCNT_inc(SV* sv)
.Ve
.IP "SvREFCNT_inc_NN" 8
.IX Xref "SvREFCNT_inc_NN"
.IX Item "SvREFCNT_inc_NN"
Same as SvREFCNT_inc, but can only be used if you know \fIsv\fR
is not \s-1NULL\s0.  Since we don't have to check the NULLness, it's faster
and smaller.
.Sp
.Vb 1
\&        SV*     SvREFCNT_inc_NN(SV* sv)
.Ve
.IP "SvREFCNT_inc_simple" 8
.IX Xref "SvREFCNT_inc_simple"
.IX Item "SvREFCNT_inc_simple"
Same as SvREFCNT_inc, but can only be used with expressions without side
effects.  Since we don't have to store a temporary value, it's faster.
.Sp
.Vb 1
\&        SV*     SvREFCNT_inc_simple(SV* sv)
.Ve
.IP "SvREFCNT_inc_simple_NN" 8
.IX Xref "SvREFCNT_inc_simple_NN"
.IX Item "SvREFCNT_inc_simple_NN"
Same as SvREFCNT_inc_simple, but can only be used if you know \fIsv\fR
is not \s-1NULL\s0.  Since we don't have to check the NULLness, it's faster
and smaller.
.Sp
.Vb 1
\&        SV*     SvREFCNT_inc_simple_NN(SV* sv)
.Ve
.IP "SvREFCNT_inc_simple_void" 8
.IX Xref "SvREFCNT_inc_simple_void"
.IX Item "SvREFCNT_inc_simple_void"
Same as SvREFCNT_inc_simple, but can only be used if you don't need the
return value.  The macro doesn't need to return a meaningful value.
.Sp
.Vb 1
\&        void    SvREFCNT_inc_simple_void(SV* sv)
.Ve
.IP "SvREFCNT_inc_simple_void_NN" 8
.IX Xref "SvREFCNT_inc_simple_void_NN"
.IX Item "SvREFCNT_inc_simple_void_NN"
Same as SvREFCNT_inc, but can only be used if you don't need the return
value, and you know that \fIsv\fR is not \s-1NULL\s0.  The macro doesn't need
to return a meaningful value, or check for NULLness, so it's smaller
and faster.
.Sp
.Vb 1
\&        void    SvREFCNT_inc_simple_void_NN(SV* sv)
.Ve
.IP "SvREFCNT_inc_void" 8
.IX Xref "SvREFCNT_inc_void"
.IX Item "SvREFCNT_inc_void"
Same as SvREFCNT_inc, but can only be used if you don't need the
return value.  The macro doesn't need to return a meaningful value.
.Sp
.Vb 1
\&        void    SvREFCNT_inc_void(SV* sv)
.Ve
.IP "SvREFCNT_inc_void_NN" 8
.IX Xref "SvREFCNT_inc_void_NN"
.IX Item "SvREFCNT_inc_void_NN"
Same as SvREFCNT_inc, but can only be used if you don't need the return
value, and you know that \fIsv\fR is not \s-1NULL\s0.  The macro doesn't need
to return a meaningful value, or check for NULLness, so it's smaller
and faster.
.Sp
.Vb 1
\&        void    SvREFCNT_inc_void_NN(SV* sv)
.Ve
.IP "SvROK" 8
.IX Xref "SvROK"
.IX Item "SvROK"
Tests if the \s-1SV\s0 is an \s-1RV\s0.
.Sp
.Vb 1
\&        U32     SvROK(SV* sv)
.Ve
.IP "SvROK_off" 8
.IX Xref "SvROK_off"
.IX Item "SvROK_off"
Unsets the \s-1RV\s0 status of an \s-1SV\s0.
.Sp
.Vb 1
\&        void    SvROK_off(SV* sv)
.Ve
.IP "SvROK_on" 8
.IX Xref "SvROK_on"
.IX Item "SvROK_on"
Tells an \s-1SV\s0 that it is an \s-1RV\s0.
.Sp
.Vb 1
\&        void    SvROK_on(SV* sv)
.Ve
.IP "SvRV" 8
.IX Xref "SvRV"
.IX Item "SvRV"
Dereferences an \s-1RV\s0 to return the \s-1SV\s0.
.Sp
.Vb 1
\&        SV*     SvRV(SV* sv)
.Ve
.IP "SvRV_set" 8
.IX Xref "SvRV_set"
.IX Item "SvRV_set"
Set the value of the \s-1RV\s0 pointer in sv to val.  See \f(CW\*(C`SvIV_set\*(C'\fR.
.Sp
.Vb 1
\&        void    SvRV_set(SV* sv, SV* val)
.Ve
.IP "SvSTASH" 8
.IX Xref "SvSTASH"
.IX Item "SvSTASH"
Returns the stash of the \s-1SV\s0.
.Sp
.Vb 1
\&        HV*     SvSTASH(SV* sv)
.Ve
.IP "SvSTASH_set" 8
.IX Xref "SvSTASH_set"
.IX Item "SvSTASH_set"
Set the value of the \s-1STASH\s0 pointer in sv to val.  See \f(CW\*(C`SvIV_set\*(C'\fR.
.Sp
.Vb 1
\&        void    SvSTASH_set(SV* sv, HV* val)
.Ve
.IP "SvTAINT" 8
.IX Xref "SvTAINT"
.IX Item "SvTAINT"
Taints an \s-1SV\s0 if tainting is enabled, and if some input to the current
expression is tainted\*(--usually a variable, but possibly also implicit
inputs such as locale settings.  \f(CW\*(C`SvTAINT\*(C'\fR propagates that taintedness to
the outputs of an expression in a pessimistic fashion; i.e., without paying
attention to precisely which outputs are influenced by which inputs.
.Sp
.Vb 1
\&        void    SvTAINT(SV* sv)
.Ve
.IP "SvTAINTED" 8
.IX Xref "SvTAINTED"
.IX Item "SvTAINTED"
Checks to see if an \s-1SV\s0 is tainted.  Returns \s-1TRUE\s0 if it is, \s-1FALSE\s0 if
not.
.Sp
.Vb 1
\&        bool    SvTAINTED(SV* sv)
.Ve
.IP "SvTAINTED_off" 8
.IX Xref "SvTAINTED_off"
.IX Item "SvTAINTED_off"
Untaints an \s-1SV\s0.  Be \fIvery\fR careful with this routine, as it short-circuits
some of Perl's fundamental security features.  \s-1XS\s0 module authors should not
use this function unless they fully understand all the implications of
unconditionally untainting the value. Untainting should be done in the
standard perl fashion, via a carefully crafted regexp, rather than directly
untainting variables.
.Sp
.Vb 1
\&        void    SvTAINTED_off(SV* sv)
.Ve
.IP "SvTAINTED_on" 8
.IX Xref "SvTAINTED_on"
.IX Item "SvTAINTED_on"
Marks an \s-1SV\s0 as tainted if tainting is enabled.
.Sp
.Vb 1
\&        void    SvTAINTED_on(SV* sv)
.Ve
.IP "SvTRUE" 8
.IX Xref "SvTRUE"
.IX Item "SvTRUE"
Returns a boolean indicating whether Perl would evaluate the \s-1SV\s0 as true or
false.  See \fISvOK()\fR for a defined/undefined test.  Handles 'get' magic
unless the scalar is already SvPOK, SvIOK or SvNOK (the public, not the
private flags).
.Sp
.Vb 1
\&        bool    SvTRUE(SV* sv)
.Ve
.IP "SvTRUE_nomg" 8
.IX Xref "SvTRUE_nomg"
.IX Item "SvTRUE_nomg"
Returns a boolean indicating whether Perl would evaluate the \s-1SV\s0 as true or
false.  See \fISvOK()\fR for a defined/undefined test.  Does not handle 'get' magic.
.Sp
.Vb 1
\&        bool    SvTRUE_nomg(SV* sv)
.Ve
.IP "SvTYPE" 8
.IX Xref "SvTYPE"
.IX Item "SvTYPE"
Returns the type of the \s-1SV\s0.  See \f(CW\*(C`svtype\*(C'\fR.
.Sp
.Vb 1
\&        svtype  SvTYPE(SV* sv)
.Ve
.IP "SvUOK" 8
.IX Xref "SvUOK"
.IX Item "SvUOK"
Returns a boolean indicating whether the \s-1SV\s0 contains an unsigned integer.
.Sp
.Vb 1
\&        bool    SvUOK(SV* sv)
.Ve
.IP "SvUPGRADE" 8
.IX Xref "SvUPGRADE"
.IX Item "SvUPGRADE"
Used to upgrade an \s-1SV\s0 to a more complex form.  Uses \f(CW\*(C`sv_upgrade\*(C'\fR to
perform the upgrade if necessary.  See \f(CW\*(C`svtype\*(C'\fR.
.Sp
.Vb 1
\&        void    SvUPGRADE(SV* sv, svtype type)
.Ve
.IP "SvUTF8" 8
.IX Xref "SvUTF8"
.IX Item "SvUTF8"
Returns a U32 value indicating the \s-1UTF\-8\s0 status of an \s-1SV\s0.  If things are set-up
properly, this indicates whether or not the \s-1SV\s0 contains \s-1UTF\-8\s0 encoded data.
Call this after \fISvPV()\fR in case any call to string overloading updates the
internal flag.
.Sp
.Vb 1
\&        U32     SvUTF8(SV* sv)
.Ve
.IP "SvUTF8_off" 8
.IX Xref "SvUTF8_off"
.IX Item "SvUTF8_off"
Unsets the \s-1UTF\-8\s0 status of an \s-1SV\s0 (the data is not changed, just the flag).
Do not use frivolously.
.Sp
.Vb 1
\&        void    SvUTF8_off(SV *sv)
.Ve
.IP "SvUTF8_on" 8
.IX Xref "SvUTF8_on"
.IX Item "SvUTF8_on"
Turn on the \s-1UTF\-8\s0 status of an \s-1SV\s0 (the data is not changed, just the flag).
Do not use frivolously.
.Sp
.Vb 1
\&        void    SvUTF8_on(SV *sv)
.Ve
.IP "SvUV" 8
.IX Xref "SvUV"
.IX Item "SvUV"
Coerces the given \s-1SV\s0 to an unsigned integer and returns it.  See \f(CW\*(C`SvUVx\*(C'\fR
for a version which guarantees to evaluate sv only once.
.Sp
.Vb 1
\&        UV      SvUV(SV* sv)
.Ve
.IP "SvUVX" 8
.IX Xref "SvUVX"
.IX Item "SvUVX"
Returns the raw value in the \s-1SV\s0's \s-1UV\s0 slot, without checks or conversions.
Only use when you are sure SvIOK is true.  See also \f(CW\*(C`SvUV()\*(C'\fR.
.Sp
.Vb 1
\&        UV      SvUVX(SV* sv)
.Ve
.IP "SvUVx" 8
.IX Xref "SvUVx"
.IX Item "SvUVx"
Coerces the given \s-1SV\s0 to an unsigned integer and
returns it.  Guarantees to \f(CW\*(C`sv\*(C'\fR only once.  Only
use this if \f(CW\*(C`sv\*(C'\fR is an expression with side effects,
otherwise use the more efficient \f(CW\*(C`SvUV\*(C'\fR.
.Sp
.Vb 1
\&        UV      SvUVx(SV* sv)
.Ve
.IP "SvUV_nomg" 8
.IX Xref "SvUV_nomg"
.IX Item "SvUV_nomg"
Like \f(CW\*(C`SvUV\*(C'\fR but doesn't process magic.
.Sp
.Vb 1
\&        UV      SvUV_nomg(SV* sv)
.Ve
.IP "SvUV_set" 8
.IX Xref "SvUV_set"
.IX Item "SvUV_set"
Set the value of the \s-1UV\s0 pointer in sv to val.  See \f(CW\*(C`SvIV_set\*(C'\fR.
.Sp
.Vb 1
\&        void    SvUV_set(SV* sv, UV val)
.Ve
.IP "SvVOK" 8
.IX Xref "SvVOK"
.IX Item "SvVOK"
Returns a boolean indicating whether the \s-1SV\s0 contains a v\-string.
.Sp
.Vb 1
\&        bool    SvVOK(SV* sv)
.Ve
.IP "sv_catpvn_nomg" 8
.IX Xref "sv_catpvn_nomg"
.IX Item "sv_catpvn_nomg"
Like \f(CW\*(C`sv_catpvn\*(C'\fR but doesn't process magic.
.Sp
.Vb 2
\&        void    sv_catpvn_nomg(SV* sv, const char* ptr,
\&                               STRLEN len)
.Ve
.IP "sv_catpv_nomg" 8
.IX Xref "sv_catpv_nomg"
.IX Item "sv_catpv_nomg"
Like \f(CW\*(C`sv_catpv\*(C'\fR but doesn't process magic.
.Sp
.Vb 1
\&        void    sv_catpv_nomg(SV* sv, const char* ptr)
.Ve
.IP "sv_catsv_nomg" 8
.IX Xref "sv_catsv_nomg"
.IX Item "sv_catsv_nomg"
Like \f(CW\*(C`sv_catsv\*(C'\fR but doesn't process magic.
.Sp
.Vb 1
\&        void    sv_catsv_nomg(SV* dsv, SV* ssv)
.Ve
.IP "sv_derived_from" 8
.IX Xref "sv_derived_from"
.IX Item "sv_derived_from"
Exactly like \*(L"sv_derived_from_pv\*(R", but doesn't take a \f(CW\*(C`flags\*(C'\fR parameter.
.Sp
.Vb 1
\&        bool    sv_derived_from(SV* sv, const char *const name)
.Ve
.IP "sv_derived_from_pv" 8
.IX Xref "sv_derived_from_pv"
.IX Item "sv_derived_from_pv"
Exactly like \*(L"sv_derived_from_pvn\*(R", but takes a nul-terminated string 
instead of a string/length pair.
.Sp
.Vb 3
\&        bool    sv_derived_from_pv(SV* sv,
\&                                   const char *const name,
\&                                   U32 flags)
.Ve
.IP "sv_derived_from_pvn" 8
.IX Xref "sv_derived_from_pvn"
.IX Item "sv_derived_from_pvn"
Returns a boolean indicating whether the \s-1SV\s0 is derived from the specified class
\&\fIat the C level\fR.  To check derivation at the Perl level, call \f(CW\*(C`isa()\*(C'\fR as a
normal Perl method.
.Sp
Currently, the only significant value for \f(CW\*(C`flags\*(C'\fR is SVf_UTF8.
.Sp
.Vb 3
\&        bool    sv_derived_from_pvn(SV* sv,
\&                                    const char *const name,
\&                                    const STRLEN len, U32 flags)
.Ve
.IP "sv_derived_from_sv" 8
.IX Xref "sv_derived_from_sv"
.IX Item "sv_derived_from_sv"
Exactly like \*(L"sv_derived_from_pvn\*(R", but takes the name string in the form
of an \s-1SV\s0 instead of a string/length pair.
.Sp
.Vb 2
\&        bool    sv_derived_from_sv(SV* sv, SV *namesv,
\&                                   U32 flags)
.Ve
.IP "sv_does" 8
.IX Xref "sv_does"
.IX Item "sv_does"
Like \*(L"sv_does_pv\*(R", but doesn't take a \f(CW\*(C`flags\*(C'\fR parameter.
.Sp
.Vb 1
\&        bool    sv_does(SV* sv, const char *const name)
.Ve
.IP "sv_does_pv" 8
.IX Xref "sv_does_pv"
.IX Item "sv_does_pv"
Like \*(L"sv_does_sv\*(R", but takes a nul-terminated string instead of an \s-1SV\s0.
.Sp
.Vb 2
\&        bool    sv_does_pv(SV* sv, const char *const name,
\&                           U32 flags)
.Ve
.IP "sv_does_pvn" 8
.IX Xref "sv_does_pvn"
.IX Item "sv_does_pvn"
Like \*(L"sv_does_sv\*(R", but takes a string/length pair instead of an \s-1SV\s0.
.Sp
.Vb 2
\&        bool    sv_does_pvn(SV* sv, const char *const name,
\&                            const STRLEN len, U32 flags)
.Ve
.IP "sv_does_sv" 8
.IX Xref "sv_does_sv"
.IX Item "sv_does_sv"
Returns a boolean indicating whether the \s-1SV\s0 performs a specific, named role.
The \s-1SV\s0 can be a Perl object or the name of a Perl class.
.Sp
.Vb 1
\&        bool    sv_does_sv(SV* sv, SV* namesv, U32 flags)
.Ve
.IP "sv_report_used" 8
.IX Xref "sv_report_used"
.IX Item "sv_report_used"
Dump the contents of all SVs not yet freed (debugging aid).
.Sp
.Vb 1
\&        void    sv_report_used()
.Ve
.IP "sv_setsv_nomg" 8
.IX Xref "sv_setsv_nomg"
.IX Item "sv_setsv_nomg"
Like \f(CW\*(C`sv_setsv\*(C'\fR but doesn't process magic.
.Sp
.Vb 1
\&        void    sv_setsv_nomg(SV* dsv, SV* ssv)
.Ve
.IP "sv_utf8_upgrade_nomg" 8
.IX Xref "sv_utf8_upgrade_nomg"
.IX Item "sv_utf8_upgrade_nomg"
Like sv_utf8_upgrade, but doesn't do magic on \f(CW\*(C`sv\*(C'\fR.
.Sp
.Vb 1
\&        STRLEN  sv_utf8_upgrade_nomg(NN SV *sv)
.Ve
.SH "SV-Body Allocation"
.IX Header "SV-Body Allocation"
.IP "looks_like_number" 8
.IX Xref "looks_like_number"
.IX Item "looks_like_number"
Test if the content of an \s-1SV\s0 looks like a number (or is a number).
\&\f(CW\*(C`Inf\*(C'\fR and \f(CW\*(C`Infinity\*(C'\fR are treated as numbers (so will not issue a
non-numeric warning), even if your \fIatof()\fR doesn't grok them.  Get-magic is
ignored.
.Sp
.Vb 1
\&        I32     looks_like_number(SV *const sv)
.Ve
.IP "newRV_noinc" 8
.IX Xref "newRV_noinc"
.IX Item "newRV_noinc"
Creates an \s-1RV\s0 wrapper for an \s-1SV\s0.  The reference count for the original
\&\s-1SV\s0 is \fBnot\fR incremented.
.Sp
.Vb 1
\&        SV*     newRV_noinc(SV *const sv)
.Ve
.IP "newSV" 8
.IX Xref "newSV"
.IX Item "newSV"
Creates a new \s-1SV\s0.  A non-zero \f(CW\*(C`len\*(C'\fR parameter indicates the number of
bytes of preallocated string space the \s-1SV\s0 should have.  An extra byte for a
trailing \s-1NUL\s0 is also reserved.  (SvPOK is not set for the \s-1SV\s0 even if string
space is allocated.)  The reference count for the new \s-1SV\s0 is set to 1.
.Sp
In 5.9.3, \fInewSV()\fR replaces the older \s-1\fINEWSV\s0()\fR \s-1API\s0, and drops the first
parameter, \fIx\fR, a debug aid which allowed callers to identify themselves.
This aid has been superseded by a new build option, \s-1PERL_MEM_LOG\s0 (see
\&\*(L"\s-1PERL_MEM_LOG\s0\*(R" in perlhacktips).  The older \s-1API\s0 is still there for use in \s-1XS\s0
modules supporting older perls.
.Sp
.Vb 1
\&        SV*     newSV(const STRLEN len)
.Ve
.IP "newSVhek" 8
.IX Xref "newSVhek"
.IX Item "newSVhek"
Creates a new \s-1SV\s0 from the hash key structure.  It will generate scalars that
point to the shared string table where possible.  Returns a new (undefined)
\&\s-1SV\s0 if the hek is \s-1NULL\s0.
.Sp
.Vb 1
\&        SV*     newSVhek(const HEK *const hek)
.Ve
.IP "newSViv" 8
.IX Xref "newSViv"
.IX Item "newSViv"
Creates a new \s-1SV\s0 and copies an integer into it.  The reference count for the
\&\s-1SV\s0 is set to 1.
.Sp
.Vb 1
\&        SV*     newSViv(const IV i)
.Ve
.IP "newSVnv" 8
.IX Xref "newSVnv"
.IX Item "newSVnv"
Creates a new \s-1SV\s0 and copies a floating point value into it.
The reference count for the \s-1SV\s0 is set to 1.
.Sp
.Vb 1
\&        SV*     newSVnv(const NV n)
.Ve
.IP "newSVpv" 8
.IX Xref "newSVpv"
.IX Item "newSVpv"
Creates a new \s-1SV\s0 and copies a string into it.  The reference count for the
\&\s-1SV\s0 is set to 1.  If \f(CW\*(C`len\*(C'\fR is zero, Perl will compute the length using
\&\fIstrlen()\fR.  For efficiency, consider using \f(CW\*(C`newSVpvn\*(C'\fR instead.
.Sp
.Vb 1
\&        SV*     newSVpv(const char *const s, const STRLEN len)
.Ve
.IP "newSVpvf" 8
.IX Xref "newSVpvf"
.IX Item "newSVpvf"
Creates a new \s-1SV\s0 and initializes it with the string formatted like
\&\f(CW\*(C`sprintf\*(C'\fR.
.Sp
.Vb 1
\&        SV*     newSVpvf(const char *const pat, ...)
.Ve
.IP "newSVpvn" 8
.IX Xref "newSVpvn"
.IX Item "newSVpvn"
Creates a new \s-1SV\s0 and copies a buffer into it, which may contain \s-1NUL\s0 characters
(\f(CW\*(C`\e0\*(C'\fR) and other binary data.  The reference count for the \s-1SV\s0 is set to 1.
Note that if \f(CW\*(C`len\*(C'\fR is zero, Perl will create a zero length (Perl) string.  You
are responsible for ensuring that the source buffer is at least
\&\f(CW\*(C`len\*(C'\fR bytes long.  If the \f(CW\*(C`buffer\*(C'\fR argument is \s-1NULL\s0 the new \s-1SV\s0 will be
undefined.
.Sp
.Vb 1
\&        SV*     newSVpvn(const char *const s, const STRLEN len)
.Ve
.IP "newSVpvn_flags" 8
.IX Xref "newSVpvn_flags"
.IX Item "newSVpvn_flags"
Creates a new \s-1SV\s0 and copies a string into it.  The reference count for the
\&\s-1SV\s0 is set to 1.  Note that if \f(CW\*(C`len\*(C'\fR is zero, Perl will create a zero length
string.  You are responsible for ensuring that the source string is at least
\&\f(CW\*(C`len\*(C'\fR bytes long.  If the \f(CW\*(C`s\*(C'\fR argument is \s-1NULL\s0 the new \s-1SV\s0 will be undefined.
Currently the only flag bits accepted are \f(CW\*(C`SVf_UTF8\*(C'\fR and \f(CW\*(C`SVs_TEMP\*(C'\fR.
If \f(CW\*(C`SVs_TEMP\*(C'\fR is set, then \f(CW\*(C`sv_2mortal()\*(C'\fR is called on the result before
returning.  If \f(CW\*(C`SVf_UTF8\*(C'\fR is set, \f(CW\*(C`s\*(C'\fR
is considered to be in \s-1UTF\-8\s0 and the
\&\f(CW\*(C`SVf_UTF8\*(C'\fR flag will be set on the new \s-1SV\s0.
\&\f(CW\*(C`newSVpvn_utf8()\*(C'\fR is a convenience wrapper for this function, defined as
.Sp
.Vb 2
\&    #define newSVpvn_utf8(s, len, u)                    \e
\&        newSVpvn_flags((s), (len), (u) ? SVf_UTF8 : 0)
\&
\&        SV*     newSVpvn_flags(const char *const s,
\&                               const STRLEN len,
\&                               const U32 flags)
.Ve
.IP "newSVpvn_share" 8
.IX Xref "newSVpvn_share"
.IX Item "newSVpvn_share"
Creates a new \s-1SV\s0 with its SvPVX_const pointing to a shared string in the string
table.  If the string does not already exist in the table, it is
created first.  Turns on \s-1READONLY\s0 and \s-1FAKE\s0.  If the \f(CW\*(C`hash\*(C'\fR parameter
is non-zero, that value is used; otherwise the hash is computed.
The string's hash can later be retrieved from the \s-1SV\s0
with the \f(CW\*(C`SvSHARED_HASH()\*(C'\fR macro.  The idea here is
that as the string table is used for shared hash keys these strings will have
SvPVX_const == HeKEY and hash lookup will avoid string compare.
.Sp
.Vb 1
\&        SV*     newSVpvn_share(const char* s, I32 len, U32 hash)
.Ve
.IP "newSVpvs" 8
.IX Xref "newSVpvs"
.IX Item "newSVpvs"
Like \f(CW\*(C`newSVpvn\*(C'\fR, but takes a literal string instead of a string/length pair.
.Sp
.Vb 1
\&        SV*     newSVpvs(const char* s)
.Ve
.IP "newSVpvs_flags" 8
.IX Xref "newSVpvs_flags"
.IX Item "newSVpvs_flags"
Like \f(CW\*(C`newSVpvn_flags\*(C'\fR, but takes a literal string instead of a string/length
pair.
.Sp
.Vb 1
\&        SV*     newSVpvs_flags(const char* s, U32 flags)
.Ve
.IP "newSVpvs_share" 8
.IX Xref "newSVpvs_share"
.IX Item "newSVpvs_share"
Like \f(CW\*(C`newSVpvn_share\*(C'\fR, but takes a literal string instead of a string/length
pair and omits the hash parameter.
.Sp
.Vb 1
\&        SV*     newSVpvs_share(const char* s)
.Ve
.IP "newSVpv_share" 8
.IX Xref "newSVpv_share"
.IX Item "newSVpv_share"
Like \f(CW\*(C`newSVpvn_share\*(C'\fR, but takes a nul-terminated string instead of a
string/length pair.
.Sp
.Vb 1
\&        SV*     newSVpv_share(const char* s, U32 hash)
.Ve
.IP "newSVrv" 8
.IX Xref "newSVrv"
.IX Item "newSVrv"
Creates a new \s-1SV\s0 for the \s-1RV\s0, \f(CW\*(C`rv\*(C'\fR, to point to.  If \f(CW\*(C`rv\*(C'\fR is not an \s-1RV\s0 then
it will be upgraded to one.  If \f(CW\*(C`classname\*(C'\fR is non-null then the new \s-1SV\s0 will
be blessed in the specified package.  The new \s-1SV\s0 is returned and its
reference count is 1.
.Sp
.Vb 2
\&        SV*     newSVrv(SV *const rv,
\&                        const char *const classname)
.Ve
.IP "newSVsv" 8
.IX Xref "newSVsv"
.IX Item "newSVsv"
Creates a new \s-1SV\s0 which is an exact duplicate of the original \s-1SV\s0.
(Uses \f(CW\*(C`sv_setsv\*(C'\fR.)
.Sp
.Vb 1
\&        SV*     newSVsv(SV *const old)
.Ve
.IP "newSVuv" 8
.IX Xref "newSVuv"
.IX Item "newSVuv"
Creates a new \s-1SV\s0 and copies an unsigned integer into it.
The reference count for the \s-1SV\s0 is set to 1.
.Sp
.Vb 1
\&        SV*     newSVuv(const UV u)
.Ve
.IP "newSV_type" 8
.IX Xref "newSV_type"
.IX Item "newSV_type"
Creates a new \s-1SV\s0, of the type specified.  The reference count for the new \s-1SV\s0
is set to 1.
.Sp
.Vb 1
\&        SV*     newSV_type(const svtype type)
.Ve
.IP "sv_2bool" 8
.IX Xref "sv_2bool"
.IX Item "sv_2bool"
This macro is only used by \fIsv_true()\fR or its macro equivalent, and only if
the latter's argument is neither SvPOK, SvIOK nor SvNOK.
It calls sv_2bool_flags with the \s-1SV_GMAGIC\s0 flag.
.Sp
.Vb 1
\&        bool    sv_2bool(SV *const sv)
.Ve
.IP "sv_2bool_flags" 8
.IX Xref "sv_2bool_flags"
.IX Item "sv_2bool_flags"
This function is only used by \fIsv_true()\fR and friends,  and only if
the latter's argument is neither SvPOK, SvIOK nor SvNOK.  If the flags
contain \s-1SV_GMAGIC\s0, then it does an \fImg_get()\fR first.
.Sp
.Vb 1
\&        bool    sv_2bool_flags(SV *const sv, const I32 flags)
.Ve
.IP "sv_2cv" 8
.IX Xref "sv_2cv"
.IX Item "sv_2cv"
Using various gambits, try to get a \s-1CV\s0 from an \s-1SV\s0; in addition, try if
possible to set \f(CW*st\fR and \f(CW*gvp\fR to the stash and \s-1GV\s0 associated with it.
The flags in \f(CW\*(C`lref\*(C'\fR are passed to gv_fetchsv.
.Sp
.Vb 2
\&        CV*     sv_2cv(SV* sv, HV **const st, GV **const gvp,
\&                       const I32 lref)
.Ve
.IP "sv_2io" 8
.IX Xref "sv_2io"
.IX Item "sv_2io"
Using various gambits, try to get an \s-1IO\s0 from an \s-1SV:\s0 the \s-1IO\s0 slot if its a
\&\s-1GV\s0; or the recursive result if we're an \s-1RV\s0; or the \s-1IO\s0 slot of the symbol
named after the \s-1PV\s0 if we're a string.
.Sp
\&'Get' magic is ignored on the sv passed in, but will be called on
\&\f(CW\*(C`SvRV(sv)\*(C'\fR if sv is an \s-1RV\s0.
.Sp
.Vb 1
\&        IO*     sv_2io(SV *const sv)
.Ve
.IP "sv_2iv_flags" 8
.IX Xref "sv_2iv_flags"
.IX Item "sv_2iv_flags"
Return the integer value of an \s-1SV\s0, doing any necessary string
conversion.  If flags includes \s-1SV_GMAGIC\s0, does an \fImg_get()\fR first.
Normally used via the \f(CW\*(C`SvIV(sv)\*(C'\fR and \f(CW\*(C`SvIVx(sv)\*(C'\fR macros.
.Sp
.Vb 1
\&        IV      sv_2iv_flags(SV *const sv, const I32 flags)
.Ve
.IP "sv_2mortal" 8
.IX Xref "sv_2mortal"
.IX Item "sv_2mortal"
Marks an existing \s-1SV\s0 as mortal.  The \s-1SV\s0 will be destroyed \*(L"soon\*(R", either
by an explicit call to \s-1FREETMPS\s0, or by an implicit call at places such as
statement boundaries.  \fISvTEMP()\fR is turned on which means that the \s-1SV\s0's
string buffer can be \*(L"stolen\*(R" if this \s-1SV\s0 is copied.  See also \f(CW\*(C`sv_newmortal\*(C'\fR
and \f(CW\*(C`sv_mortalcopy\*(C'\fR.
.Sp
.Vb 1
\&        SV*     sv_2mortal(SV *const sv)
.Ve
.IP "sv_2nv_flags" 8
.IX Xref "sv_2nv_flags"
.IX Item "sv_2nv_flags"
Return the num value of an \s-1SV\s0, doing any necessary string or integer
conversion.  If flags includes \s-1SV_GMAGIC\s0, does an \fImg_get()\fR first.
Normally used via the \f(CW\*(C`SvNV(sv)\*(C'\fR and \f(CW\*(C`SvNVx(sv)\*(C'\fR macros.
.Sp
.Vb 1
\&        NV      sv_2nv_flags(SV *const sv, const I32 flags)
.Ve
.IP "sv_2pvbyte" 8
.IX Xref "sv_2pvbyte"
.IX Item "sv_2pvbyte"
Return a pointer to the byte-encoded representation of the \s-1SV\s0, and set *lp
to its length.  May cause the \s-1SV\s0 to be downgraded from \s-1UTF\-8\s0 as a
side-effect.
.Sp
Usually accessed via the \f(CW\*(C`SvPVbyte\*(C'\fR macro.
.Sp
.Vb 1
\&        char*   sv_2pvbyte(SV *sv, STRLEN *const lp)
.Ve
.IP "sv_2pvutf8" 8
.IX Xref "sv_2pvutf8"
.IX Item "sv_2pvutf8"
Return a pointer to the UTF\-8\-encoded representation of the \s-1SV\s0, and set *lp
to its length.  May cause the \s-1SV\s0 to be upgraded to \s-1UTF\-8\s0 as a side-effect.
.Sp
Usually accessed via the \f(CW\*(C`SvPVutf8\*(C'\fR macro.
.Sp
.Vb 1
\&        char*   sv_2pvutf8(SV *sv, STRLEN *const lp)
.Ve
.IP "sv_2pv_flags" 8
.IX Xref "sv_2pv_flags"
.IX Item "sv_2pv_flags"
Returns a pointer to the string value of an \s-1SV\s0, and sets *lp to its length.
If flags includes \s-1SV_GMAGIC\s0, does an \fImg_get()\fR first.  Coerces sv to a
string if necessary.  Normally invoked via the \f(CW\*(C`SvPV_flags\*(C'\fR macro.
\&\f(CW\*(C`sv_2pv()\*(C'\fR and \f(CW\*(C`sv_2pv_nomg\*(C'\fR usually end up here too.
.Sp
.Vb 2
\&        char*   sv_2pv_flags(SV *const sv, STRLEN *const lp,
\&                             const I32 flags)
.Ve
.IP "sv_2uv_flags" 8
.IX Xref "sv_2uv_flags"
.IX Item "sv_2uv_flags"
Return the unsigned integer value of an \s-1SV\s0, doing any necessary string
conversion.  If flags includes \s-1SV_GMAGIC\s0, does an \fImg_get()\fR first.
Normally used via the \f(CW\*(C`SvUV(sv)\*(C'\fR and \f(CW\*(C`SvUVx(sv)\*(C'\fR macros.
.Sp
.Vb 1
\&        UV      sv_2uv_flags(SV *const sv, const I32 flags)
.Ve
.IP "sv_backoff" 8
.IX Xref "sv_backoff"
.IX Item "sv_backoff"
Remove any string offset.  You should normally use the \f(CW\*(C`SvOOK_off\*(C'\fR macro
wrapper instead.
.Sp
.Vb 1
\&        int     sv_backoff(SV *const sv)
.Ve
.IP "sv_bless" 8
.IX Xref "sv_bless"
.IX Item "sv_bless"
Blesses an \s-1SV\s0 into a specified package.  The \s-1SV\s0 must be an \s-1RV\s0.  The package
must be designated by its stash (see \f(CW\*(C`gv_stashpv()\*(C'\fR).  The reference count
of the \s-1SV\s0 is unaffected.
.Sp
.Vb 1
\&        SV*     sv_bless(SV *const sv, HV *const stash)
.Ve
.IP "sv_catpv" 8
.IX Xref "sv_catpv"
.IX Item "sv_catpv"
Concatenates the string onto the end of the string which is in the \s-1SV\s0.
If the \s-1SV\s0 has the \s-1UTF\-8\s0 status set, then the bytes appended should be
valid \s-1UTF\-8\s0.  Handles 'get' magic, but not 'set' magic.  See \f(CW\*(C`sv_catpv_mg\*(C'\fR.
.Sp
.Vb 1
\&        void    sv_catpv(SV *const sv, const char* ptr)
.Ve
.IP "sv_catpvf" 8
.IX Xref "sv_catpvf"
.IX Item "sv_catpvf"
Processes its arguments like \f(CW\*(C`sprintf\*(C'\fR and appends the formatted
output to an \s-1SV\s0.  If the appended data contains \*(L"wide\*(R" characters
(including, but not limited to, SVs with a \s-1UTF\-8\s0 \s-1PV\s0 formatted with \f(CW%s\fR,
and characters >255 formatted with \f(CW%c\fR), the original \s-1SV\s0 might get
upgraded to \s-1UTF\-8\s0.  Handles 'get' magic, but not 'set' magic.  See
\&\f(CW\*(C`sv_catpvf_mg\*(C'\fR.  If the original \s-1SV\s0 was \s-1UTF\-8\s0, the pattern should be
valid \s-1UTF\-8\s0; if the original \s-1SV\s0 was bytes, the pattern should be too.
.Sp
.Vb 2
\&        void    sv_catpvf(SV *const sv, const char *const pat,
\&                          ...)
.Ve
.IP "sv_catpvf_mg" 8
.IX Xref "sv_catpvf_mg"
.IX Item "sv_catpvf_mg"
Like \f(CW\*(C`sv_catpvf\*(C'\fR, but also handles 'set' magic.
.Sp
.Vb 2
\&        void    sv_catpvf_mg(SV *const sv,
\&                             const char *const pat, ...)
.Ve
.IP "sv_catpvn" 8
.IX Xref "sv_catpvn"
.IX Item "sv_catpvn"
Concatenates the string onto the end of the string which is in the \s-1SV\s0.  The
\&\f(CW\*(C`len\*(C'\fR indicates number of bytes to copy.  If the \s-1SV\s0 has the \s-1UTF\-8\s0
status set, then the bytes appended should be valid \s-1UTF\-8\s0.
Handles 'get' magic, but not 'set' magic.  See \f(CW\*(C`sv_catpvn_mg\*(C'\fR.
.Sp
.Vb 1
\&        void    sv_catpvn(SV *dsv, const char *sstr, STRLEN len)
.Ve
.IP "sv_catpvn_flags" 8
.IX Xref "sv_catpvn_flags"
.IX Item "sv_catpvn_flags"
Concatenates the string onto the end of the string which is in the \s-1SV\s0.  The
\&\f(CW\*(C`len\*(C'\fR indicates number of bytes to copy.  If the \s-1SV\s0 has the \s-1UTF\-8\s0
status set, then the bytes appended should be valid \s-1UTF\-8\s0.
If \f(CW\*(C`flags\*(C'\fR has the \f(CW\*(C`SV_SMAGIC\*(C'\fR bit set, will
\&\f(CW\*(C`mg_set\*(C'\fR on \f(CW\*(C`dsv\*(C'\fR afterwards if appropriate.
\&\f(CW\*(C`sv_catpvn\*(C'\fR and \f(CW\*(C`sv_catpvn_nomg\*(C'\fR are implemented
in terms of this function.
.Sp
.Vb 4
\&        void    sv_catpvn_flags(SV *const dstr,
\&                                const char *sstr,
\&                                const STRLEN len,
\&                                const I32 flags)
.Ve
.IP "sv_catpvs" 8
.IX Xref "sv_catpvs"
.IX Item "sv_catpvs"
Like \f(CW\*(C`sv_catpvn\*(C'\fR, but takes a literal string instead of a string/length pair.
.Sp
.Vb 1
\&        void    sv_catpvs(SV* sv, const char* s)
.Ve
.IP "sv_catpvs_flags" 8
.IX Xref "sv_catpvs_flags"
.IX Item "sv_catpvs_flags"
Like \f(CW\*(C`sv_catpvn_flags\*(C'\fR, but takes a literal string instead of a
string/length pair.
.Sp
.Vb 2
\&        void    sv_catpvs_flags(SV* sv, const char* s,
\&                                I32 flags)
.Ve
.IP "sv_catpvs_mg" 8
.IX Xref "sv_catpvs_mg"
.IX Item "sv_catpvs_mg"
Like \f(CW\*(C`sv_catpvn_mg\*(C'\fR, but takes a literal string instead of a
string/length pair.
.Sp
.Vb 1
\&        void    sv_catpvs_mg(SV* sv, const char* s)
.Ve
.IP "sv_catpvs_nomg" 8
.IX Xref "sv_catpvs_nomg"
.IX Item "sv_catpvs_nomg"
Like \f(CW\*(C`sv_catpvn_nomg\*(C'\fR, but takes a literal string instead of a
string/length pair.
.Sp
.Vb 1
\&        void    sv_catpvs_nomg(SV* sv, const char* s)
.Ve
.IP "sv_catpv_flags" 8
.IX Xref "sv_catpv_flags"
.IX Item "sv_catpv_flags"
Concatenates the string onto the end of the string which is in the \s-1SV\s0.
If the \s-1SV\s0 has the \s-1UTF\-8\s0 status set, then the bytes appended should
be valid \s-1UTF\-8\s0.  If \f(CW\*(C`flags\*(C'\fR has the \f(CW\*(C`SV_SMAGIC\*(C'\fR bit set, will \f(CW\*(C`mg_set\*(C'\fR
on the modified \s-1SV\s0 if appropriate.
.Sp
.Vb 2
\&        void    sv_catpv_flags(SV *dstr, const char *sstr,
\&                               const I32 flags)
.Ve
.IP "sv_catpv_mg" 8
.IX Xref "sv_catpv_mg"
.IX Item "sv_catpv_mg"
Like \f(CW\*(C`sv_catpv\*(C'\fR, but also handles 'set' magic.
.Sp
.Vb 1
\&        void    sv_catpv_mg(SV *const sv, const char *const ptr)
.Ve
.IP "sv_catsv" 8
.IX Xref "sv_catsv"
.IX Item "sv_catsv"
Concatenates the string from \s-1SV\s0 \f(CW\*(C`ssv\*(C'\fR onto the end of the string in
\&\s-1SV\s0 \f(CW\*(C`dsv\*(C'\fR.  Modifies \f(CW\*(C`dsv\*(C'\fR but not \f(CW\*(C`ssv\*(C'\fR.  Handles 'get' magic, but
not 'set' magic.  See \f(CW\*(C`sv_catsv_mg\*(C'\fR.
.Sp
.Vb 1
\&        void    sv_catsv(SV *dstr, SV *sstr)
.Ve
.IP "sv_catsv_flags" 8
.IX Xref "sv_catsv_flags"
.IX Item "sv_catsv_flags"
Concatenates the string from \s-1SV\s0 \f(CW\*(C`ssv\*(C'\fR onto the end of the string in
\&\s-1SV\s0 \f(CW\*(C`dsv\*(C'\fR.  Modifies \f(CW\*(C`dsv\*(C'\fR but not \f(CW\*(C`ssv\*(C'\fR.  If \f(CW\*(C`flags\*(C'\fR has \f(CW\*(C`SV_GMAGIC\*(C'\fR
bit set, will \f(CW\*(C`mg_get\*(C'\fR on the \f(CW\*(C`ssv\*(C'\fR, if appropriate, before
reading it.  If the \f(CW\*(C`flags\*(C'\fR contain \f(CW\*(C`SV_SMAGIC\*(C'\fR, \f(CW\*(C`mg_set\*(C'\fR will be
called on the modified \s-1SV\s0 afterward, if appropriate.  \f(CW\*(C`sv_catsv\*(C'\fR
and \f(CW\*(C`sv_catsv_nomg\*(C'\fR are implemented in terms of this function.
.Sp
.Vb 2
\&        void    sv_catsv_flags(SV *const dsv, SV *const ssv,
\&                               const I32 flags)
.Ve
.IP "sv_chop" 8
.IX Xref "sv_chop"
.IX Item "sv_chop"
Efficient removal of characters from the beginning of the string buffer.
SvPOK(sv) must be true and the \f(CW\*(C`ptr\*(C'\fR must be a pointer to somewhere inside
the string buffer.  The \f(CW\*(C`ptr\*(C'\fR becomes the first character of the adjusted
string.  Uses the \*(L"\s-1OOK\s0 hack\*(R".
.Sp
Beware: after this function returns, \f(CW\*(C`ptr\*(C'\fR and SvPVX_const(sv) may no longer
refer to the same chunk of data.
.Sp
The unfortunate similarity of this function's name to that of Perl's \f(CW\*(C`chop\*(C'\fR
operator is strictly coincidental.  This function works from the left;
\&\f(CW\*(C`chop\*(C'\fR works from the right.
.Sp
.Vb 1
\&        void    sv_chop(SV *const sv, const char *const ptr)
.Ve
.IP "sv_clear" 8
.IX Xref "sv_clear"
.IX Item "sv_clear"
Clear an \s-1SV:\s0 call any destructors, free up any memory used by the body,
and free the body itself.  The \s-1SV\s0's head is \fInot\fR freed, although
its type is set to all 1's so that it won't inadvertently be assumed
to be live during global destruction etc.
This function should only be called when \s-1REFCNT\s0 is zero.  Most of the time
you'll want to call \f(CW\*(C`sv_free()\*(C'\fR (or its macro wrapper \f(CW\*(C`SvREFCNT_dec\*(C'\fR)
instead.
.Sp
.Vb 1
\&        void    sv_clear(SV *const orig_sv)
.Ve
.IP "sv_cmp" 8
.IX Xref "sv_cmp"
.IX Item "sv_cmp"
Compares the strings in two SVs.  Returns \-1, 0, or 1 indicating whether the
string in \f(CW\*(C`sv1\*(C'\fR is less than, equal to, or greater than the string in
\&\f(CW\*(C`sv2\*(C'\fR.  Is \s-1UTF\-8\s0 and 'use bytes' aware, handles get magic, and will
coerce its args to strings if necessary.  See also \f(CW\*(C`sv_cmp_locale\*(C'\fR.
.Sp
.Vb 1
\&        I32     sv_cmp(SV *const sv1, SV *const sv2)
.Ve
.IP "sv_cmp_flags" 8
.IX Xref "sv_cmp_flags"
.IX Item "sv_cmp_flags"
Compares the strings in two SVs.  Returns \-1, 0, or 1 indicating whether the
string in \f(CW\*(C`sv1\*(C'\fR is less than, equal to, or greater than the string in
\&\f(CW\*(C`sv2\*(C'\fR.  Is \s-1UTF\-8\s0 and 'use bytes' aware and will coerce its args to strings
if necessary.  If the flags include \s-1SV_GMAGIC\s0, it handles get magic.  See
also \f(CW\*(C`sv_cmp_locale_flags\*(C'\fR.
.Sp
.Vb 2
\&        I32     sv_cmp_flags(SV *const sv1, SV *const sv2,
\&                             const U32 flags)
.Ve
.IP "sv_cmp_locale" 8
.IX Xref "sv_cmp_locale"
.IX Item "sv_cmp_locale"
Compares the strings in two SVs in a locale-aware manner.  Is \s-1UTF\-8\s0 and
\&'use bytes' aware, handles get magic, and will coerce its args to strings
if necessary.  See also \f(CW\*(C`sv_cmp\*(C'\fR.
.Sp
.Vb 1
\&        I32     sv_cmp_locale(SV *const sv1, SV *const sv2)
.Ve
.IP "sv_cmp_locale_flags" 8
.IX Xref "sv_cmp_locale_flags"
.IX Item "sv_cmp_locale_flags"
Compares the strings in two SVs in a locale-aware manner.  Is \s-1UTF\-8\s0 and
\&'use bytes' aware and will coerce its args to strings if necessary.  If the
flags contain \s-1SV_GMAGIC\s0, it handles get magic.  See also \f(CW\*(C`sv_cmp_flags\*(C'\fR.
.Sp
.Vb 3
\&        I32     sv_cmp_locale_flags(SV *const sv1,
\&                                    SV *const sv2,
\&                                    const U32 flags)
.Ve
.IP "sv_collxfrm" 8
.IX Xref "sv_collxfrm"
.IX Item "sv_collxfrm"
This calls \f(CW\*(C`sv_collxfrm_flags\*(C'\fR with the \s-1SV_GMAGIC\s0 flag.  See
\&\f(CW\*(C`sv_collxfrm_flags\*(C'\fR.
.Sp
.Vb 1
\&        char*   sv_collxfrm(SV *const sv, STRLEN *const nxp)
.Ve
.IP "sv_collxfrm_flags" 8
.IX Xref "sv_collxfrm_flags"
.IX Item "sv_collxfrm_flags"
Add Collate Transform magic to an \s-1SV\s0 if it doesn't already have it.  If the
flags contain \s-1SV_GMAGIC\s0, it handles get-magic.
.Sp
Any scalar variable may carry PERL_MAGIC_collxfrm magic that contains the
scalar data of the variable, but transformed to such a format that a normal
memory comparison can be used to compare the data according to the locale
settings.
.Sp
.Vb 3
\&        char*   sv_collxfrm_flags(SV *const sv,
\&                                  STRLEN *const nxp,
\&                                  I32 const flags)
.Ve
.IP "sv_copypv" 8
.IX Xref "sv_copypv"
.IX Item "sv_copypv"
Copies a stringified representation of the source \s-1SV\s0 into the
destination \s-1SV\s0.  Automatically performs any necessary mg_get and
coercion of numeric values into strings.  Guaranteed to preserve
\&\s-1UTF8\s0 flag even from overloaded objects.  Similar in nature to
sv_2pv[_flags] but operates directly on an \s-1SV\s0 instead of just the
string.  Mostly uses sv_2pv_flags to do its work, except when that
would lose the \s-1UTF\-8\s0'ness of the \s-1PV\s0.
.Sp
.Vb 1
\&        void    sv_copypv(SV *const dsv, SV *const ssv)
.Ve
.IP "sv_dec" 8
.IX Xref "sv_dec"
.IX Item "sv_dec"
Auto-decrement of the value in the \s-1SV\s0, doing string to numeric conversion
if necessary.  Handles 'get' magic and operator overloading.
.Sp
.Vb 1
\&        void    sv_dec(SV *const sv)
.Ve
.IP "sv_dec_nomg" 8
.IX Xref "sv_dec_nomg"
.IX Item "sv_dec_nomg"
Auto-decrement of the value in the \s-1SV\s0, doing string to numeric conversion
if necessary.  Handles operator overloading.  Skips handling 'get' magic.
.Sp
.Vb 1
\&        void    sv_dec_nomg(SV *const sv)
.Ve
.IP "sv_eq" 8
.IX Xref "sv_eq"
.IX Item "sv_eq"
Returns a boolean indicating whether the strings in the two SVs are
identical.  Is \s-1UTF\-8\s0 and 'use bytes' aware, handles get magic, and will
coerce its args to strings if necessary.
.Sp
.Vb 1
\&        I32     sv_eq(SV* sv1, SV* sv2)
.Ve
.IP "sv_eq_flags" 8
.IX Xref "sv_eq_flags"
.IX Item "sv_eq_flags"
Returns a boolean indicating whether the strings in the two SVs are
identical.  Is \s-1UTF\-8\s0 and 'use bytes' aware and coerces its args to strings
if necessary.  If the flags include \s-1SV_GMAGIC\s0, it handles get-magic, too.
.Sp
.Vb 1
\&        I32     sv_eq_flags(SV* sv1, SV* sv2, const U32 flags)
.Ve
.IP "sv_force_normal_flags" 8
.IX Xref "sv_force_normal_flags"
.IX Item "sv_force_normal_flags"
Undo various types of fakery on an \s-1SV:\s0 if the \s-1PV\s0 is a shared string, make
a private copy; if we're a ref, stop refing; if we're a glob, downgrade to
an xpvmg; if we're a copy-on-write scalar, this is the on-write time when
we do the copy, and is also used locally.  If \f(CW\*(C`SV_COW_DROP_PV\*(C'\fR is set
then a copy-on-write scalar drops its \s-1PV\s0 buffer (if any) and becomes
SvPOK_off rather than making a copy.  (Used where this
scalar is about to be set to some other value.)  In addition,
the \f(CW\*(C`flags\*(C'\fR parameter gets passed to \f(CW\*(C`sv_unref_flags()\*(C'\fR
when unreffing.  \f(CW\*(C`sv_force_normal\*(C'\fR calls this function
with flags set to 0.
.Sp
.Vb 2
\&        void    sv_force_normal_flags(SV *const sv,
\&                                      const U32 flags)
.Ve
.IP "sv_free" 8
.IX Xref "sv_free"
.IX Item "sv_free"
Decrement an \s-1SV\s0's reference count, and if it drops to zero, call
\&\f(CW\*(C`sv_clear\*(C'\fR to invoke destructors and free up any memory used by
the body; finally, deallocate the \s-1SV\s0's head itself.
Normally called via a wrapper macro \f(CW\*(C`SvREFCNT_dec\*(C'\fR.
.Sp
.Vb 1
\&        void    sv_free(SV *const sv)
.Ve
.IP "sv_gets" 8
.IX Xref "sv_gets"
.IX Item "sv_gets"
Get a line from the filehandle and store it into the \s-1SV\s0, optionally
appending to the currently-stored string.
.Sp
.Vb 2
\&        char*   sv_gets(SV *const sv, PerlIO *const fp,
\&                        I32 append)
.Ve
.IP "sv_grow" 8
.IX Xref "sv_grow"
.IX Item "sv_grow"
Expands the character buffer in the \s-1SV\s0.  If necessary, uses \f(CW\*(C`sv_unref\*(C'\fR and
upgrades the \s-1SV\s0 to \f(CW\*(C`SVt_PV\*(C'\fR.  Returns a pointer to the character buffer.
Use the \f(CW\*(C`SvGROW\*(C'\fR wrapper instead.
.Sp
.Vb 1
\&        char*   sv_grow(SV *const sv, STRLEN newlen)
.Ve
.IP "sv_inc" 8
.IX Xref "sv_inc"
.IX Item "sv_inc"
Auto-increment of the value in the \s-1SV\s0, doing string to numeric conversion
if necessary.  Handles 'get' magic and operator overloading.
.Sp
.Vb 1
\&        void    sv_inc(SV *const sv)
.Ve
.IP "sv_inc_nomg" 8
.IX Xref "sv_inc_nomg"
.IX Item "sv_inc_nomg"
Auto-increment of the value in the \s-1SV\s0, doing string to numeric conversion
if necessary.  Handles operator overloading.  Skips handling 'get' magic.
.Sp
.Vb 1
\&        void    sv_inc_nomg(SV *const sv)
.Ve
.IP "sv_insert" 8
.IX Xref "sv_insert"
.IX Item "sv_insert"
Inserts a string at the specified offset/length within the \s-1SV\s0.  Similar to
the Perl \fIsubstr()\fR function.  Handles get magic.
.Sp
.Vb 4
\&        void    sv_insert(SV *const bigstr, const STRLEN offset,
\&                          const STRLEN len,
\&                          const char *const little,
\&                          const STRLEN littlelen)
.Ve
.IP "sv_insert_flags" 8
.IX Xref "sv_insert_flags"
.IX Item "sv_insert_flags"
Same as \f(CW\*(C`sv_insert\*(C'\fR, but the extra \f(CW\*(C`flags\*(C'\fR are passed to the
\&\f(CW\*(C`SvPV_force_flags\*(C'\fR that applies to \f(CW\*(C`bigstr\*(C'\fR.
.Sp
.Vb 6
\&        void    sv_insert_flags(SV *const bigstr,
\&                                const STRLEN offset,
\&                                const STRLEN len,
\&                                const char *const little,
\&                                const STRLEN littlelen,
\&                                const U32 flags)
.Ve
.IP "sv_isa" 8
.IX Xref "sv_isa"
.IX Item "sv_isa"
Returns a boolean indicating whether the \s-1SV\s0 is blessed into the specified
class.  This does not check for subtypes; use \f(CW\*(C`sv_derived_from\*(C'\fR to verify
an inheritance relationship.
.Sp
.Vb 1
\&        int     sv_isa(SV* sv, const char *const name)
.Ve
.IP "sv_isobject" 8
.IX Xref "sv_isobject"
.IX Item "sv_isobject"
Returns a boolean indicating whether the \s-1SV\s0 is an \s-1RV\s0 pointing to a blessed
object.  If the \s-1SV\s0 is not an \s-1RV\s0, or if the object is not blessed, then this
will return false.
.Sp
.Vb 1
\&        int     sv_isobject(SV* sv)
.Ve
.IP "sv_len" 8
.IX Xref "sv_len"
.IX Item "sv_len"
Returns the length of the string in the \s-1SV\s0.  Handles magic and type
coercion.  See also \f(CW\*(C`SvCUR\*(C'\fR, which gives raw access to the xpv_cur slot.
.Sp
.Vb 1
\&        STRLEN  sv_len(SV *const sv)
.Ve
.IP "sv_len_utf8" 8
.IX Xref "sv_len_utf8"
.IX Item "sv_len_utf8"
Returns the number of characters in the string in an \s-1SV\s0, counting wide
\&\s-1UTF\-8\s0 bytes as a single character.  Handles magic and type coercion.
.Sp
.Vb 1
\&        STRLEN  sv_len_utf8(SV *const sv)
.Ve
.IP "sv_magic" 8
.IX Xref "sv_magic"
.IX Item "sv_magic"
Adds magic to an \s-1SV\s0.  First upgrades \f(CW\*(C`sv\*(C'\fR to type \f(CW\*(C`SVt_PVMG\*(C'\fR if
necessary, then adds a new magic item of type \f(CW\*(C`how\*(C'\fR to the head of the
magic list.
.Sp
See \f(CW\*(C`sv_magicext\*(C'\fR (which \f(CW\*(C`sv_magic\*(C'\fR now calls) for a description of the
handling of the \f(CW\*(C`name\*(C'\fR and \f(CW\*(C`namlen\*(C'\fR arguments.
.Sp
You need to use \f(CW\*(C`sv_magicext\*(C'\fR to add magic to SvREADONLY SVs and also
to add more than one instance of the same 'how'.
.Sp
.Vb 3
\&        void    sv_magic(SV *const sv, SV *const obj,
\&                         const int how, const char *const name,
\&                         const I32 namlen)
.Ve
.IP "sv_magicext" 8
.IX Xref "sv_magicext"
.IX Item "sv_magicext"
Adds magic to an \s-1SV\s0, upgrading it if necessary.  Applies the
supplied vtable and returns a pointer to the magic added.
.Sp
Note that \f(CW\*(C`sv_magicext\*(C'\fR will allow things that \f(CW\*(C`sv_magic\*(C'\fR will not.
In particular, you can add magic to SvREADONLY SVs, and add more than
one instance of the same 'how'.
.Sp
If \f(CW\*(C`namlen\*(C'\fR is greater than zero then a \f(CW\*(C`savepvn\*(C'\fR \fIcopy\fR of \f(CW\*(C`name\*(C'\fR is
stored, if \f(CW\*(C`namlen\*(C'\fR is zero then \f(CW\*(C`name\*(C'\fR is stored as-is and \- as another
special case \- if \f(CW\*(C`(name && namlen == HEf_SVKEY)\*(C'\fR then \f(CW\*(C`name\*(C'\fR is assumed
to contain an \f(CW\*(C`SV*\*(C'\fR and is stored as-is with its \s-1REFCNT\s0 incremented.
.Sp
(This is now used as a subroutine by \f(CW\*(C`sv_magic\*(C'\fR.)
.Sp
.Vb 5
\&        MAGIC * sv_magicext(SV *const sv, SV *const obj,
\&                            const int how,
\&                            const MGVTBL *const vtbl,
\&                            const char *const name,
\&                            const I32 namlen)
.Ve
.IP "sv_mortalcopy" 8
.IX Xref "sv_mortalcopy"
.IX Item "sv_mortalcopy"
Creates a new \s-1SV\s0 which is a copy of the original \s-1SV\s0 (using \f(CW\*(C`sv_setsv\*(C'\fR).
The new \s-1SV\s0 is marked as mortal.  It will be destroyed \*(L"soon\*(R", either by an
explicit call to \s-1FREETMPS\s0, or by an implicit call at places such as
statement boundaries.  See also \f(CW\*(C`sv_newmortal\*(C'\fR and \f(CW\*(C`sv_2mortal\*(C'\fR.
.Sp
.Vb 1
\&        SV*     sv_mortalcopy(SV *const oldsv)
.Ve
.IP "sv_newmortal" 8
.IX Xref "sv_newmortal"
.IX Item "sv_newmortal"
Creates a new null \s-1SV\s0 which is mortal.  The reference count of the \s-1SV\s0 is
set to 1.  It will be destroyed \*(L"soon\*(R", either by an explicit call to
\&\s-1FREETMPS\s0, or by an implicit call at places such as statement boundaries.
See also \f(CW\*(C`sv_mortalcopy\*(C'\fR and \f(CW\*(C`sv_2mortal\*(C'\fR.
.Sp
.Vb 1
\&        SV*     sv_newmortal()
.Ve
.IP "sv_newref" 8
.IX Xref "sv_newref"
.IX Item "sv_newref"
Increment an \s-1SV\s0's reference count.  Use the \f(CW\*(C`SvREFCNT_inc()\*(C'\fR wrapper
instead.
.Sp
.Vb 1
\&        SV*     sv_newref(SV *const sv)
.Ve
.IP "sv_pos_b2u" 8
.IX Xref "sv_pos_b2u"
.IX Item "sv_pos_b2u"
Converts the value pointed to by offsetp from a count of bytes from the
start of the string, to a count of the equivalent number of \s-1UTF\-8\s0 chars.
Handles magic and type coercion.
.Sp
.Vb 1
\&        void    sv_pos_b2u(SV *const sv, I32 *const offsetp)
.Ve
.IP "sv_pos_u2b" 8
.IX Xref "sv_pos_u2b"
.IX Item "sv_pos_u2b"
Converts the value pointed to by offsetp from a count of \s-1UTF\-8\s0 chars from
the start of the string, to a count of the equivalent number of bytes; if
lenp is non-zero, it does the same to lenp, but this time starting from
the offset, rather than from the start of the string.  Handles magic and
type coercion.
.Sp
Use \f(CW\*(C`sv_pos_u2b_flags\*(C'\fR in preference, which correctly handles strings longer
than 2Gb.
.Sp
.Vb 2
\&        void    sv_pos_u2b(SV *const sv, I32 *const offsetp,
\&                           I32 *const lenp)
.Ve
.IP "sv_pos_u2b_flags" 8
.IX Xref "sv_pos_u2b_flags"
.IX Item "sv_pos_u2b_flags"
Converts the value pointed to by offsetp from a count of \s-1UTF\-8\s0 chars from
the start of the string, to a count of the equivalent number of bytes; if
lenp is non-zero, it does the same to lenp, but this time starting from
the offset, rather than from the start
of the string.  Handles type coercion.
\&\fIflags\fR is passed to \f(CW\*(C`SvPV_flags\*(C'\fR, and usually should be
\&\f(CW\*(C`SV_GMAGIC|SV_CONST_RETURN\*(C'\fR to handle magic.
.Sp
.Vb 2
\&        STRLEN  sv_pos_u2b_flags(SV *const sv, STRLEN uoffset,
\&                                 STRLEN *const lenp, U32 flags)
.Ve
.IP "sv_pvbyten_force" 8
.IX Xref "sv_pvbyten_force"
.IX Item "sv_pvbyten_force"
The backend for the \f(CW\*(C`SvPVbytex_force\*(C'\fR macro.  Always use the macro
instead.
.Sp
.Vb 1
\&        char*   sv_pvbyten_force(SV *const sv, STRLEN *const lp)
.Ve
.IP "sv_pvn_force" 8
.IX Xref "sv_pvn_force"
.IX Item "sv_pvn_force"
Get a sensible string out of the \s-1SV\s0 somehow.
A private implementation of the \f(CW\*(C`SvPV_force\*(C'\fR macro for compilers which
can't cope with complex macro expressions.  Always use the macro instead.
.Sp
.Vb 1
\&        char*   sv_pvn_force(SV* sv, STRLEN* lp)
.Ve
.IP "sv_pvn_force_flags" 8
.IX Xref "sv_pvn_force_flags"
.IX Item "sv_pvn_force_flags"
Get a sensible string out of the \s-1SV\s0 somehow.
If \f(CW\*(C`flags\*(C'\fR has \f(CW\*(C`SV_GMAGIC\*(C'\fR bit set, will \f(CW\*(C`mg_get\*(C'\fR on \f(CW\*(C`sv\*(C'\fR if
appropriate, else not.  \f(CW\*(C`sv_pvn_force\*(C'\fR and \f(CW\*(C`sv_pvn_force_nomg\*(C'\fR are
implemented in terms of this function.
You normally want to use the various wrapper macros instead: see
\&\f(CW\*(C`SvPV_force\*(C'\fR and \f(CW\*(C`SvPV_force_nomg\*(C'\fR
.Sp
.Vb 3
\&        char*   sv_pvn_force_flags(SV *const sv,
\&                                   STRLEN *const lp,
\&                                   const I32 flags)
.Ve
.IP "sv_pvutf8n_force" 8
.IX Xref "sv_pvutf8n_force"
.IX Item "sv_pvutf8n_force"
The backend for the \f(CW\*(C`SvPVutf8x_force\*(C'\fR macro.  Always use the macro
instead.
.Sp
.Vb 1
\&        char*   sv_pvutf8n_force(SV *const sv, STRLEN *const lp)
.Ve
.IP "sv_reftype" 8
.IX Xref "sv_reftype"
.IX Item "sv_reftype"
Returns a string describing what the \s-1SV\s0 is a reference to.
.Sp
.Vb 1
\&        const char* sv_reftype(const SV *const sv, const int ob)
.Ve
.IP "sv_replace" 8
.IX Xref "sv_replace"
.IX Item "sv_replace"
Make the first argument a copy of the second, then delete the original.
The target \s-1SV\s0 physically takes over ownership of the body of the source \s-1SV\s0
and inherits its flags; however, the target keeps any magic it owns,
and any magic in the source is discarded.
Note that this is a rather specialist \s-1SV\s0 copying operation; most of the
time you'll want to use \f(CW\*(C`sv_setsv\*(C'\fR or one of its many macro front-ends.
.Sp
.Vb 1
\&        void    sv_replace(SV *const sv, SV *const nsv)
.Ve
.IP "sv_reset" 8
.IX Xref "sv_reset"
.IX Item "sv_reset"
Underlying implementation for the \f(CW\*(C`reset\*(C'\fR Perl function.
Note that the perl-level function is vaguely deprecated.
.Sp
.Vb 1
\&        void    sv_reset(const char* s, HV *const stash)
.Ve
.IP "sv_rvweaken" 8
.IX Xref "sv_rvweaken"
.IX Item "sv_rvweaken"
Weaken a reference: set the \f(CW\*(C`SvWEAKREF\*(C'\fR flag on this \s-1RV\s0; give the
referred-to \s-1SV\s0 \f(CW\*(C`PERL_MAGIC_backref\*(C'\fR magic if it hasn't already; and
push a back-reference to this \s-1RV\s0 onto the array of backreferences
associated with that magic.  If the \s-1RV\s0 is magical, set magic will be
called after the \s-1RV\s0 is cleared.
.Sp
.Vb 1
\&        SV*     sv_rvweaken(SV *const sv)
.Ve
.IP "sv_setiv" 8
.IX Xref "sv_setiv"
.IX Item "sv_setiv"
Copies an integer into the given \s-1SV\s0, upgrading first if necessary.
Does not handle 'set' magic.  See also \f(CW\*(C`sv_setiv_mg\*(C'\fR.
.Sp
.Vb 1
\&        void    sv_setiv(SV *const sv, const IV num)
.Ve
.IP "sv_setiv_mg" 8
.IX Xref "sv_setiv_mg"
.IX Item "sv_setiv_mg"
Like \f(CW\*(C`sv_setiv\*(C'\fR, but also handles 'set' magic.
.Sp
.Vb 1
\&        void    sv_setiv_mg(SV *const sv, const IV i)
.Ve
.IP "sv_setnv" 8
.IX Xref "sv_setnv"
.IX Item "sv_setnv"
Copies a double into the given \s-1SV\s0, upgrading first if necessary.
Does not handle 'set' magic.  See also \f(CW\*(C`sv_setnv_mg\*(C'\fR.
.Sp
.Vb 1
\&        void    sv_setnv(SV *const sv, const NV num)
.Ve
.IP "sv_setnv_mg" 8
.IX Xref "sv_setnv_mg"
.IX Item "sv_setnv_mg"
Like \f(CW\*(C`sv_setnv\*(C'\fR, but also handles 'set' magic.
.Sp
.Vb 1
\&        void    sv_setnv_mg(SV *const sv, const NV num)
.Ve
.IP "sv_setpv" 8
.IX Xref "sv_setpv"
.IX Item "sv_setpv"
Copies a string into an \s-1SV\s0.  The string must be null-terminated.  Does not
handle 'set' magic.  See \f(CW\*(C`sv_setpv_mg\*(C'\fR.
.Sp
.Vb 1
\&        void    sv_setpv(SV *const sv, const char *const ptr)
.Ve
.IP "sv_setpvf" 8
.IX Xref "sv_setpvf"
.IX Item "sv_setpvf"
Works like \f(CW\*(C`sv_catpvf\*(C'\fR but copies the text into the \s-1SV\s0 instead of
appending it.  Does not handle 'set' magic.  See \f(CW\*(C`sv_setpvf_mg\*(C'\fR.
.Sp
.Vb 2
\&        void    sv_setpvf(SV *const sv, const char *const pat,
\&                          ...)
.Ve
.IP "sv_setpvf_mg" 8
.IX Xref "sv_setpvf_mg"
.IX Item "sv_setpvf_mg"
Like \f(CW\*(C`sv_setpvf\*(C'\fR, but also handles 'set' magic.
.Sp
.Vb 2
\&        void    sv_setpvf_mg(SV *const sv,
\&                             const char *const pat, ...)
.Ve
.IP "sv_setpviv" 8
.IX Xref "sv_setpviv"
.IX Item "sv_setpviv"
Copies an integer into the given \s-1SV\s0, also updating its string value.
Does not handle 'set' magic.  See \f(CW\*(C`sv_setpviv_mg\*(C'\fR.
.Sp
.Vb 1
\&        void    sv_setpviv(SV *const sv, const IV num)
.Ve
.IP "sv_setpviv_mg" 8
.IX Xref "sv_setpviv_mg"
.IX Item "sv_setpviv_mg"
Like \f(CW\*(C`sv_setpviv\*(C'\fR, but also handles 'set' magic.
.Sp
.Vb 1
\&        void    sv_setpviv_mg(SV *const sv, const IV iv)
.Ve
.IP "sv_setpvn" 8
.IX Xref "sv_setpvn"
.IX Item "sv_setpvn"
Copies a string into an \s-1SV\s0.  The \f(CW\*(C`len\*(C'\fR parameter indicates the number of
bytes to be copied.  If the \f(CW\*(C`ptr\*(C'\fR argument is \s-1NULL\s0 the \s-1SV\s0 will become
undefined.  Does not handle 'set' magic.  See \f(CW\*(C`sv_setpvn_mg\*(C'\fR.
.Sp
.Vb 2
\&        void    sv_setpvn(SV *const sv, const char *const ptr,
\&                          const STRLEN len)
.Ve
.IP "sv_setpvn_mg" 8
.IX Xref "sv_setpvn_mg"
.IX Item "sv_setpvn_mg"
Like \f(CW\*(C`sv_setpvn\*(C'\fR, but also handles 'set' magic.
.Sp
.Vb 3
\&        void    sv_setpvn_mg(SV *const sv,
\&                             const char *const ptr,
\&                             const STRLEN len)
.Ve
.IP "sv_setpvs" 8
.IX Xref "sv_setpvs"
.IX Item "sv_setpvs"
Like \f(CW\*(C`sv_setpvn\*(C'\fR, but takes a literal string instead of a string/length pair.
.Sp
.Vb 1
\&        void    sv_setpvs(SV* sv, const char* s)
.Ve
.IP "sv_setpvs_mg" 8
.IX Xref "sv_setpvs_mg"
.IX Item "sv_setpvs_mg"
Like \f(CW\*(C`sv_setpvn_mg\*(C'\fR, but takes a literal string instead of a
string/length pair.
.Sp
.Vb 1
\&        void    sv_setpvs_mg(SV* sv, const char* s)
.Ve
.IP "sv_setpv_mg" 8
.IX Xref "sv_setpv_mg"
.IX Item "sv_setpv_mg"
Like \f(CW\*(C`sv_setpv\*(C'\fR, but also handles 'set' magic.
.Sp
.Vb 1
\&        void    sv_setpv_mg(SV *const sv, const char *const ptr)
.Ve
.IP "sv_setref_iv" 8
.IX Xref "sv_setref_iv"
.IX Item "sv_setref_iv"
Copies an integer into a new \s-1SV\s0, optionally blessing the \s-1SV\s0.  The \f(CW\*(C`rv\*(C'\fR
argument will be upgraded to an \s-1RV\s0.  That \s-1RV\s0 will be modified to point to
the new \s-1SV\s0.  The \f(CW\*(C`classname\*(C'\fR argument indicates the package for the
blessing.  Set \f(CW\*(C`classname\*(C'\fR to \f(CW\*(C`NULL\*(C'\fR to avoid the blessing.  The new \s-1SV\s0
will have a reference count of 1, and the \s-1RV\s0 will be returned.
.Sp
.Vb 3
\&        SV*     sv_setref_iv(SV *const rv,
\&                             const char *const classname,
\&                             const IV iv)
.Ve
.IP "sv_setref_nv" 8
.IX Xref "sv_setref_nv"
.IX Item "sv_setref_nv"
Copies a double into a new \s-1SV\s0, optionally blessing the \s-1SV\s0.  The \f(CW\*(C`rv\*(C'\fR
argument will be upgraded to an \s-1RV\s0.  That \s-1RV\s0 will be modified to point to
the new \s-1SV\s0.  The \f(CW\*(C`classname\*(C'\fR argument indicates the package for the
blessing.  Set \f(CW\*(C`classname\*(C'\fR to \f(CW\*(C`NULL\*(C'\fR to avoid the blessing.  The new \s-1SV\s0
will have a reference count of 1, and the \s-1RV\s0 will be returned.
.Sp
.Vb 3
\&        SV*     sv_setref_nv(SV *const rv,
\&                             const char *const classname,
\&                             const NV nv)
.Ve
.IP "sv_setref_pv" 8
.IX Xref "sv_setref_pv"
.IX Item "sv_setref_pv"
Copies a pointer into a new \s-1SV\s0, optionally blessing the \s-1SV\s0.  The \f(CW\*(C`rv\*(C'\fR
argument will be upgraded to an \s-1RV\s0.  That \s-1RV\s0 will be modified to point to
the new \s-1SV\s0.  If the \f(CW\*(C`pv\*(C'\fR argument is \s-1NULL\s0 then \f(CW\*(C`PL_sv_undef\*(C'\fR will be placed
into the \s-1SV\s0.  The \f(CW\*(C`classname\*(C'\fR argument indicates the package for the
blessing.  Set \f(CW\*(C`classname\*(C'\fR to \f(CW\*(C`NULL\*(C'\fR to avoid the blessing.  The new \s-1SV\s0
will have a reference count of 1, and the \s-1RV\s0 will be returned.
.Sp
Do not use with other Perl types such as \s-1HV\s0, \s-1AV\s0, \s-1SV\s0, \s-1CV\s0, because those
objects will become corrupted by the pointer copy process.
.Sp
Note that \f(CW\*(C`sv_setref_pvn\*(C'\fR copies the string while this copies the pointer.
.Sp
.Vb 3
\&        SV*     sv_setref_pv(SV *const rv,
\&                             const char *const classname,
\&                             void *const pv)
.Ve
.IP "sv_setref_pvn" 8
.IX Xref "sv_setref_pvn"
.IX Item "sv_setref_pvn"
Copies a string into a new \s-1SV\s0, optionally blessing the \s-1SV\s0.  The length of the
string must be specified with \f(CW\*(C`n\*(C'\fR.  The \f(CW\*(C`rv\*(C'\fR argument will be upgraded to
an \s-1RV\s0.  That \s-1RV\s0 will be modified to point to the new \s-1SV\s0.  The \f(CW\*(C`classname\*(C'\fR
argument indicates the package for the blessing.  Set \f(CW\*(C`classname\*(C'\fR to
\&\f(CW\*(C`NULL\*(C'\fR to avoid the blessing.  The new \s-1SV\s0 will have a reference count
of 1, and the \s-1RV\s0 will be returned.
.Sp
Note that \f(CW\*(C`sv_setref_pv\*(C'\fR copies the pointer while this copies the string.
.Sp
.Vb 4
\&        SV*     sv_setref_pvn(SV *const rv,
\&                              const char *const classname,
\&                              const char *const pv,
\&                              const STRLEN n)
.Ve
.IP "sv_setref_pvs" 8
.IX Xref "sv_setref_pvs"
.IX Item "sv_setref_pvs"
Like \f(CW\*(C`sv_setref_pvn\*(C'\fR, but takes a literal string instead of a
string/length pair.
.Sp
.Vb 1
\&        SV *    sv_setref_pvs(const char* s)
.Ve
.IP "sv_setref_uv" 8
.IX Xref "sv_setref_uv"
.IX Item "sv_setref_uv"
Copies an unsigned integer into a new \s-1SV\s0, optionally blessing the \s-1SV\s0.  The \f(CW\*(C`rv\*(C'\fR
argument will be upgraded to an \s-1RV\s0.  That \s-1RV\s0 will be modified to point to
the new \s-1SV\s0.  The \f(CW\*(C`classname\*(C'\fR argument indicates the package for the
blessing.  Set \f(CW\*(C`classname\*(C'\fR to \f(CW\*(C`NULL\*(C'\fR to avoid the blessing.  The new \s-1SV\s0
will have a reference count of 1, and the \s-1RV\s0 will be returned.
.Sp
.Vb 3
\&        SV*     sv_setref_uv(SV *const rv,
\&                             const char *const classname,
\&                             const UV uv)
.Ve
.IP "sv_setsv" 8
.IX Xref "sv_setsv"
.IX Item "sv_setsv"
Copies the contents of the source \s-1SV\s0 \f(CW\*(C`ssv\*(C'\fR into the destination \s-1SV\s0
\&\f(CW\*(C`dsv\*(C'\fR.  The source \s-1SV\s0 may be destroyed if it is mortal, so don't use this
function if the source \s-1SV\s0 needs to be reused.  Does not handle 'set' magic.
Loosely speaking, it performs a copy-by-value, obliterating any previous
content of the destination.
.Sp
You probably want to use one of the assortment of wrappers, such as
\&\f(CW\*(C`SvSetSV\*(C'\fR, \f(CW\*(C`SvSetSV_nosteal\*(C'\fR, \f(CW\*(C`SvSetMagicSV\*(C'\fR and
\&\f(CW\*(C`SvSetMagicSV_nosteal\*(C'\fR.
.Sp
.Vb 1
\&        void    sv_setsv(SV *dstr, SV *sstr)
.Ve
.IP "sv_setsv_flags" 8
.IX Xref "sv_setsv_flags"
.IX Item "sv_setsv_flags"
Copies the contents of the source \s-1SV\s0 \f(CW\*(C`ssv\*(C'\fR into the destination \s-1SV\s0
\&\f(CW\*(C`dsv\*(C'\fR.  The source \s-1SV\s0 may be destroyed if it is mortal, so don't use this
function if the source \s-1SV\s0 needs to be reused.  Does not handle 'set' magic.
Loosely speaking, it performs a copy-by-value, obliterating any previous
content of the destination.
If the \f(CW\*(C`flags\*(C'\fR parameter has the \f(CW\*(C`SV_GMAGIC\*(C'\fR bit set, will \f(CW\*(C`mg_get\*(C'\fR on
\&\f(CW\*(C`ssv\*(C'\fR if appropriate, else not.  If the \f(CW\*(C`flags\*(C'\fR
parameter has the \f(CW\*(C`NOSTEAL\*(C'\fR bit set then the
buffers of temps will not be stolen.  <sv_setsv>
and \f(CW\*(C`sv_setsv_nomg\*(C'\fR are implemented in terms of this function.
.Sp
You probably want to use one of the assortment of wrappers, such as
\&\f(CW\*(C`SvSetSV\*(C'\fR, \f(CW\*(C`SvSetSV_nosteal\*(C'\fR, \f(CW\*(C`SvSetMagicSV\*(C'\fR and
\&\f(CW\*(C`SvSetMagicSV_nosteal\*(C'\fR.
.Sp
This is the primary function for copying scalars, and most other
copy-ish functions and macros use this underneath.
.Sp
.Vb 2
\&        void    sv_setsv_flags(SV *dstr, SV *sstr,
\&                               const I32 flags)
.Ve
.IP "sv_setsv_mg" 8
.IX Xref "sv_setsv_mg"
.IX Item "sv_setsv_mg"
Like \f(CW\*(C`sv_setsv\*(C'\fR, but also handles 'set' magic.
.Sp
.Vb 1
\&        void    sv_setsv_mg(SV *const dstr, SV *const sstr)
.Ve
.IP "sv_setuv" 8
.IX Xref "sv_setuv"
.IX Item "sv_setuv"
Copies an unsigned integer into the given \s-1SV\s0, upgrading first if necessary.
Does not handle 'set' magic.  See also \f(CW\*(C`sv_setuv_mg\*(C'\fR.
.Sp
.Vb 1
\&        void    sv_setuv(SV *const sv, const UV num)
.Ve
.IP "sv_setuv_mg" 8
.IX Xref "sv_setuv_mg"
.IX Item "sv_setuv_mg"
Like \f(CW\*(C`sv_setuv\*(C'\fR, but also handles 'set' magic.
.Sp
.Vb 1
\&        void    sv_setuv_mg(SV *const sv, const UV u)
.Ve
.IP "sv_tainted" 8
.IX Xref "sv_tainted"
.IX Item "sv_tainted"
Test an \s-1SV\s0 for taintedness.  Use \f(CW\*(C`SvTAINTED\*(C'\fR instead.
.Sp
.Vb 1
\&        bool    sv_tainted(SV *const sv)
.Ve
.IP "sv_true" 8
.IX Xref "sv_true"
.IX Item "sv_true"
Returns true if the \s-1SV\s0 has a true value by Perl's rules.
Use the \f(CW\*(C`SvTRUE\*(C'\fR macro instead, which may call \f(CW\*(C`sv_true()\*(C'\fR or may
instead use an in-line version.
.Sp
.Vb 1
\&        I32     sv_true(SV *const sv)
.Ve
.IP "sv_unmagic" 8
.IX Xref "sv_unmagic"
.IX Item "sv_unmagic"
Removes all magic of type \f(CW\*(C`type\*(C'\fR from an \s-1SV\s0.
.Sp
.Vb 1
\&        int     sv_unmagic(SV *const sv, const int type)
.Ve
.IP "sv_unmagicext" 8
.IX Xref "sv_unmagicext"
.IX Item "sv_unmagicext"
Removes all magic of type \f(CW\*(C`type\*(C'\fR with the specified \f(CW\*(C`vtbl\*(C'\fR from an \s-1SV\s0.
.Sp
.Vb 2
\&        int     sv_unmagicext(SV *const sv, const int type,
\&                              MGVTBL *vtbl)
.Ve
.IP "sv_unref_flags" 8
.IX Xref "sv_unref_flags"
.IX Item "sv_unref_flags"
Unsets the \s-1RV\s0 status of the \s-1SV\s0, and decrements the reference count of
whatever was being referenced by the \s-1RV\s0.  This can almost be thought of
as a reversal of \f(CW\*(C`newSVrv\*(C'\fR.  The \f(CW\*(C`cflags\*(C'\fR argument can contain
\&\f(CW\*(C`SV_IMMEDIATE_UNREF\*(C'\fR to force the reference count to be decremented
(otherwise the decrementing is conditional on the reference count being
different from one or the reference being a readonly \s-1SV\s0).
See \f(CW\*(C`SvROK_off\*(C'\fR.
.Sp
.Vb 1
\&        void    sv_unref_flags(SV *const ref, const U32 flags)
.Ve
.IP "sv_untaint" 8
.IX Xref "sv_untaint"
.IX Item "sv_untaint"
Untaint an \s-1SV\s0.  Use \f(CW\*(C`SvTAINTED_off\*(C'\fR instead.
.Sp
.Vb 1
\&        void    sv_untaint(SV *const sv)
.Ve
.IP "sv_upgrade" 8
.IX Xref "sv_upgrade"
.IX Item "sv_upgrade"
Upgrade an \s-1SV\s0 to a more complex form.  Generally adds a new body type to the
\&\s-1SV\s0, then copies across as much information as possible from the old body.
It croaks if the \s-1SV\s0 is already in a more complex form than requested.  You
generally want to use the \f(CW\*(C`SvUPGRADE\*(C'\fR macro wrapper, which checks the type
before calling \f(CW\*(C`sv_upgrade\*(C'\fR, and hence does not croak.  See also
\&\f(CW\*(C`svtype\*(C'\fR.
.Sp
.Vb 1
\&        void    sv_upgrade(SV *const sv, svtype new_type)
.Ve
.IP "sv_usepvn_flags" 8
.IX Xref "sv_usepvn_flags"
.IX Item "sv_usepvn_flags"
Tells an \s-1SV\s0 to use \f(CW\*(C`ptr\*(C'\fR to find its string value.  Normally the
string is stored inside the \s-1SV\s0 but sv_usepvn allows the \s-1SV\s0 to use an
outside string.  The \f(CW\*(C`ptr\*(C'\fR should point to memory that was allocated
by \f(CW\*(C`malloc\*(C'\fR.  It must be the start of a mallocked block
of memory, and not a pointer to the middle of it.  The
string length, \f(CW\*(C`len\*(C'\fR, must be supplied.  By default
this function will realloc (i.e. move) the memory pointed to by \f(CW\*(C`ptr\*(C'\fR,
so that pointer should not be freed or used by the programmer after
giving it to sv_usepvn, and neither should any pointers from \*(L"behind\*(R"
that pointer (e.g. ptr + 1) be used.
.Sp
If \f(CW\*(C`flags\*(C'\fR & \s-1SV_SMAGIC\s0 is true, will call SvSETMAGIC.  If \f(CW\*(C`flags\*(C'\fR &
\&\s-1SV_HAS_TRAILING_NUL\s0 is true, then \f(CW\*(C`ptr[len]\*(C'\fR must be \s-1NUL\s0, and the realloc
will be skipped (i.e. the buffer is actually at least 1 byte longer than
\&\f(CW\*(C`len\*(C'\fR, and already meets the requirements for storing in \f(CW\*(C`SvPVX\*(C'\fR).
.Sp
.Vb 3
\&        void    sv_usepvn_flags(SV *const sv, char* ptr,
\&                                const STRLEN len,
\&                                const U32 flags)
.Ve
.IP "sv_utf8_decode" 8
.IX Xref "sv_utf8_decode"
.IX Item "sv_utf8_decode"
If the \s-1PV\s0 of the \s-1SV\s0 is an octet sequence in \s-1UTF\-8\s0
and contains a multiple-byte character, the \f(CW\*(C`SvUTF8\*(C'\fR flag is turned on
so that it looks like a character.  If the \s-1PV\s0 contains only single-byte
characters, the \f(CW\*(C`SvUTF8\*(C'\fR flag stays off.
Scans \s-1PV\s0 for validity and returns false if the \s-1PV\s0 is invalid \s-1UTF\-8\s0.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        bool    sv_utf8_decode(SV *const sv)
.Ve
.IP "sv_utf8_downgrade" 8
.IX Xref "sv_utf8_downgrade"
.IX Item "sv_utf8_downgrade"
Attempts to convert the \s-1PV\s0 of an \s-1SV\s0 from characters to bytes.
If the \s-1PV\s0 contains a character that cannot fit
in a byte, this conversion will fail;
in this case, either returns false or, if \f(CW\*(C`fail_ok\*(C'\fR is not
true, croaks.
.Sp
This is not as a general purpose Unicode to byte encoding interface:
use the Encode extension for that.
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 2
\&        bool    sv_utf8_downgrade(SV *const sv,
\&                                  const bool fail_ok)
.Ve
.IP "sv_utf8_encode" 8
.IX Xref "sv_utf8_encode"
.IX Item "sv_utf8_encode"
Converts the \s-1PV\s0 of an \s-1SV\s0 to \s-1UTF\-8\s0, but then turns the \f(CW\*(C`SvUTF8\*(C'\fR
flag off so that it looks like octets again.
.Sp
.Vb 1
\&        void    sv_utf8_encode(SV *const sv)
.Ve
.IP "sv_utf8_upgrade" 8
.IX Xref "sv_utf8_upgrade"
.IX Item "sv_utf8_upgrade"
Converts the \s-1PV\s0 of an \s-1SV\s0 to its UTF\-8\-encoded form.
Forces the \s-1SV\s0 to string form if it is not already.
Will \f(CW\*(C`mg_get\*(C'\fR on \f(CW\*(C`sv\*(C'\fR if appropriate.
Always sets the SvUTF8 flag to avoid future validity checks even
if the whole string is the same in \s-1UTF\-8\s0 as not.
Returns the number of bytes in the converted string
.Sp
This is not as a general purpose byte encoding to Unicode interface:
use the Encode extension for that.
.Sp
.Vb 1
\&        STRLEN  sv_utf8_upgrade(SV *sv)
.Ve
.IP "sv_utf8_upgrade_flags" 8
.IX Xref "sv_utf8_upgrade_flags"
.IX Item "sv_utf8_upgrade_flags"
Converts the \s-1PV\s0 of an \s-1SV\s0 to its UTF\-8\-encoded form.
Forces the \s-1SV\s0 to string form if it is not already.
Always sets the SvUTF8 flag to avoid future validity checks even
if all the bytes are invariant in \s-1UTF\-8\s0.
If \f(CW\*(C`flags\*(C'\fR has \f(CW\*(C`SV_GMAGIC\*(C'\fR bit set,
will \f(CW\*(C`mg_get\*(C'\fR on \f(CW\*(C`sv\*(C'\fR if appropriate, else not.
Returns the number of bytes in the converted string
\&\f(CW\*(C`sv_utf8_upgrade\*(C'\fR and
\&\f(CW\*(C`sv_utf8_upgrade_nomg\*(C'\fR are implemented in terms of this function.
.Sp
This is not as a general purpose byte encoding to Unicode interface:
use the Encode extension for that.
.Sp
.Vb 2
\&        STRLEN  sv_utf8_upgrade_flags(SV *const sv,
\&                                      const I32 flags)
.Ve
.IP "sv_utf8_upgrade_nomg" 8
.IX Xref "sv_utf8_upgrade_nomg"
.IX Item "sv_utf8_upgrade_nomg"
Like sv_utf8_upgrade, but doesn't do magic on \f(CW\*(C`sv\*(C'\fR.
.Sp
.Vb 1
\&        STRLEN  sv_utf8_upgrade_nomg(SV *sv)
.Ve
.IP "sv_vcatpvf" 8
.IX Xref "sv_vcatpvf"
.IX Item "sv_vcatpvf"
Processes its arguments like \f(CW\*(C`vsprintf\*(C'\fR and appends the formatted output
to an \s-1SV\s0.  Does not handle 'set' magic.  See \f(CW\*(C`sv_vcatpvf_mg\*(C'\fR.
.Sp
Usually used via its frontend \f(CW\*(C`sv_catpvf\*(C'\fR.
.Sp
.Vb 2
\&        void    sv_vcatpvf(SV *const sv, const char *const pat,
\&                           va_list *const args)
.Ve
.IP "sv_vcatpvfn" 8
.IX Xref "sv_vcatpvfn"
.IX Item "sv_vcatpvfn"
Processes its arguments like \f(CW\*(C`vsprintf\*(C'\fR and appends the formatted output
to an \s-1SV\s0.  Uses an array of SVs if the C style variable argument list is
missing (\s-1NULL\s0).  When running with taint checks enabled, indicates via
\&\f(CW\*(C`maybe_tainted\*(C'\fR if results are untrustworthy (often due to the use of
locales).
.Sp
Usually used via one of its frontends \f(CW\*(C`sv_vcatpvf\*(C'\fR and \f(CW\*(C`sv_vcatpvf_mg\*(C'\fR.
.Sp
.Vb 5
\&        void    sv_vcatpvfn(SV *const sv, const char *const pat,
\&                            const STRLEN patlen,
\&                            va_list *const args,
\&                            SV **const svargs, const I32 svmax,
\&                            bool *const maybe_tainted)
.Ve
.IP "sv_vcatpvf_mg" 8
.IX Xref "sv_vcatpvf_mg"
.IX Item "sv_vcatpvf_mg"
Like \f(CW\*(C`sv_vcatpvf\*(C'\fR, but also handles 'set' magic.
.Sp
Usually used via its frontend \f(CW\*(C`sv_catpvf_mg\*(C'\fR.
.Sp
.Vb 3
\&        void    sv_vcatpvf_mg(SV *const sv,
\&                              const char *const pat,
\&                              va_list *const args)
.Ve
.IP "sv_vsetpvf" 8
.IX Xref "sv_vsetpvf"
.IX Item "sv_vsetpvf"
Works like \f(CW\*(C`sv_vcatpvf\*(C'\fR but copies the text into the \s-1SV\s0 instead of
appending it.  Does not handle 'set' magic.  See \f(CW\*(C`sv_vsetpvf_mg\*(C'\fR.
.Sp
Usually used via its frontend \f(CW\*(C`sv_setpvf\*(C'\fR.
.Sp
.Vb 2
\&        void    sv_vsetpvf(SV *const sv, const char *const pat,
\&                           va_list *const args)
.Ve
.IP "sv_vsetpvfn" 8
.IX Xref "sv_vsetpvfn"
.IX Item "sv_vsetpvfn"
Works like \f(CW\*(C`sv_vcatpvfn\*(C'\fR but copies the text into the \s-1SV\s0 instead of
appending it.
.Sp
Usually used via one of its frontends \f(CW\*(C`sv_vsetpvf\*(C'\fR and \f(CW\*(C`sv_vsetpvf_mg\*(C'\fR.
.Sp
.Vb 5
\&        void    sv_vsetpvfn(SV *const sv, const char *const pat,
\&                            const STRLEN patlen,
\&                            va_list *const args,
\&                            SV **const svargs, const I32 svmax,
\&                            bool *const maybe_tainted)
.Ve
.IP "sv_vsetpvf_mg" 8
.IX Xref "sv_vsetpvf_mg"
.IX Item "sv_vsetpvf_mg"
Like \f(CW\*(C`sv_vsetpvf\*(C'\fR, but also handles 'set' magic.
.Sp
Usually used via its frontend \f(CW\*(C`sv_setpvf_mg\*(C'\fR.
.Sp
.Vb 3
\&        void    sv_vsetpvf_mg(SV *const sv,
\&                              const char *const pat,
\&                              va_list *const args)
.Ve
.SH "Unicode Support"
.IX Header "Unicode Support"
.IP "bytes_cmp_utf8" 8
.IX Xref "bytes_cmp_utf8"
.IX Item "bytes_cmp_utf8"
Compares the sequence of characters (stored as octets) in \f(CW\*(C`b\*(C'\fR, \f(CW\*(C`blen\*(C'\fR with the
sequence of characters (stored as \s-1UTF\-8\s0) in \f(CW\*(C`u\*(C'\fR, \f(CW\*(C`ulen\*(C'\fR. Returns 0 if they are
equal, \-1 or \-2 if the first string is less than the second string, +1 or +2
if the first string is greater than the second string.
.Sp
\&\-1 or +1 is returned if the shorter string was identical to the start of the
longer string. \-2 or +2 is returned if the was a difference between characters
within the strings.
.Sp
.Vb 2
\&        int     bytes_cmp_utf8(const U8 *b, STRLEN blen,
\&                               const U8 *u, STRLEN ulen)
.Ve
.IP "bytes_from_utf8" 8
.IX Xref "bytes_from_utf8"
.IX Item "bytes_from_utf8"
Converts a string \f(CW\*(C`s\*(C'\fR of length \f(CW\*(C`len\*(C'\fR from \s-1UTF\-8\s0 into native byte encoding.
Unlike \*(L"utf8_to_bytes\*(R" but like \*(L"bytes_to_utf8\*(R", returns a pointer to
the newly-created string, and updates \f(CW\*(C`len\*(C'\fR to contain the new
length.  Returns the original string if no conversion occurs, \f(CW\*(C`len\*(C'\fR
is unchanged. Do nothing if \f(CW\*(C`is_utf8\*(C'\fR points to 0. Sets \f(CW\*(C`is_utf8\*(C'\fR to
0 if \f(CW\*(C`s\*(C'\fR is converted or consisted entirely of characters that are invariant
in utf8 (i.e., US-ASCII on non-EBCDIC machines).
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 2
\&        U8*     bytes_from_utf8(const U8 *s, STRLEN *len,
\&                                bool *is_utf8)
.Ve
.IP "bytes_to_utf8" 8
.IX Xref "bytes_to_utf8"
.IX Item "bytes_to_utf8"
Converts a string \f(CW\*(C`s\*(C'\fR of length \f(CW\*(C`len\*(C'\fR bytes from the native encoding into
\&\s-1UTF\-8\s0.
Returns a pointer to the newly-created string, and sets \f(CW\*(C`len\*(C'\fR to
reflect the new length in bytes.
.Sp
A \s-1NUL\s0 character will be written after the end of the string.
.Sp
If you want to convert to \s-1UTF\-8\s0 from encodings other than
the native (Latin1 or \s-1EBCDIC\s0),
see \*(L"sv_recode_to_utf8\*(R"().
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        U8*     bytes_to_utf8(const U8 *s, STRLEN *len)
.Ve
.IP "foldEQ_utf8" 8
.IX Xref "foldEQ_utf8"
.IX Item "foldEQ_utf8"
Returns true if the leading portions of the strings \f(CW\*(C`s1\*(C'\fR and \f(CW\*(C`s2\*(C'\fR (either or both
of which may be in \s-1UTF\-8\s0) are the same case-insensitively; false otherwise.
How far into the strings to compare is determined by other input parameters.
.Sp
If \f(CW\*(C`u1\*(C'\fR is true, the string \f(CW\*(C`s1\*(C'\fR is assumed to be in UTF\-8\-encoded Unicode;
otherwise it is assumed to be in native 8\-bit encoding.  Correspondingly for \f(CW\*(C`u2\*(C'\fR
with respect to \f(CW\*(C`s2\*(C'\fR.
.Sp
If the byte length \f(CW\*(C`l1\*(C'\fR is non-zero, it says how far into \f(CW\*(C`s1\*(C'\fR to check for fold
equality.  In other words, \f(CW\*(C`s1\*(C'\fR+\f(CW\*(C`l1\*(C'\fR will be used as a goal to reach.  The
scan will not be considered to be a match unless the goal is reached, and
scanning won't continue past that goal.  Correspondingly for \f(CW\*(C`l2\*(C'\fR with respect to
\&\f(CW\*(C`s2\*(C'\fR.
.Sp
If \f(CW\*(C`pe1\*(C'\fR is non-NULL and the pointer it points to is not \s-1NULL\s0, that pointer is
considered an end pointer beyond which scanning of \f(CW\*(C`s1\*(C'\fR will not continue under
any circumstances.  This means that if both \f(CW\*(C`l1\*(C'\fR and \f(CW\*(C`pe1\*(C'\fR are specified, and
\&\f(CW\*(C`pe1\*(C'\fR
is less than \f(CW\*(C`s1\*(C'\fR+\f(CW\*(C`l1\*(C'\fR, the match will never be successful because it can
never
get as far as its goal (and in fact is asserted against).  Correspondingly for
\&\f(CW\*(C`pe2\*(C'\fR with respect to \f(CW\*(C`s2\*(C'\fR.
.Sp
At least one of \f(CW\*(C`s1\*(C'\fR and \f(CW\*(C`s2\*(C'\fR must have a goal (at least one of \f(CW\*(C`l1\*(C'\fR and
\&\f(CW\*(C`l2\*(C'\fR must be non-zero), and if both do, both have to be
reached for a successful match.   Also, if the fold of a character is multiple
characters, all of them must be matched (see tr21 reference below for
\&'folding').
.Sp
Upon a successful match, if \f(CW\*(C`pe1\*(C'\fR is non-NULL,
it will be set to point to the beginning of the \fInext\fR character of \f(CW\*(C`s1\*(C'\fR
beyond what was matched.  Correspondingly for \f(CW\*(C`pe2\*(C'\fR and \f(CW\*(C`s2\*(C'\fR.
.Sp
For case-insensitiveness, the \*(L"casefolding\*(R" of Unicode is used
instead of upper/lowercasing both the characters, see
<http://www.unicode.org/unicode/reports/tr21/> (Case Mappings).
.Sp
.Vb 3
\&        I32     foldEQ_utf8(const char *s1, char **pe1, UV l1,
\&                            bool u1, const char *s2, char **pe2,
\&                            UV l2, bool u2)
.Ve
.IP "is_ascii_string" 8
.IX Xref "is_ascii_string"
.IX Item "is_ascii_string"
Returns true if the first \f(CW\*(C`len\*(C'\fR bytes of the string \f(CW\*(C`s\*(C'\fR are the same whether
or not the string is encoded in \s-1UTF\-8\s0 (or UTF-EBCDIC on \s-1EBCDIC\s0 machines).  That
is, if they are invariant.  On ASCII-ish machines, only \s-1ASCII\s0 characters
fit this definition, hence the function's name.
.Sp
If \f(CW\*(C`len\*(C'\fR is 0, it will be calculated using \f(CWstrlen(s)\fR.
.Sp
See also \*(L"is_utf8_string\*(R"(), \*(L"is_utf8_string_loclen\*(R"(), and \*(L"is_utf8_string_loc\*(R"().
.Sp
.Vb 1
\&        bool    is_ascii_string(const U8 *s, STRLEN len)
.Ve
.IP "is_utf8_char" 8
.IX Xref "is_utf8_char"
.IX Item "is_utf8_char"
\&\s-1DEPRECATED\s0!
.Sp
Tests if some arbitrary number of bytes begins in a valid \s-1UTF\-8\s0
character.  Note that an \s-1INVARIANT\s0 (i.e. \s-1ASCII\s0 on non-EBCDIC machines)
character is a valid \s-1UTF\-8\s0 character.  The actual number of bytes in the \s-1UTF\-8\s0
character will be returned if it is valid, otherwise 0.
.Sp
This function is deprecated due to the possibility that malformed input could
cause reading beyond the end of the input buffer.  Use \*(L"is_utf8_char_buf\*(R"
instead.
.Sp
.Vb 1
\&        STRLEN  is_utf8_char(const U8 *s)
.Ve
.IP "is_utf8_char_buf" 8
.IX Xref "is_utf8_char_buf"
.IX Item "is_utf8_char_buf"
Returns the number of bytes that comprise the first \s-1UTF\-8\s0 encoded character in
buffer \f(CW\*(C`buf\*(C'\fR.  \f(CW\*(C`buf_end\*(C'\fR should point to one position beyond the end of the
buffer.  0 is returned if \f(CW\*(C`buf\*(C'\fR does not point to a complete, valid \s-1UTF\-8\s0
encoded character.
.Sp
Note that an \s-1INVARIANT\s0 character (i.e. \s-1ASCII\s0 on non-EBCDIC
machines) is a valid \s-1UTF\-8\s0 character.
.Sp
.Vb 2
\&        STRLEN  is_utf8_char_buf(const U8 *buf,
\&                                 const U8 *buf_end)
.Ve
.IP "is_utf8_string" 8
.IX Xref "is_utf8_string"
.IX Item "is_utf8_string"
Returns true if the first \f(CW\*(C`len\*(C'\fR bytes of string \f(CW\*(C`s\*(C'\fR form a valid
\&\s-1UTF\-8\s0 string, false otherwise.  If \f(CW\*(C`len\*(C'\fR is 0, it will be calculated
using \f(CWstrlen(s)\fR (which means if you use this option, that \f(CW\*(C`s\*(C'\fR has to have a
terminating \s-1NUL\s0 byte).  Note that all characters being \s-1ASCII\s0 constitute 'a
valid \s-1UTF\-8\s0 string'.
.Sp
See also \*(L"is_ascii_string\*(R"(), \*(L"is_utf8_string_loclen\*(R"(), and \*(L"is_utf8_string_loc\*(R"().
.Sp
.Vb 1
\&        bool    is_utf8_string(const U8 *s, STRLEN len)
.Ve
.IP "is_utf8_string_loc" 8
.IX Xref "is_utf8_string_loc"
.IX Item "is_utf8_string_loc"
Like \*(L"is_utf8_string\*(R" but stores the location of the failure (in the
case of \*(L"utf8ness failure\*(R") or the location \f(CW\*(C`s\*(C'\fR+\f(CW\*(C`len\*(C'\fR (in the case of
\&\*(L"utf8ness success\*(R") in the \f(CW\*(C`ep\*(C'\fR.
.Sp
See also \*(L"is_utf8_string_loclen\*(R"() and \*(L"is_utf8_string\*(R"().
.Sp
.Vb 2
\&        bool    is_utf8_string_loc(const U8 *s, STRLEN len,
\&                                   const U8 **p)
.Ve
.IP "is_utf8_string_loclen" 8
.IX Xref "is_utf8_string_loclen"
.IX Item "is_utf8_string_loclen"
Like \*(L"is_utf8_string\*(R"() but stores the location of the failure (in the
case of \*(L"utf8ness failure\*(R") or the location \f(CW\*(C`s\*(C'\fR+\f(CW\*(C`len\*(C'\fR (in the case of
\&\*(L"utf8ness success\*(R") in the \f(CW\*(C`ep\*(C'\fR, and the number of \s-1UTF\-8\s0
encoded characters in the \f(CW\*(C`el\*(C'\fR.
.Sp
See also \*(L"is_utf8_string_loc\*(R"() and \*(L"is_utf8_string\*(R"().
.Sp
.Vb 2
\&        bool    is_utf8_string_loclen(const U8 *s, STRLEN len,
\&                                      const U8 **ep, STRLEN *el)
.Ve
.IP "pv_uni_display" 8
.IX Xref "pv_uni_display"
.IX Item "pv_uni_display"
Build to the scalar \f(CW\*(C`dsv\*(C'\fR a displayable version of the string \f(CW\*(C`spv\*(C'\fR,
length \f(CW\*(C`len\*(C'\fR, the displayable version being at most \f(CW\*(C`pvlim\*(C'\fR bytes long
(if longer, the rest is truncated and \*(L"...\*(R" will be appended).
.Sp
The \f(CW\*(C`flags\*(C'\fR argument can have \s-1UNI_DISPLAY_ISPRINT\s0 set to display
\&\fIisPRINT()\fRable characters as themselves, \s-1UNI_DISPLAY_BACKSLASH\s0
to display the \e\e[nrfta\e\e] as the backslashed versions (like '\en')
(\s-1UNI_DISPLAY_BACKSLASH\s0 is preferred over \s-1UNI_DISPLAY_ISPRINT\s0 for \e\e).
\&\s-1UNI_DISPLAY_QQ\s0 (and its alias \s-1UNI_DISPLAY_REGEX\s0) have both
\&\s-1UNI_DISPLAY_BACKSLASH\s0 and \s-1UNI_DISPLAY_ISPRINT\s0 turned on.
.Sp
The pointer to the \s-1PV\s0 of the \f(CW\*(C`dsv\*(C'\fR is returned.
.Sp
.Vb 3
\&        char*   pv_uni_display(SV *dsv, const U8 *spv,
\&                               STRLEN len, STRLEN pvlim,
\&                               UV flags)
.Ve
.IP "sv_cat_decode" 8
.IX Xref "sv_cat_decode"
.IX Item "sv_cat_decode"
The encoding is assumed to be an Encode object, the \s-1PV\s0 of the ssv is
assumed to be octets in that encoding and decoding the input starts
from the position which (\s-1PV\s0 + *offset) pointed to.  The dsv will be
concatenated the decoded \s-1UTF\-8\s0 string from ssv.  Decoding will terminate
when the string tstr appears in decoding output or the input ends on
the \s-1PV\s0 of the ssv.  The value which the offset points will be modified
to the last input position on the ssv.
.Sp
Returns \s-1TRUE\s0 if the terminator was found, else returns \s-1FALSE\s0.
.Sp
.Vb 2
\&        bool    sv_cat_decode(SV* dsv, SV *encoding, SV *ssv,
\&                              int *offset, char* tstr, int tlen)
.Ve
.IP "sv_recode_to_utf8" 8
.IX Xref "sv_recode_to_utf8"
.IX Item "sv_recode_to_utf8"
The encoding is assumed to be an Encode object, on entry the \s-1PV\s0
of the sv is assumed to be octets in that encoding, and the sv
will be converted into Unicode (and \s-1UTF\-8\s0).
.Sp
If the sv already is \s-1UTF\-8\s0 (or if it is not \s-1POK\s0), or if the encoding
is not a reference, nothing is done to the sv.  If the encoding is not
an \f(CW\*(C`Encode::XS\*(C'\fR Encoding object, bad things will happen.
(See \fIlib/encoding.pm\fR and Encode.)
.Sp
The \s-1PV\s0 of the sv is returned.
.Sp
.Vb 1
\&        char*   sv_recode_to_utf8(SV* sv, SV *encoding)
.Ve
.IP "sv_uni_display" 8
.IX Xref "sv_uni_display"
.IX Item "sv_uni_display"
Build to the scalar \f(CW\*(C`dsv\*(C'\fR a displayable version of the scalar \f(CW\*(C`sv\*(C'\fR,
the displayable version being at most \f(CW\*(C`pvlim\*(C'\fR bytes long
(if longer, the rest is truncated and \*(L"...\*(R" will be appended).
.Sp
The \f(CW\*(C`flags\*(C'\fR argument is as in \*(L"pv_uni_display\*(R"().
.Sp
The pointer to the \s-1PV\s0 of the \f(CW\*(C`dsv\*(C'\fR is returned.
.Sp
.Vb 2
\&        char*   sv_uni_display(SV *dsv, SV *ssv, STRLEN pvlim,
\&                               UV flags)
.Ve
.IP "to_utf8_case" 8
.IX Xref "to_utf8_case"
.IX Item "to_utf8_case"
The \f(CW\*(C`p\*(C'\fR contains the pointer to the \s-1UTF\-8\s0 string encoding
the character that is being converted.  This routine assumes that the character
at \f(CW\*(C`p\*(C'\fR is well-formed.
.Sp
The \f(CW\*(C`ustrp\*(C'\fR is a pointer to the character buffer to put the
conversion result to.  The \f(CW\*(C`lenp\*(C'\fR is a pointer to the length
of the result.
.Sp
The \f(CW\*(C`swashp\*(C'\fR is a pointer to the swash to use.
.Sp
Both the special and normal mappings are stored in \fIlib/unicore/To/Foo.pl\fR,
and loaded by \s-1SWASHNEW\s0, using \fIlib/utf8_heavy.pl\fR.  The \f(CW\*(C`special\*(C'\fR (usually,
but not always, a multicharacter mapping), is tried first.
.Sp
The \f(CW\*(C`special\*(C'\fR is a string like \*(L"utf8::ToSpecLower\*(R", which means the
hash \f(CW%utf8::ToSpecLower\fR.  The access to the hash is through
\&\fIPerl_to_utf8_case()\fR.
.Sp
The \f(CW\*(C`normal\*(C'\fR is a string like \*(L"ToLower\*(R" which means the swash
\&\f(CW%utf8::ToLower\fR.
.Sp
.Vb 4
\&        UV      to_utf8_case(const U8 *p, U8* ustrp,
\&                             STRLEN *lenp, SV **swashp,
\&                             const char *normal,
\&                             const char *special)
.Ve
.IP "to_utf8_fold" 8
.IX Xref "to_utf8_fold"
.IX Item "to_utf8_fold"
Convert the \s-1UTF\-8\s0 encoded character at \f(CW\*(C`p\*(C'\fR to its foldcase version and
store that in \s-1UTF\-8\s0 in \f(CW\*(C`ustrp\*(C'\fR and its length in bytes in \f(CW\*(C`lenp\*(C'\fR.  Note
that the \f(CW\*(C`ustrp\*(C'\fR needs to be at least \s-1UTF8_MAXBYTES_CASE+1\s0 bytes since the
foldcase version may be longer than the original character (up to
three characters).
.Sp
The first character of the foldcased version is returned
(but note, as explained above, that there may be more.)
.Sp
The character at \f(CW\*(C`p\*(C'\fR is assumed by this routine to be well-formed.
.Sp
.Vb 2
\&        UV      to_utf8_fold(const U8 *p, U8* ustrp,
\&                             STRLEN *lenp)
.Ve
.IP "to_utf8_lower" 8
.IX Xref "to_utf8_lower"
.IX Item "to_utf8_lower"
Convert the \s-1UTF\-8\s0 encoded character at \f(CW\*(C`p\*(C'\fR to its lowercase version and
store that in \s-1UTF\-8\s0 in ustrp and its length in bytes in \f(CW\*(C`lenp\*(C'\fR.  Note
that the \f(CW\*(C`ustrp\*(C'\fR needs to be at least \s-1UTF8_MAXBYTES_CASE+1\s0 bytes since the
lowercase version may be longer than the original character.
.Sp
The first character of the lowercased version is returned
(but note, as explained above, that there may be more.)
.Sp
The character at \f(CW\*(C`p\*(C'\fR is assumed by this routine to be well-formed.
.Sp
.Vb 2
\&        UV      to_utf8_lower(const U8 *p, U8* ustrp,
\&                              STRLEN *lenp)
.Ve
.IP "to_utf8_title" 8
.IX Xref "to_utf8_title"
.IX Item "to_utf8_title"
Convert the \s-1UTF\-8\s0 encoded character at \f(CW\*(C`p\*(C'\fR to its titlecase version and
store that in \s-1UTF\-8\s0 in \f(CW\*(C`ustrp\*(C'\fR and its length in bytes in \f(CW\*(C`lenp\*(C'\fR.  Note
that the \f(CW\*(C`ustrp\*(C'\fR needs to be at least \s-1UTF8_MAXBYTES_CASE+1\s0 bytes since the
titlecase version may be longer than the original character.
.Sp
The first character of the titlecased version is returned
(but note, as explained above, that there may be more.)
.Sp
The character at \f(CW\*(C`p\*(C'\fR is assumed by this routine to be well-formed.
.Sp
.Vb 2
\&        UV      to_utf8_title(const U8 *p, U8* ustrp,
\&                              STRLEN *lenp)
.Ve
.IP "to_utf8_upper" 8
.IX Xref "to_utf8_upper"
.IX Item "to_utf8_upper"
Convert the \s-1UTF\-8\s0 encoded character at \f(CW\*(C`p\*(C'\fR to its uppercase version and
store that in \s-1UTF\-8\s0 in \f(CW\*(C`ustrp\*(C'\fR and its length in bytes in \f(CW\*(C`lenp\*(C'\fR.  Note
that the ustrp needs to be at least \s-1UTF8_MAXBYTES_CASE+1\s0 bytes since
the uppercase version may be longer than the original character.
.Sp
The first character of the uppercased version is returned
(but note, as explained above, that there may be more.)
.Sp
The character at \f(CW\*(C`p\*(C'\fR is assumed by this routine to be well-formed.
.Sp
.Vb 2
\&        UV      to_utf8_upper(const U8 *p, U8* ustrp,
\&                              STRLEN *lenp)
.Ve
.IP "utf8n_to_uvchr" 8
.IX Xref "utf8n_to_uvchr"
.IX Item "utf8n_to_uvchr"
Returns the native character value of the first character in the string
\&\f(CW\*(C`s\*(C'\fR
which is assumed to be in \s-1UTF\-8\s0 encoding; \f(CW\*(C`retlen\*(C'\fR will be set to the
length, in bytes, of that character.
.Sp
\&\f(CW\*(C`length\*(C'\fR and \f(CW\*(C`flags\*(C'\fR are the same as \*(L"utf8n_to_uvuni\*(R"().
.Sp
.Vb 2
\&        UV      utf8n_to_uvchr(const U8 *s, STRLEN curlen,
\&                               STRLEN *retlen, U32 flags)
.Ve
.IP "utf8n_to_uvuni" 8
.IX Xref "utf8n_to_uvuni"
.IX Item "utf8n_to_uvuni"
Bottom level \s-1UTF\-8\s0 decode routine.
Returns the code point value of the first character in the string \f(CW\*(C`s\*(C'\fR,
which is assumed to be in \s-1UTF\-8\s0 (or UTF-EBCDIC) encoding, and no longer than
\&\f(CW\*(C`curlen\*(C'\fR bytes; \f(CW*retlen\fR (if \f(CW\*(C`retlen\*(C'\fR isn't \s-1NULL\s0) will be set to
the length, in bytes, of that character.
.Sp
The value of \f(CW\*(C`flags\*(C'\fR determines the behavior when \f(CW\*(C`s\*(C'\fR does not point to a
well-formed \s-1UTF\-8\s0 character.  If \f(CW\*(C`flags\*(C'\fR is 0, when a malformation is found,
zero is returned and \f(CW*retlen\fR is set so that (\f(CW\*(C`s\*(C'\fR\ +\ \f(CW*retlen\fR) is the
next possible position in \f(CW\*(C`s\*(C'\fR that could begin a non-malformed character.
Also, if \s-1UTF\-8\s0 warnings haven't been lexically disabled, a warning is raised.
.Sp
Various \s-1ALLOW\s0 flags can be set in \f(CW\*(C`flags\*(C'\fR to allow (and not warn on)
individual types of malformations, such as the sequence being overlong (that
is, when there is a shorter sequence that can express the same code point;
overlong sequences are expressly forbidden in the \s-1UTF\-8\s0 standard due to
potential security issues).  Another malformation example is the first byte of
a character not being a legal first byte.  See \fIutf8.h\fR for the list of such
flags.  For allowed 0 length strings, this function returns 0; for allowed
overlong sequences, the computed code point is returned; for all other allowed
malformations, the Unicode \s-1REPLACEMENT\s0 \s-1CHARACTER\s0 is returned, as these have no
determinable reasonable value.
.Sp
The \s-1UTF8_CHECK_ONLY\s0 flag overrides the behavior when a non-allowed (by other
flags) malformation is found.  If this flag is set, the routine assumes that
the caller will raise a warning, and this function will silently just set
\&\f(CW\*(C`retlen\*(C'\fR to \f(CW\*(C`\-1\*(C'\fR and return zero.
.Sp
Certain code points are considered problematic.  These are Unicode surrogates,
Unicode non-characters, and code points above the Unicode maximum of 0x10FFFF.
By default these are considered regular code points, but certain situations
warrant special handling for them.  If \f(CW\*(C`flags\*(C'\fR contains
\&\s-1UTF8_DISALLOW_ILLEGAL_INTERCHANGE\s0, all three classes are treated as
malformations and handled as such.  The flags \s-1UTF8_DISALLOW_SURROGATE\s0,
\&\s-1UTF8_DISALLOW_NONCHAR\s0, and \s-1UTF8_DISALLOW_SUPER\s0 (meaning above the legal Unicode
maximum) can be set to disallow these categories individually.
.Sp
The flags \s-1UTF8_WARN_ILLEGAL_INTERCHANGE\s0, \s-1UTF8_WARN_SURROGATE\s0,
\&\s-1UTF8_WARN_NONCHAR\s0, and \s-1UTF8_WARN_SUPER\s0 will cause warning messages to be raised
for their respective categories, but otherwise the code points are considered
valid (not malformations).  To get a category to both be treated as a
malformation and raise a warning, specify both the \s-1WARN\s0 and \s-1DISALLOW\s0 flags.
(But note that warnings are not raised if lexically disabled nor if
\&\s-1UTF8_CHECK_ONLY\s0 is also specified.)
.Sp
Very large code points (above 0x7FFF_FFFF) are considered more problematic than
the others that are above the Unicode legal maximum.  There are several
reasons: they requre at least 32 bits to represent them on \s-1ASCII\s0 platforms, are
not representable at all on \s-1EBCDIC\s0 platforms, and the original \s-1UTF\-8\s0
specification never went above this number (the current 0x10FFFF limit was
imposed later).  (The smaller ones, those that fit into 32 bits, are
representable by a \s-1UV\s0 on \s-1ASCII\s0 platforms, but not by an \s-1IV\s0, which means that
the number of operations that can be performed on them is quite restricted.)
The \s-1UTF\-8\s0 encoding on \s-1ASCII\s0 platforms for these large code points begins with a
byte containing 0xFE or 0xFF.  The \s-1UTF8_DISALLOW_FE_FF\s0 flag will cause them to
be treated as malformations, while allowing smaller above-Unicode code points.
(Of course \s-1UTF8_DISALLOW_SUPER\s0 will treat all above-Unicode code points,
including these, as malformations.) Similarly, \s-1UTF8_WARN_FE_FF\s0 acts just like
the other \s-1WARN\s0 flags, but applies just to these code points.
.Sp
All other code points corresponding to Unicode characters, including private
use and those yet to be assigned, are never considered malformed and never
warn.
.Sp
Most code should use \*(L"utf8_to_uvchr_buf\*(R"() rather than call this directly.
.Sp
.Vb 2
\&        UV      utf8n_to_uvuni(const U8 *s, STRLEN curlen,
\&                               STRLEN *retlen, U32 flags)
.Ve
.IP "utf8_distance" 8
.IX Xref "utf8_distance"
.IX Item "utf8_distance"
Returns the number of \s-1UTF\-8\s0 characters between the \s-1UTF\-8\s0 pointers \f(CW\*(C`a\*(C'\fR
and \f(CW\*(C`b\*(C'\fR.
.Sp
\&\s-1WARNING:\s0 use only if you *know* that the pointers point inside the
same \s-1UTF\-8\s0 buffer.
.Sp
.Vb 1
\&        IV      utf8_distance(const U8 *a, const U8 *b)
.Ve
.IP "utf8_hop" 8
.IX Xref "utf8_hop"
.IX Item "utf8_hop"
Return the \s-1UTF\-8\s0 pointer \f(CW\*(C`s\*(C'\fR displaced by \f(CW\*(C`off\*(C'\fR characters, either
forward or backward.
.Sp
\&\s-1WARNING:\s0 do not use the following unless you *know* \f(CW\*(C`off\*(C'\fR is within
the \s-1UTF\-8\s0 data pointed to by \f(CW\*(C`s\*(C'\fR *and* that on entry \f(CW\*(C`s\*(C'\fR is aligned
on the first byte of character or just after the last byte of a character.
.Sp
.Vb 1
\&        U8*     utf8_hop(const U8 *s, I32 off)
.Ve
.IP "utf8_length" 8
.IX Xref "utf8_length"
.IX Item "utf8_length"
Return the length of the \s-1UTF\-8\s0 char encoded string \f(CW\*(C`s\*(C'\fR in characters.
Stops at \f(CW\*(C`e\*(C'\fR (inclusive).  If \f(CW\*(C`e < s\*(C'\fR or if the scan would end
up past \f(CW\*(C`e\*(C'\fR, croaks.
.Sp
.Vb 1
\&        STRLEN  utf8_length(const U8* s, const U8 *e)
.Ve
.IP "utf8_to_bytes" 8
.IX Xref "utf8_to_bytes"
.IX Item "utf8_to_bytes"
Converts a string \f(CW\*(C`s\*(C'\fR of length \f(CW\*(C`len\*(C'\fR from \s-1UTF\-8\s0 into native byte encoding.
Unlike \*(L"bytes_to_utf8\*(R", this over-writes the original string, and
updates \f(CW\*(C`len\*(C'\fR to contain the new length.
Returns zero on failure, setting \f(CW\*(C`len\*(C'\fR to \-1.
.Sp
If you need a copy of the string, see \*(L"bytes_from_utf8\*(R".
.Sp
\&\s-1NOTE:\s0 this function is experimental and may change or be
removed without notice.
.Sp
.Vb 1
\&        U8*     utf8_to_bytes(U8 *s, STRLEN *len)
.Ve
.IP "utf8_to_uvchr" 8
.IX Xref "utf8_to_uvchr"
.IX Item "utf8_to_uvchr"
\&\s-1DEPRECATED\s0!
.Sp
Returns the native code point of the first character in the string \f(CW\*(C`s\*(C'\fR
which is assumed to be in \s-1UTF\-8\s0 encoding; \f(CW\*(C`retlen\*(C'\fR will be set to the
length, in bytes, of that character.
.Sp
Some, but not all, \s-1UTF\-8\s0 malformations are detected, and in fact, some
malformed input could cause reading beyond the end of the input buffer, which
is why this function is deprecated.  Use \*(L"utf8_to_uvchr_buf\*(R" instead.
.Sp
If \f(CW\*(C`s\*(C'\fR points to one of the detected malformations, and \s-1UTF8\s0 warnings are
enabled, zero is returned and \f(CW*retlen\fR is set (if \f(CW\*(C`retlen\*(C'\fR isn't
\&\s-1NULL\s0) to \-1.  If those warnings are off, the computed value if well-defined (or
the Unicode \s-1REPLACEMENT\s0 \s-1CHARACTER\s0, if not) is silently returned, and \f(CW*retlen\fR
is set (if \f(CW\*(C`retlen\*(C'\fR isn't \s-1NULL\s0) so that (\f(CW\*(C`s\*(C'\fR\ +\ \f(CW*retlen\fR) is the
next possible position in \f(CW\*(C`s\*(C'\fR that could begin a non-malformed character.
See \*(L"utf8n_to_uvuni\*(R" for details on when the \s-1REPLACEMENT\s0 \s-1CHARACTER\s0 is returned.
.Sp
.Vb 1
\&        UV      utf8_to_uvchr(const U8 *s, STRLEN *retlen)
.Ve
.IP "utf8_to_uvchr_buf" 8
.IX Xref "utf8_to_uvchr_buf"
.IX Item "utf8_to_uvchr_buf"
Returns the native code point of the first character in the string \f(CW\*(C`s\*(C'\fR which
is assumed to be in \s-1UTF\-8\s0 encoding; \f(CW\*(C`send\*(C'\fR points to 1 beyond the end of \f(CW\*(C`s\*(C'\fR.
\&\f(CW*retlen\fR will be set to the length, in bytes, of that character.
.Sp
If \f(CW\*(C`s\*(C'\fR does not point to a well-formed \s-1UTF\-8\s0 character and \s-1UTF8\s0 warnings are
enabled, zero is returned and \f(CW*retlen\fR is set (if \f(CW\*(C`retlen\*(C'\fR isn't
\&\s-1NULL\s0) to \-1.  If those warnings are off, the computed value if well-defined (or
the Unicode \s-1REPLACEMENT\s0 \s-1CHARACTER\s0, if not) is silently returned, and \f(CW*retlen\fR
is set (if \f(CW\*(C`retlen\*(C'\fR isn't \s-1NULL\s0) so that (\f(CW\*(C`s\*(C'\fR\ +\ \f(CW*retlen\fR) is the
next possible position in \f(CW\*(C`s\*(C'\fR that could begin a non-malformed character.
See \*(L"utf8n_to_uvuni\*(R" for details on when the \s-1REPLACEMENT\s0 \s-1CHARACTER\s0 is returned.
.Sp
.Vb 2
\&        UV      utf8_to_uvchr_buf(const U8 *s, const U8 *send,
\&                                  STRLEN *retlen)
.Ve
.IP "utf8_to_uvuni" 8
.IX Xref "utf8_to_uvuni"
.IX Item "utf8_to_uvuni"
\&\s-1DEPRECATED\s0!
.Sp
Returns the Unicode code point of the first character in the string \f(CW\*(C`s\*(C'\fR
which is assumed to be in \s-1UTF\-8\s0 encoding; \f(CW\*(C`retlen\*(C'\fR will be set to the
length, in bytes, of that character.
.Sp
This function should only be used when the returned \s-1UV\s0 is considered
an index into the Unicode semantic tables (e.g. swashes).
.Sp
Some, but not all, \s-1UTF\-8\s0 malformations are detected, and in fact, some
malformed input could cause reading beyond the end of the input buffer, which
is why this function is deprecated.  Use \*(L"utf8_to_uvuni_buf\*(R" instead.
.Sp
If \f(CW\*(C`s\*(C'\fR points to one of the detected malformations, and \s-1UTF8\s0 warnings are
enabled, zero is returned and \f(CW*retlen\fR is set (if \f(CW\*(C`retlen\*(C'\fR doesn't point to
\&\s-1NULL\s0) to \-1.  If those warnings are off, the computed value if well-defined (or
the Unicode \s-1REPLACEMENT\s0 \s-1CHARACTER\s0, if not) is silently returned, and \f(CW*retlen\fR
is set (if \f(CW\*(C`retlen\*(C'\fR isn't \s-1NULL\s0) so that (\f(CW\*(C`s\*(C'\fR\ +\ \f(CW*retlen\fR) is the
next possible position in \f(CW\*(C`s\*(C'\fR that could begin a non-malformed character.
See \*(L"utf8n_to_uvuni\*(R" for details on when the \s-1REPLACEMENT\s0 \s-1CHARACTER\s0 is returned.
.Sp
.Vb 1
\&        UV      utf8_to_uvuni(const U8 *s, STRLEN *retlen)
.Ve
.IP "utf8_to_uvuni_buf" 8
.IX Xref "utf8_to_uvuni_buf"
.IX Item "utf8_to_uvuni_buf"
Returns the Unicode code point of the first character in the string \f(CW\*(C`s\*(C'\fR which
is assumed to be in \s-1UTF\-8\s0 encoding; \f(CW\*(C`send\*(C'\fR points to 1 beyond the end of \f(CW\*(C`s\*(C'\fR.
\&\f(CW\*(C`retlen\*(C'\fR will be set to the length, in bytes, of that character.
.Sp
This function should only be used when the returned \s-1UV\s0 is considered
an index into the Unicode semantic tables (e.g. swashes).
.Sp
If \f(CW\*(C`s\*(C'\fR does not point to a well-formed \s-1UTF\-8\s0 character and \s-1UTF8\s0 warnings are
enabled, zero is returned and \f(CW*retlen\fR is set (if \f(CW\*(C`retlen\*(C'\fR isn't
\&\s-1NULL\s0) to \-1.  If those warnings are off, the computed value if well-defined (or
the Unicode \s-1REPLACEMENT\s0 \s-1CHARACTER\s0, if not) is silently returned, and \f(CW*retlen\fR
is set (if \f(CW\*(C`retlen\*(C'\fR isn't \s-1NULL\s0) so that (\f(CW\*(C`s\*(C'\fR\ +\ \f(CW*retlen\fR) is the
next possible position in \f(CW\*(C`s\*(C'\fR that could begin a non-malformed character.
See \*(L"utf8n_to_uvuni\*(R" for details on when the \s-1REPLACEMENT\s0 \s-1CHARACTER\s0 is returned.
.Sp
.Vb 2
\&        UV      utf8_to_uvuni_buf(const U8 *s, const U8 *send,
\&                                  STRLEN *retlen)
.Ve
.IP "uvchr_to_utf8" 8
.IX Xref "uvchr_to_utf8"
.IX Item "uvchr_to_utf8"
Adds the \s-1UTF\-8\s0 representation of the Native code point \f(CW\*(C`uv\*(C'\fR to the end
of the string \f(CW\*(C`d\*(C'\fR; \f(CW\*(C`d\*(C'\fR should have at least \f(CW\*(C`UTF8_MAXBYTES+1\*(C'\fR free
bytes available. The return value is the pointer to the byte after the
end of the new character. In other words,
.Sp
.Vb 1
\&    d = uvchr_to_utf8(d, uv);
.Ve
.Sp
is the recommended wide native character-aware way of saying
.Sp
.Vb 1
\&    *(d++) = uv;
\&
\&        U8*     uvchr_to_utf8(U8 *d, UV uv)
.Ve
.IP "uvuni_to_utf8_flags" 8
.IX Xref "uvuni_to_utf8_flags"
.IX Item "uvuni_to_utf8_flags"
Adds the \s-1UTF\-8\s0 representation of the code point \f(CW\*(C`uv\*(C'\fR to the end
of the string \f(CW\*(C`d\*(C'\fR; \f(CW\*(C`d\*(C'\fR should have at least \f(CW\*(C`UTF8_MAXBYTES+1\*(C'\fR free
bytes available. The return value is the pointer to the byte after the
end of the new character. In other words,
.Sp
.Vb 1
\&    d = uvuni_to_utf8_flags(d, uv, flags);
.Ve
.Sp
or, in most cases,
.Sp
.Vb 1
\&    d = uvuni_to_utf8(d, uv);
.Ve
.Sp
(which is equivalent to)
.Sp
.Vb 1
\&    d = uvuni_to_utf8_flags(d, uv, 0);
.Ve
.Sp
This is the recommended Unicode-aware way of saying
.Sp
.Vb 1
\&    *(d++) = uv;
.Ve
.Sp
This function will convert to \s-1UTF\-8\s0 (and not warn) even code points that aren't
legal Unicode or are problematic, unless \f(CW\*(C`flags\*(C'\fR contains one or more of the
following flags:
.Sp
If \f(CW\*(C`uv\*(C'\fR is a Unicode surrogate code point and \s-1UNICODE_WARN_SURROGATE\s0 is set,
the function will raise a warning, provided \s-1UTF8\s0 warnings are enabled.  If instead
\&\s-1UNICODE_DISALLOW_SURROGATE\s0 is set, the function will fail and return \s-1NULL\s0.
If both flags are set, the function will both warn and return \s-1NULL\s0.
.Sp
The \s-1UNICODE_WARN_NONCHAR\s0 and \s-1UNICODE_DISALLOW_NONCHAR\s0 flags correspondingly
affect how the function handles a Unicode non-character.  And, likewise for the
\&\s-1UNICODE_WARN_SUPER\s0 and \s-1UNICODE_DISALLOW_SUPER\s0 flags, and code points that are
above the Unicode maximum of 0x10FFFF.  Code points above 0x7FFF_FFFF (which are
even less portable) can be warned and/or disallowed even if other above-Unicode
code points are accepted by the \s-1UNICODE_WARN_FE_FF\s0 and \s-1UNICODE_DISALLOW_FE_FF\s0
flags.
.Sp
And finally, the flag \s-1UNICODE_WARN_ILLEGAL_INTERCHANGE\s0 selects all four of the
above \s-1WARN\s0 flags; and \s-1UNICODE_DISALLOW_ILLEGAL_INTERCHANGE\s0 selects all four
\&\s-1DISALLOW\s0 flags.
.Sp
.Vb 1
\&        U8*     uvuni_to_utf8_flags(U8 *d, UV uv, UV flags)
.Ve
.ie n .SH "Variables created by ""xsubpp"" and ""xsubpp"" internal functions"
.el .SH "Variables created by \f(CWxsubpp\fP and \f(CWxsubpp\fP internal functions"
.IX Header "Variables created by xsubpp and xsubpp internal functions"
.IP "ax" 8
.IX Xref "ax"
.IX Item "ax"
Variable which is setup by \f(CW\*(C`xsubpp\*(C'\fR to indicate the stack base offset,
used by the \f(CW\*(C`ST\*(C'\fR, \f(CW\*(C`XSprePUSH\*(C'\fR and \f(CW\*(C`XSRETURN\*(C'\fR macros.  The \f(CW\*(C`dMARK\*(C'\fR macro
must be called prior to setup the \f(CW\*(C`MARK\*(C'\fR variable.
.Sp
.Vb 1
\&        I32     ax
.Ve
.IP "\s-1CLASS\s0" 8
.IX Xref "CLASS"
.IX Item "CLASS"
Variable which is setup by \f(CW\*(C`xsubpp\*(C'\fR to indicate the 
class name for a \*(C+ \s-1XS\s0 constructor.  This is always a \f(CW\*(C`char*\*(C'\fR.  See \f(CW\*(C`THIS\*(C'\fR.
.Sp
.Vb 1
\&        char*   CLASS
.Ve
.IP "dAX" 8
.IX Xref "dAX"
.IX Item "dAX"
Sets up the \f(CW\*(C`ax\*(C'\fR variable.
This is usually handled automatically by \f(CW\*(C`xsubpp\*(C'\fR by calling \f(CW\*(C`dXSARGS\*(C'\fR.
.Sp
.Vb 1
\&                dAX;
.Ve
.IP "dAXMARK" 8
.IX Xref "dAXMARK"
.IX Item "dAXMARK"
Sets up the \f(CW\*(C`ax\*(C'\fR variable and stack marker variable \f(CW\*(C`mark\*(C'\fR.
This is usually handled automatically by \f(CW\*(C`xsubpp\*(C'\fR by calling \f(CW\*(C`dXSARGS\*(C'\fR.
.Sp
.Vb 1
\&                dAXMARK;
.Ve
.IP "dITEMS" 8
.IX Xref "dITEMS"
.IX Item "dITEMS"
Sets up the \f(CW\*(C`items\*(C'\fR variable.
This is usually handled automatically by \f(CW\*(C`xsubpp\*(C'\fR by calling \f(CW\*(C`dXSARGS\*(C'\fR.
.Sp
.Vb 1
\&                dITEMS;
.Ve
.IP "dUNDERBAR" 8
.IX Xref "dUNDERBAR"
.IX Item "dUNDERBAR"
Sets up any variable needed by the \f(CW\*(C`UNDERBAR\*(C'\fR macro. It used to define
\&\f(CW\*(C`padoff_du\*(C'\fR, but it is currently a noop. However, it is strongly advised
to still use it for ensuring past and future compatibility.
.Sp
.Vb 1
\&                dUNDERBAR;
.Ve
.IP "dXSARGS" 8
.IX Xref "dXSARGS"
.IX Item "dXSARGS"
Sets up stack and mark pointers for an \s-1XSUB\s0, calling dSP and dMARK.
Sets up the \f(CW\*(C`ax\*(C'\fR and \f(CW\*(C`items\*(C'\fR variables by calling \f(CW\*(C`dAX\*(C'\fR and \f(CW\*(C`dITEMS\*(C'\fR.
This is usually handled automatically by \f(CW\*(C`xsubpp\*(C'\fR.
.Sp
.Vb 1
\&                dXSARGS;
.Ve
.IP "dXSI32" 8
.IX Xref "dXSI32"
.IX Item "dXSI32"
Sets up the \f(CW\*(C`ix\*(C'\fR variable for an \s-1XSUB\s0 which has aliases.  This is usually
handled automatically by \f(CW\*(C`xsubpp\*(C'\fR.
.Sp
.Vb 1
\&                dXSI32;
.Ve
.IP "items" 8
.IX Xref "items"
.IX Item "items"
Variable which is setup by \f(CW\*(C`xsubpp\*(C'\fR to indicate the number of 
items on the stack.  See \*(L"Variable-length Parameter Lists\*(R" in perlxs.
.Sp
.Vb 1
\&        I32     items
.Ve
.IP "ix" 8
.IX Xref "ix"
.IX Item "ix"
Variable which is setup by \f(CW\*(C`xsubpp\*(C'\fR to indicate which of an 
\&\s-1XSUB\s0's aliases was used to invoke it.  See \*(L"The \s-1ALIAS:\s0 Keyword\*(R" in perlxs.
.Sp
.Vb 1
\&        I32     ix
.Ve
.IP "newXSproto" 8
.IX Xref "newXSproto"
.IX Item "newXSproto"
Used by \f(CW\*(C`xsubpp\*(C'\fR to hook up XSUBs as Perl subs.  Adds Perl prototypes to
the subs.
.IP "\s-1RETVAL\s0" 8
.IX Xref "RETVAL"
.IX Item "RETVAL"
Variable which is setup by \f(CW\*(C`xsubpp\*(C'\fR to hold the return value for an 
\&\s-1XSUB\s0. This is always the proper type for the \s-1XSUB\s0. See 
\&\*(L"The \s-1RETVAL\s0 Variable\*(R" in perlxs.
.Sp
.Vb 1
\&        (whatever)      RETVAL
.Ve
.IP "\s-1ST\s0" 8
.IX Xref "ST"
.IX Item "ST"
Used to access elements on the \s-1XSUB\s0's stack.
.Sp
.Vb 1
\&        SV*     ST(int ix)
.Ve
.IP "\s-1THIS\s0" 8
.IX Xref "THIS"
.IX Item "THIS"
Variable which is setup by \f(CW\*(C`xsubpp\*(C'\fR to designate the object in a \*(C+ 
\&\s-1XSUB\s0.  This is always the proper type for the \*(C+ object.  See \f(CW\*(C`CLASS\*(C'\fR and 
\&\*(L"Using \s-1XS\s0 With \*(C+\*(R" in perlxs.
.Sp
.Vb 1
\&        (whatever)      THIS
.Ve
.IP "\s-1UNDERBAR\s0" 8
.IX Xref "UNDERBAR"
.IX Item "UNDERBAR"
The SV* corresponding to the \f(CW$_\fR variable. Works even if there
is a lexical \f(CW$_\fR in scope.
.IP "\s-1XS\s0" 8
.IX Xref "XS"
.IX Item "XS"
Macro to declare an \s-1XSUB\s0 and its C parameter list.  This is handled by
\&\f(CW\*(C`xsubpp\*(C'\fR. It is the same as using the more explicit \s-1XS_EXTERNAL\s0 macro.
.IP "\s-1XS_APIVERSION_BOOTCHECK\s0" 8
.IX Xref "XS_APIVERSION_BOOTCHECK"
.IX Item "XS_APIVERSION_BOOTCHECK"
Macro to verify that the perl api version an \s-1XS\s0 module has been compiled against
matches the api version of the perl interpreter it's being loaded into.
.Sp
.Vb 1
\&                XS_APIVERSION_BOOTCHECK;
.Ve
.IP "\s-1XS_EXTERNAL\s0" 8
.IX Xref "XS_EXTERNAL"
.IX Item "XS_EXTERNAL"
Macro to declare an \s-1XSUB\s0 and its C parameter list explicitly exporting the symbols.
.IP "\s-1XS_INTERNAL\s0" 8
.IX Xref "XS_INTERNAL"
.IX Item "XS_INTERNAL"
Macro to declare an \s-1XSUB\s0 and its C parameter list without exporting the symbols.
This is handled by \f(CW\*(C`xsubpp\*(C'\fR and generally preferable over exporting the \s-1XSUB\s0
symbols unnecessarily.
.IP "\s-1XS_VERSION\s0" 8
.IX Xref "XS_VERSION"
.IX Item "XS_VERSION"
The version identifier for an \s-1XS\s0 module.  This is usually
handled automatically by \f(CW\*(C`ExtUtils::MakeMaker\*(C'\fR.  See \f(CW\*(C`XS_VERSION_BOOTCHECK\*(C'\fR.
.IP "\s-1XS_VERSION_BOOTCHECK\s0" 8
.IX Xref "XS_VERSION_BOOTCHECK"
.IX Item "XS_VERSION_BOOTCHECK"
Macro to verify that a \s-1PM\s0 module's \f(CW$VERSION\fR variable matches the \s-1XS\s0
module's \f(CW\*(C`XS_VERSION\*(C'\fR variable.  This is usually handled automatically by
\&\f(CW\*(C`xsubpp\*(C'\fR.  See \*(L"The \s-1VERSIONCHECK:\s0 Keyword\*(R" in perlxs.
.Sp
.Vb 1
\&                XS_VERSION_BOOTCHECK;
.Ve
.SH "Warning and Dieing"
.IX Header "Warning and Dieing"
.IP "croak" 8
.IX Xref "croak"
.IX Item "croak"
This is an \s-1XS\s0 interface to Perl's \f(CW\*(C`die\*(C'\fR function.
.Sp
Take a sprintf-style format pattern and argument list.  These are used to
generate a string message.  If the message does not end with a newline,
then it will be extended with some indication of the current location
in the code, as described for \*(L"mess_sv\*(R".
.Sp
The error message will be used as an exception, by default
returning control to the nearest enclosing \f(CW\*(C`eval\*(C'\fR, but subject to
modification by a \f(CW$SIG{_\|_DIE_\|_}\fR handler.  In any case, the \f(CW\*(C`croak\*(C'\fR
function never returns normally.
.Sp
For historical reasons, if \f(CW\*(C`pat\*(C'\fR is null then the contents of \f(CW\*(C`ERRSV\*(C'\fR
(\f(CW$@\fR) will be used as an error message or object instead of building an
error message from arguments.  If you want to throw a non-string object,
or build an error message in an \s-1SV\s0 yourself, it is preferable to use
the \*(L"croak_sv\*(R" function, which does not involve clobbering \f(CW\*(C`ERRSV\*(C'\fR.
.Sp
.Vb 1
\&        void    croak(const char *pat, ...)
.Ve
.IP "croak_no_modify" 8
.IX Xref "croak_no_modify"
.IX Item "croak_no_modify"
Exactly equivalent to \f(CW\*(C`Perl_croak(aTHX_ "%s", PL_no_modify)\*(C'\fR, but generates
terser object code than using \f(CW\*(C`Perl_croak\*(C'\fR. Less code used on exception code
paths reduces \s-1CPU\s0 cache pressure.
.Sp
.Vb 1
\&        void    croak_no_modify()
.Ve
.IP "croak_sv" 8
.IX Xref "croak_sv"
.IX Item "croak_sv"
This is an \s-1XS\s0 interface to Perl's \f(CW\*(C`die\*(C'\fR function.
.Sp
\&\f(CW\*(C`baseex\*(C'\fR is the error message or object.  If it is a reference, it
will be used as-is.  Otherwise it is used as a string, and if it does
not end with a newline then it will be extended with some indication of
the current location in the code, as described for \*(L"mess_sv\*(R".
.Sp
The error message or object will be used as an exception, by default
returning control to the nearest enclosing \f(CW\*(C`eval\*(C'\fR, but subject to
modification by a \f(CW$SIG{_\|_DIE_\|_}\fR handler.  In any case, the \f(CW\*(C`croak_sv\*(C'\fR
function never returns normally.
.Sp
To die with a simple string message, the \*(L"croak\*(R" function may be
more convenient.
.Sp
.Vb 1
\&        void    croak_sv(SV *baseex)
.Ve
.IP "die" 8
.IX Xref "die"
.IX Item "die"
Behaves the same as \*(L"croak\*(R", except for the return type.
It should be used only where the \f(CW\*(C`OP *\*(C'\fR return type is required.
The function never actually returns.
.Sp
.Vb 1
\&        OP *    die(const char *pat, ...)
.Ve
.IP "die_sv" 8
.IX Xref "die_sv"
.IX Item "die_sv"
Behaves the same as \*(L"croak_sv\*(R", except for the return type.
It should be used only where the \f(CW\*(C`OP *\*(C'\fR return type is required.
The function never actually returns.
.Sp
.Vb 1
\&        OP *    die_sv(SV *baseex)
.Ve
.IP "vcroak" 8
.IX Xref "vcroak"
.IX Item "vcroak"
This is an \s-1XS\s0 interface to Perl's \f(CW\*(C`die\*(C'\fR function.
.Sp
\&\f(CW\*(C`pat\*(C'\fR and \f(CW\*(C`args\*(C'\fR are a sprintf-style format pattern and encapsulated
argument list.  These are used to generate a string message.  If the
message does not end with a newline, then it will be extended with
some indication of the current location in the code, as described for
\&\*(L"mess_sv\*(R".
.Sp
The error message will be used as an exception, by default
returning control to the nearest enclosing \f(CW\*(C`eval\*(C'\fR, but subject to
modification by a \f(CW$SIG{_\|_DIE_\|_}\fR handler.  In any case, the \f(CW\*(C`croak\*(C'\fR
function never returns normally.
.Sp
For historical reasons, if \f(CW\*(C`pat\*(C'\fR is null then the contents of \f(CW\*(C`ERRSV\*(C'\fR
(\f(CW$@\fR) will be used as an error message or object instead of building an
error message from arguments.  If you want to throw a non-string object,
or build an error message in an \s-1SV\s0 yourself, it is preferable to use
the \*(L"croak_sv\*(R" function, which does not involve clobbering \f(CW\*(C`ERRSV\*(C'\fR.
.Sp
.Vb 1
\&        void    vcroak(const char *pat, va_list *args)
.Ve
.IP "vwarn" 8
.IX Xref "vwarn"
.IX Item "vwarn"
This is an \s-1XS\s0 interface to Perl's \f(CW\*(C`warn\*(C'\fR function.
.Sp
\&\f(CW\*(C`pat\*(C'\fR and \f(CW\*(C`args\*(C'\fR are a sprintf-style format pattern and encapsulated
argument list.  These are used to generate a string message.  If the
message does not end with a newline, then it will be extended with
some indication of the current location in the code, as described for
\&\*(L"mess_sv\*(R".
.Sp
The error message or object will by default be written to standard error,
but this is subject to modification by a \f(CW$SIG{_\|_WARN_\|_}\fR handler.
.Sp
Unlike with \*(L"vcroak\*(R", \f(CW\*(C`pat\*(C'\fR is not permitted to be null.
.Sp
.Vb 1
\&        void    vwarn(const char *pat, va_list *args)
.Ve
.IP "warn" 8
.IX Xref "warn"
.IX Item "warn"
This is an \s-1XS\s0 interface to Perl's \f(CW\*(C`warn\*(C'\fR function.
.Sp
Take a sprintf-style format pattern and argument list.  These are used to
generate a string message.  If the message does not end with a newline,
then it will be extended with some indication of the current location
in the code, as described for \*(L"mess_sv\*(R".
.Sp
The error message or object will by default be written to standard error,
but this is subject to modification by a \f(CW$SIG{_\|_WARN_\|_}\fR handler.
.Sp
Unlike with \*(L"croak\*(R", \f(CW\*(C`pat\*(C'\fR is not permitted to be null.
.Sp
.Vb 1
\&        void    warn(const char *pat, ...)
.Ve
.IP "warn_sv" 8
.IX Xref "warn_sv"
.IX Item "warn_sv"
This is an \s-1XS\s0 interface to Perl's \f(CW\*(C`warn\*(C'\fR function.
.Sp
\&\f(CW\*(C`baseex\*(C'\fR is the error message or object.  If it is a reference, it
will be used as-is.  Otherwise it is used as a string, and if it does
not end with a newline then it will be extended with some indication of
the current location in the code, as described for \*(L"mess_sv\*(R".
.Sp
The error message or object will by default be written to standard error,
but this is subject to modification by a \f(CW$SIG{_\|_WARN_\|_}\fR handler.
.Sp
To warn with a simple string message, the \*(L"warn\*(R" function may be
more convenient.
.Sp
.Vb 1
\&        void    warn_sv(SV *baseex)
.Ve
.SH "Undocumented functions"
.IX Header "Undocumented functions"
The following functions have been flagged as part of the public \s-1API\s0,
but are currently undocumented. Use them at your own risk, as the
interfaces are subject to change.
.PP
If you use one of them, you may wish to consider creating and submitting
documentation for it. If your patch is accepted, this will indicate that
the interface is stable (unless it is explicitly marked otherwise).
.IP "GetVars" 4
.IX Xref "GetVars"
.IX Item "GetVars"
.PD 0
.IP "Gv_AMupdate" 4
.IX Xref "Gv_AMupdate"
.IX Item "Gv_AMupdate"
.IP "PerlIO_clearerr" 4
.IX Xref "PerlIO_clearerr"
.IX Item "PerlIO_clearerr"
.IP "PerlIO_close" 4
.IX Xref "PerlIO_close"
.IX Item "PerlIO_close"
.IP "PerlIO_context_layers" 4
.IX Xref "PerlIO_context_layers"
.IX Item "PerlIO_context_layers"
.IP "PerlIO_eof" 4
.IX Xref "PerlIO_eof"
.IX Item "PerlIO_eof"
.IP "PerlIO_error" 4
.IX Xref "PerlIO_error"
.IX Item "PerlIO_error"
.IP "PerlIO_fileno" 4
.IX Xref "PerlIO_fileno"
.IX Item "PerlIO_fileno"
.IP "PerlIO_fill" 4
.IX Xref "PerlIO_fill"
.IX Item "PerlIO_fill"
.IP "PerlIO_flush" 4
.IX Xref "PerlIO_flush"
.IX Item "PerlIO_flush"
.IP "PerlIO_get_base" 4
.IX Xref "PerlIO_get_base"
.IX Item "PerlIO_get_base"
.IP "PerlIO_get_bufsiz" 4
.IX Xref "PerlIO_get_bufsiz"
.IX Item "PerlIO_get_bufsiz"
.IP "PerlIO_get_cnt" 4
.IX Xref "PerlIO_get_cnt"
.IX Item "PerlIO_get_cnt"
.IP "PerlIO_get_ptr" 4
.IX Xref "PerlIO_get_ptr"
.IX Item "PerlIO_get_ptr"
.IP "PerlIO_read" 4
.IX Xref "PerlIO_read"
.IX Item "PerlIO_read"
.IP "PerlIO_seek" 4
.IX Xref "PerlIO_seek"
.IX Item "PerlIO_seek"
.IP "PerlIO_set_cnt" 4
.IX Xref "PerlIO_set_cnt"
.IX Item "PerlIO_set_cnt"
.IP "PerlIO_set_ptrcnt" 4
.IX Xref "PerlIO_set_ptrcnt"
.IX Item "PerlIO_set_ptrcnt"
.IP "PerlIO_setlinebuf" 4
.IX Xref "PerlIO_setlinebuf"
.IX Item "PerlIO_setlinebuf"
.IP "PerlIO_stderr" 4
.IX Xref "PerlIO_stderr"
.IX Item "PerlIO_stderr"
.IP "PerlIO_stdin" 4
.IX Xref "PerlIO_stdin"
.IX Item "PerlIO_stdin"
.IP "PerlIO_stdout" 4
.IX Xref "PerlIO_stdout"
.IX Item "PerlIO_stdout"
.IP "PerlIO_tell" 4
.IX Xref "PerlIO_tell"
.IX Item "PerlIO_tell"
.IP "PerlIO_unread" 4
.IX Xref "PerlIO_unread"
.IX Item "PerlIO_unread"
.IP "PerlIO_write" 4
.IX Xref "PerlIO_write"
.IX Item "PerlIO_write"
.IP "Slab_Alloc" 4
.IX Xref "Slab_Alloc"
.IX Item "Slab_Alloc"
.IP "Slab_Free" 4
.IX Xref "Slab_Free"
.IX Item "Slab_Free"
.IP "_is_utf8_quotemeta" 4
.IX Xref "_is_utf8_quotemeta"
.IX Item "_is_utf8_quotemeta"
.IP "amagic_call" 4
.IX Xref "amagic_call"
.IX Item "amagic_call"
.IP "amagic_deref_call" 4
.IX Xref "amagic_deref_call"
.IX Item "amagic_deref_call"
.IP "any_dup" 4
.IX Xref "any_dup"
.IX Item "any_dup"
.IP "atfork_lock" 4
.IX Xref "atfork_lock"
.IX Item "atfork_lock"
.IP "atfork_unlock" 4
.IX Xref "atfork_unlock"
.IX Item "atfork_unlock"
.IP "av_arylen_p" 4
.IX Xref "av_arylen_p"
.IX Item "av_arylen_p"
.IP "av_iter_p" 4
.IX Xref "av_iter_p"
.IX Item "av_iter_p"
.IP "block_gimme" 4
.IX Xref "block_gimme"
.IX Item "block_gimme"
.IP "call_atexit" 4
.IX Xref "call_atexit"
.IX Item "call_atexit"
.IP "call_list" 4
.IX Xref "call_list"
.IX Item "call_list"
.IP "calloc" 4
.IX Xref "calloc"
.IX Item "calloc"
.IP "cast_i32" 4
.IX Xref "cast_i32"
.IX Item "cast_i32"
.IP "cast_iv" 4
.IX Xref "cast_iv"
.IX Item "cast_iv"
.IP "cast_ulong" 4
.IX Xref "cast_ulong"
.IX Item "cast_ulong"
.IP "cast_uv" 4
.IX Xref "cast_uv"
.IX Item "cast_uv"
.IP "ck_warner" 4
.IX Xref "ck_warner"
.IX Item "ck_warner"
.IP "ck_warner_d" 4
.IX Xref "ck_warner_d"
.IX Item "ck_warner_d"
.IP "ckwarn" 4
.IX Xref "ckwarn"
.IX Item "ckwarn"
.IP "ckwarn_d" 4
.IX Xref "ckwarn_d"
.IX Item "ckwarn_d"
.IP "clone_params_del" 4
.IX Xref "clone_params_del"
.IX Item "clone_params_del"
.IP "clone_params_new" 4
.IX Xref "clone_params_new"
.IX Item "clone_params_new"
.IP "croak_nocontext" 4
.IX Xref "croak_nocontext"
.IX Item "croak_nocontext"
.IP "csighandler" 4
.IX Xref "csighandler"
.IX Item "csighandler"
.IP "cx_dump" 4
.IX Xref "cx_dump"
.IX Item "cx_dump"
.IP "cx_dup" 4
.IX Xref "cx_dup"
.IX Item "cx_dup"
.IP "cxinc" 4
.IX Xref "cxinc"
.IX Item "cxinc"
.IP "deb" 4
.IX Xref "deb"
.IX Item "deb"
.IP "deb_nocontext" 4
.IX Xref "deb_nocontext"
.IX Item "deb_nocontext"
.IP "debop" 4
.IX Xref "debop"
.IX Item "debop"
.IP "debprofdump" 4
.IX Xref "debprofdump"
.IX Item "debprofdump"
.IP "debstack" 4
.IX Xref "debstack"
.IX Item "debstack"
.IP "debstackptrs" 4
.IX Xref "debstackptrs"
.IX Item "debstackptrs"
.IP "delimcpy" 4
.IX Xref "delimcpy"
.IX Item "delimcpy"
.IP "despatch_signals" 4
.IX Xref "despatch_signals"
.IX Item "despatch_signals"
.IP "die_nocontext" 4
.IX Xref "die_nocontext"
.IX Item "die_nocontext"
.IP "dirp_dup" 4
.IX Xref "dirp_dup"
.IX Item "dirp_dup"
.IP "do_aspawn" 4
.IX Xref "do_aspawn"
.IX Item "do_aspawn"
.IP "do_binmode" 4
.IX Xref "do_binmode"
.IX Item "do_binmode"
.IP "do_close" 4
.IX Xref "do_close"
.IX Item "do_close"
.IP "do_gv_dump" 4
.IX Xref "do_gv_dump"
.IX Item "do_gv_dump"
.IP "do_gvgv_dump" 4
.IX Xref "do_gvgv_dump"
.IX Item "do_gvgv_dump"
.IP "do_hv_dump" 4
.IX Xref "do_hv_dump"
.IX Item "do_hv_dump"
.IP "do_join" 4
.IX Xref "do_join"
.IX Item "do_join"
.IP "do_magic_dump" 4
.IX Xref "do_magic_dump"
.IX Item "do_magic_dump"
.IP "do_op_dump" 4
.IX Xref "do_op_dump"
.IX Item "do_op_dump"
.IP "do_open" 4
.IX Xref "do_open"
.IX Item "do_open"
.IP "do_open9" 4
.IX Xref "do_open9"
.IX Item "do_open9"
.IP "do_openn" 4
.IX Xref "do_openn"
.IX Item "do_openn"
.IP "do_pmop_dump" 4
.IX Xref "do_pmop_dump"
.IX Item "do_pmop_dump"
.IP "do_spawn" 4
.IX Xref "do_spawn"
.IX Item "do_spawn"
.IP "do_spawn_nowait" 4
.IX Xref "do_spawn_nowait"
.IX Item "do_spawn_nowait"
.IP "do_sprintf" 4
.IX Xref "do_sprintf"
.IX Item "do_sprintf"
.IP "do_sv_dump" 4
.IX Xref "do_sv_dump"
.IX Item "do_sv_dump"
.IP "doing_taint" 4
.IX Xref "doing_taint"
.IX Item "doing_taint"
.IP "doref" 4
.IX Xref "doref"
.IX Item "doref"
.IP "dounwind" 4
.IX Xref "dounwind"
.IX Item "dounwind"
.IP "dowantarray" 4
.IX Xref "dowantarray"
.IX Item "dowantarray"
.IP "dump_all" 4
.IX Xref "dump_all"
.IX Item "dump_all"
.IP "dump_eval" 4
.IX Xref "dump_eval"
.IX Item "dump_eval"
.IP "dump_fds" 4
.IX Xref "dump_fds"
.IX Item "dump_fds"
.IP "dump_form" 4
.IX Xref "dump_form"
.IX Item "dump_form"
.IP "dump_indent" 4
.IX Xref "dump_indent"
.IX Item "dump_indent"
.IP "dump_mstats" 4
.IX Xref "dump_mstats"
.IX Item "dump_mstats"
.IP "dump_packsubs" 4
.IX Xref "dump_packsubs"
.IX Item "dump_packsubs"
.IP "dump_sub" 4
.IX Xref "dump_sub"
.IX Item "dump_sub"
.IP "dump_vindent" 4
.IX Xref "dump_vindent"
.IX Item "dump_vindent"
.IP "filter_add" 4
.IX Xref "filter_add"
.IX Item "filter_add"
.IP "filter_del" 4
.IX Xref "filter_del"
.IX Item "filter_del"
.IP "filter_read" 4
.IX Xref "filter_read"
.IX Item "filter_read"
.IP "foldEQ_latin1" 4
.IX Xref "foldEQ_latin1"
.IX Item "foldEQ_latin1"
.IP "form_nocontext" 4
.IX Xref "form_nocontext"
.IX Item "form_nocontext"
.IP "fp_dup" 4
.IX Xref "fp_dup"
.IX Item "fp_dup"
.IP "fprintf_nocontext" 4
.IX Xref "fprintf_nocontext"
.IX Item "fprintf_nocontext"
.IP "free_global_struct" 4
.IX Xref "free_global_struct"
.IX Item "free_global_struct"
.IP "free_tmps" 4
.IX Xref "free_tmps"
.IX Item "free_tmps"
.IP "get_context" 4
.IX Xref "get_context"
.IX Item "get_context"
.IP "get_mstats" 4
.IX Xref "get_mstats"
.IX Item "get_mstats"
.IP "get_op_descs" 4
.IX Xref "get_op_descs"
.IX Item "get_op_descs"
.IP "get_op_names" 4
.IX Xref "get_op_names"
.IX Item "get_op_names"
.IP "get_ppaddr" 4
.IX Xref "get_ppaddr"
.IX Item "get_ppaddr"
.IP "get_vtbl" 4
.IX Xref "get_vtbl"
.IX Item "get_vtbl"
.IP "gp_dup" 4
.IX Xref "gp_dup"
.IX Item "gp_dup"
.IP "gp_free" 4
.IX Xref "gp_free"
.IX Item "gp_free"
.IP "gp_ref" 4
.IX Xref "gp_ref"
.IX Item "gp_ref"
.IP "gv_AVadd" 4
.IX Xref "gv_AVadd"
.IX Item "gv_AVadd"
.IP "gv_HVadd" 4
.IX Xref "gv_HVadd"
.IX Item "gv_HVadd"
.IP "gv_IOadd" 4
.IX Xref "gv_IOadd"
.IX Item "gv_IOadd"
.IP "gv_SVadd" 4
.IX Xref "gv_SVadd"
.IX Item "gv_SVadd"
.IP "gv_add_by_type" 4
.IX Xref "gv_add_by_type"
.IX Item "gv_add_by_type"
.IP "gv_autoload4" 4
.IX Xref "gv_autoload4"
.IX Item "gv_autoload4"
.IP "gv_autoload_pv" 4
.IX Xref "gv_autoload_pv"
.IX Item "gv_autoload_pv"
.IP "gv_autoload_pvn" 4
.IX Xref "gv_autoload_pvn"
.IX Item "gv_autoload_pvn"
.IP "gv_autoload_sv" 4
.IX Xref "gv_autoload_sv"
.IX Item "gv_autoload_sv"
.IP "gv_check" 4
.IX Xref "gv_check"
.IX Item "gv_check"
.IP "gv_dump" 4
.IX Xref "gv_dump"
.IX Item "gv_dump"
.IP "gv_efullname" 4
.IX Xref "gv_efullname"
.IX Item "gv_efullname"
.IP "gv_efullname3" 4
.IX Xref "gv_efullname3"
.IX Item "gv_efullname3"
.IP "gv_efullname4" 4
.IX Xref "gv_efullname4"
.IX Item "gv_efullname4"
.IP "gv_fetchfile" 4
.IX Xref "gv_fetchfile"
.IX Item "gv_fetchfile"
.IP "gv_fetchfile_flags" 4
.IX Xref "gv_fetchfile_flags"
.IX Item "gv_fetchfile_flags"
.IP "gv_fetchpv" 4
.IX Xref "gv_fetchpv"
.IX Item "gv_fetchpv"
.IP "gv_fetchpvn_flags" 4
.IX Xref "gv_fetchpvn_flags"
.IX Item "gv_fetchpvn_flags"
.IP "gv_fetchsv" 4
.IX Xref "gv_fetchsv"
.IX Item "gv_fetchsv"
.IP "gv_fullname" 4
.IX Xref "gv_fullname"
.IX Item "gv_fullname"
.IP "gv_fullname3" 4
.IX Xref "gv_fullname3"
.IX Item "gv_fullname3"
.IP "gv_fullname4" 4
.IX Xref "gv_fullname4"
.IX Item "gv_fullname4"
.IP "gv_handler" 4
.IX Xref "gv_handler"
.IX Item "gv_handler"
.IP "gv_name_set" 4
.IX Xref "gv_name_set"
.IX Item "gv_name_set"
.IP "he_dup" 4
.IX Xref "he_dup"
.IX Item "he_dup"
.IP "hek_dup" 4
.IX Xref "hek_dup"
.IX Item "hek_dup"
.IP "hv_common" 4
.IX Xref "hv_common"
.IX Item "hv_common"
.IP "hv_common_key_len" 4
.IX Xref "hv_common_key_len"
.IX Item "hv_common_key_len"
.IP "hv_delayfree_ent" 4
.IX Xref "hv_delayfree_ent"
.IX Item "hv_delayfree_ent"
.IP "hv_eiter_p" 4
.IX Xref "hv_eiter_p"
.IX Item "hv_eiter_p"
.IP "hv_eiter_set" 4
.IX Xref "hv_eiter_set"
.IX Item "hv_eiter_set"
.IP "hv_free_ent" 4
.IX Xref "hv_free_ent"
.IX Item "hv_free_ent"
.IP "hv_ksplit" 4
.IX Xref "hv_ksplit"
.IX Item "hv_ksplit"
.IP "hv_name_set" 4
.IX Xref "hv_name_set"
.IX Item "hv_name_set"
.IP "hv_placeholders_get" 4
.IX Xref "hv_placeholders_get"
.IX Item "hv_placeholders_get"
.IP "hv_placeholders_p" 4
.IX Xref "hv_placeholders_p"
.IX Item "hv_placeholders_p"
.IP "hv_placeholders_set" 4
.IX Xref "hv_placeholders_set"
.IX Item "hv_placeholders_set"
.IP "hv_riter_p" 4
.IX Xref "hv_riter_p"
.IX Item "hv_riter_p"
.IP "hv_riter_set" 4
.IX Xref "hv_riter_set"
.IX Item "hv_riter_set"
.IP "init_global_struct" 4
.IX Xref "init_global_struct"
.IX Item "init_global_struct"
.IP "init_i18nl10n" 4
.IX Xref "init_i18nl10n"
.IX Item "init_i18nl10n"
.IP "init_i18nl14n" 4
.IX Xref "init_i18nl14n"
.IX Item "init_i18nl14n"
.IP "init_stacks" 4
.IX Xref "init_stacks"
.IX Item "init_stacks"
.IP "init_tm" 4
.IX Xref "init_tm"
.IX Item "init_tm"
.IP "instr" 4
.IX Xref "instr"
.IX Item "instr"
.IP "is_lvalue_sub" 4
.IX Xref "is_lvalue_sub"
.IX Item "is_lvalue_sub"
.IP "is_uni_alnum" 4
.IX Xref "is_uni_alnum"
.IX Item "is_uni_alnum"
.IP "is_uni_alnum_lc" 4
.IX Xref "is_uni_alnum_lc"
.IX Item "is_uni_alnum_lc"
.IP "is_uni_alpha" 4
.IX Xref "is_uni_alpha"
.IX Item "is_uni_alpha"
.IP "is_uni_alpha_lc" 4
.IX Xref "is_uni_alpha_lc"
.IX Item "is_uni_alpha_lc"
.IP "is_uni_ascii" 4
.IX Xref "is_uni_ascii"
.IX Item "is_uni_ascii"
.IP "is_uni_ascii_lc" 4
.IX Xref "is_uni_ascii_lc"
.IX Item "is_uni_ascii_lc"
.IP "is_uni_cntrl" 4
.IX Xref "is_uni_cntrl"
.IX Item "is_uni_cntrl"
.IP "is_uni_cntrl_lc" 4
.IX Xref "is_uni_cntrl_lc"
.IX Item "is_uni_cntrl_lc"
.IP "is_uni_digit" 4
.IX Xref "is_uni_digit"
.IX Item "is_uni_digit"
.IP "is_uni_digit_lc" 4
.IX Xref "is_uni_digit_lc"
.IX Item "is_uni_digit_lc"
.IP "is_uni_graph" 4
.IX Xref "is_uni_graph"
.IX Item "is_uni_graph"
.IP "is_uni_graph_lc" 4
.IX Xref "is_uni_graph_lc"
.IX Item "is_uni_graph_lc"
.IP "is_uni_idfirst" 4
.IX Xref "is_uni_idfirst"
.IX Item "is_uni_idfirst"
.IP "is_uni_idfirst_lc" 4
.IX Xref "is_uni_idfirst_lc"
.IX Item "is_uni_idfirst_lc"
.IP "is_uni_lower" 4
.IX Xref "is_uni_lower"
.IX Item "is_uni_lower"
.IP "is_uni_lower_lc" 4
.IX Xref "is_uni_lower_lc"
.IX Item "is_uni_lower_lc"
.IP "is_uni_print" 4
.IX Xref "is_uni_print"
.IX Item "is_uni_print"
.IP "is_uni_print_lc" 4
.IX Xref "is_uni_print_lc"
.IX Item "is_uni_print_lc"
.IP "is_uni_punct" 4
.IX Xref "is_uni_punct"
.IX Item "is_uni_punct"
.IP "is_uni_punct_lc" 4
.IX Xref "is_uni_punct_lc"
.IX Item "is_uni_punct_lc"
.IP "is_uni_space" 4
.IX Xref "is_uni_space"
.IX Item "is_uni_space"
.IP "is_uni_space_lc" 4
.IX Xref "is_uni_space_lc"
.IX Item "is_uni_space_lc"
.IP "is_uni_upper" 4
.IX Xref "is_uni_upper"
.IX Item "is_uni_upper"
.IP "is_uni_upper_lc" 4
.IX Xref "is_uni_upper_lc"
.IX Item "is_uni_upper_lc"
.IP "is_uni_xdigit" 4
.IX Xref "is_uni_xdigit"
.IX Item "is_uni_xdigit"
.IP "is_uni_xdigit_lc" 4
.IX Xref "is_uni_xdigit_lc"
.IX Item "is_uni_xdigit_lc"
.IP "is_utf8_alnum" 4
.IX Xref "is_utf8_alnum"
.IX Item "is_utf8_alnum"
.IP "is_utf8_alpha" 4
.IX Xref "is_utf8_alpha"
.IX Item "is_utf8_alpha"
.IP "is_utf8_ascii" 4
.IX Xref "is_utf8_ascii"
.IX Item "is_utf8_ascii"
.IP "is_utf8_cntrl" 4
.IX Xref "is_utf8_cntrl"
.IX Item "is_utf8_cntrl"
.IP "is_utf8_digit" 4
.IX Xref "is_utf8_digit"
.IX Item "is_utf8_digit"
.IP "is_utf8_graph" 4
.IX Xref "is_utf8_graph"
.IX Item "is_utf8_graph"
.IP "is_utf8_idcont" 4
.IX Xref "is_utf8_idcont"
.IX Item "is_utf8_idcont"
.IP "is_utf8_idfirst" 4
.IX Xref "is_utf8_idfirst"
.IX Item "is_utf8_idfirst"
.IP "is_utf8_lower" 4
.IX Xref "is_utf8_lower"
.IX Item "is_utf8_lower"
.IP "is_utf8_mark" 4
.IX Xref "is_utf8_mark"
.IX Item "is_utf8_mark"
.IP "is_utf8_perl_space" 4
.IX Xref "is_utf8_perl_space"
.IX Item "is_utf8_perl_space"
.IP "is_utf8_perl_word" 4
.IX Xref "is_utf8_perl_word"
.IX Item "is_utf8_perl_word"
.IP "is_utf8_posix_digit" 4
.IX Xref "is_utf8_posix_digit"
.IX Item "is_utf8_posix_digit"
.IP "is_utf8_print" 4
.IX Xref "is_utf8_print"
.IX Item "is_utf8_print"
.IP "is_utf8_punct" 4
.IX Xref "is_utf8_punct"
.IX Item "is_utf8_punct"
.IP "is_utf8_space" 4
.IX Xref "is_utf8_space"
.IX Item "is_utf8_space"
.IP "is_utf8_upper" 4
.IX Xref "is_utf8_upper"
.IX Item "is_utf8_upper"
.IP "is_utf8_xdigit" 4
.IX Xref "is_utf8_xdigit"
.IX Item "is_utf8_xdigit"
.IP "is_utf8_xidcont" 4
.IX Xref "is_utf8_xidcont"
.IX Item "is_utf8_xidcont"
.IP "is_utf8_xidfirst" 4
.IX Xref "is_utf8_xidfirst"
.IX Item "is_utf8_xidfirst"
.IP "leave_scope" 4
.IX Xref "leave_scope"
.IX Item "leave_scope"
.IP "load_module_nocontext" 4
.IX Xref "load_module_nocontext"
.IX Item "load_module_nocontext"
.IP "magic_dump" 4
.IX Xref "magic_dump"
.IX Item "magic_dump"
.IP "malloc" 4
.IX Xref "malloc"
.IX Item "malloc"
.IP "markstack_grow" 4
.IX Xref "markstack_grow"
.IX Item "markstack_grow"
.IP "mess_nocontext" 4
.IX Xref "mess_nocontext"
.IX Item "mess_nocontext"
.IP "mfree" 4
.IX Xref "mfree"
.IX Item "mfree"
.IP "mg_dup" 4
.IX Xref "mg_dup"
.IX Item "mg_dup"
.IP "mg_size" 4
.IX Xref "mg_size"
.IX Item "mg_size"
.IP "mini_mktime" 4
.IX Xref "mini_mktime"
.IX Item "mini_mktime"
.IP "moreswitches" 4
.IX Xref "moreswitches"
.IX Item "moreswitches"
.IP "mro_get_from_name" 4
.IX Xref "mro_get_from_name"
.IX Item "mro_get_from_name"
.IP "mro_get_private_data" 4
.IX Xref "mro_get_private_data"
.IX Item "mro_get_private_data"
.IP "mro_set_mro" 4
.IX Xref "mro_set_mro"
.IX Item "mro_set_mro"
.IP "mro_set_private_data" 4
.IX Xref "mro_set_private_data"
.IX Item "mro_set_private_data"
.IP "my_atof" 4
.IX Xref "my_atof"
.IX Item "my_atof"
.IP "my_atof2" 4
.IX Xref "my_atof2"
.IX Item "my_atof2"
.IP "my_bcopy" 4
.IX Xref "my_bcopy"
.IX Item "my_bcopy"
.IP "my_bzero" 4
.IX Xref "my_bzero"
.IX Item "my_bzero"
.IP "my_chsize" 4
.IX Xref "my_chsize"
.IX Item "my_chsize"
.IP "my_cxt_index" 4
.IX Xref "my_cxt_index"
.IX Item "my_cxt_index"
.IP "my_cxt_init" 4
.IX Xref "my_cxt_init"
.IX Item "my_cxt_init"
.IP "my_dirfd" 4
.IX Xref "my_dirfd"
.IX Item "my_dirfd"
.IP "my_exit" 4
.IX Xref "my_exit"
.IX Item "my_exit"
.IP "my_failure_exit" 4
.IX Xref "my_failure_exit"
.IX Item "my_failure_exit"
.IP "my_fflush_all" 4
.IX Xref "my_fflush_all"
.IX Item "my_fflush_all"
.IP "my_fork" 4
.IX Xref "my_fork"
.IX Item "my_fork"
.IP "my_htonl" 4
.IX Xref "my_htonl"
.IX Item "my_htonl"
.IP "my_lstat" 4
.IX Xref "my_lstat"
.IX Item "my_lstat"
.IP "my_memcmp" 4
.IX Xref "my_memcmp"
.IX Item "my_memcmp"
.IP "my_memset" 4
.IX Xref "my_memset"
.IX Item "my_memset"
.IP "my_ntohl" 4
.IX Xref "my_ntohl"
.IX Item "my_ntohl"
.IP "my_pclose" 4
.IX Xref "my_pclose"
.IX Item "my_pclose"
.IP "my_popen" 4
.IX Xref "my_popen"
.IX Item "my_popen"
.IP "my_popen_list" 4
.IX Xref "my_popen_list"
.IX Item "my_popen_list"
.IP "my_setenv" 4
.IX Xref "my_setenv"
.IX Item "my_setenv"
.IP "my_socketpair" 4
.IX Xref "my_socketpair"
.IX Item "my_socketpair"
.IP "my_stat" 4
.IX Xref "my_stat"
.IX Item "my_stat"
.IP "my_strftime" 4
.IX Xref "my_strftime"
.IX Item "my_strftime"
.IP "my_strlcat" 4
.IX Xref "my_strlcat"
.IX Item "my_strlcat"
.IP "my_strlcpy" 4
.IX Xref "my_strlcpy"
.IX Item "my_strlcpy"
.IP "my_swap" 4
.IX Xref "my_swap"
.IX Item "my_swap"
.IP "newANONATTRSUB" 4
.IX Xref "newANONATTRSUB"
.IX Item "newANONATTRSUB"
.IP "newANONHASH" 4
.IX Xref "newANONHASH"
.IX Item "newANONHASH"
.IP "newANONLIST" 4
.IX Xref "newANONLIST"
.IX Item "newANONLIST"
.IP "newANONSUB" 4
.IX Xref "newANONSUB"
.IX Item "newANONSUB"
.IP "newATTRSUB" 4
.IX Xref "newATTRSUB"
.IX Item "newATTRSUB"
.IP "newAVREF" 4
.IX Xref "newAVREF"
.IX Item "newAVREF"
.IP "newCVREF" 4
.IX Xref "newCVREF"
.IX Item "newCVREF"
.IP "newFORM" 4
.IX Xref "newFORM"
.IX Item "newFORM"
.IP "newGVREF" 4
.IX Xref "newGVREF"
.IX Item "newGVREF"
.IP "newGVgen" 4
.IX Xref "newGVgen"
.IX Item "newGVgen"
.IP "newGVgen_flags" 4
.IX Xref "newGVgen_flags"
.IX Item "newGVgen_flags"
.IP "newHVREF" 4
.IX Xref "newHVREF"
.IX Item "newHVREF"
.IP "newHVhv" 4
.IX Xref "newHVhv"
.IX Item "newHVhv"
.IP "newIO" 4
.IX Xref "newIO"
.IX Item "newIO"
.IP "newMYSUB" 4
.IX Xref "newMYSUB"
.IX Item "newMYSUB"
.IP "newPROG" 4
.IX Xref "newPROG"
.IX Item "newPROG"
.IP "newRV" 4
.IX Xref "newRV"
.IX Item "newRV"
.IP "newSUB" 4
.IX Xref "newSUB"
.IX Item "newSUB"
.IP "newSVREF" 4
.IX Xref "newSVREF"
.IX Item "newSVREF"
.IP "newSVpvf_nocontext" 4
.IX Xref "newSVpvf_nocontext"
.IX Item "newSVpvf_nocontext"
.IP "new_collate" 4
.IX Xref "new_collate"
.IX Item "new_collate"
.IP "new_ctype" 4
.IX Xref "new_ctype"
.IX Item "new_ctype"
.IP "new_numeric" 4
.IX Xref "new_numeric"
.IX Item "new_numeric"
.IP "new_stackinfo" 4
.IX Xref "new_stackinfo"
.IX Item "new_stackinfo"
.IP "ninstr" 4
.IX Xref "ninstr"
.IX Item "ninstr"
.IP "op_dump" 4
.IX Xref "op_dump"
.IX Item "op_dump"
.IP "op_free" 4
.IX Xref "op_free"
.IX Item "op_free"
.IP "op_null" 4
.IX Xref "op_null"
.IX Item "op_null"
.IP "op_refcnt_lock" 4
.IX Xref "op_refcnt_lock"
.IX Item "op_refcnt_lock"
.IP "op_refcnt_unlock" 4
.IX Xref "op_refcnt_unlock"
.IX Item "op_refcnt_unlock"
.IP "parser_dup" 4
.IX Xref "parser_dup"
.IX Item "parser_dup"
.IP "perl_alloc_using" 4
.IX Xref "perl_alloc_using"
.IX Item "perl_alloc_using"
.IP "perl_clone_using" 4
.IX Xref "perl_clone_using"
.IX Item "perl_clone_using"
.IP "pmop_dump" 4
.IX Xref "pmop_dump"
.IX Item "pmop_dump"
.IP "pop_scope" 4
.IX Xref "pop_scope"
.IX Item "pop_scope"
.IP "pregcomp" 4
.IX Xref "pregcomp"
.IX Item "pregcomp"
.IP "pregexec" 4
.IX Xref "pregexec"
.IX Item "pregexec"
.IP "pregfree" 4
.IX Xref "pregfree"
.IX Item "pregfree"
.IP "pregfree2" 4
.IX Xref "pregfree2"
.IX Item "pregfree2"
.IP "printf_nocontext" 4
.IX Xref "printf_nocontext"
.IX Item "printf_nocontext"
.IP "ptr_table_clear" 4
.IX Xref "ptr_table_clear"
.IX Item "ptr_table_clear"
.IP "ptr_table_fetch" 4
.IX Xref "ptr_table_fetch"
.IX Item "ptr_table_fetch"
.IP "ptr_table_free" 4
.IX Xref "ptr_table_free"
.IX Item "ptr_table_free"
.IP "ptr_table_new" 4
.IX Xref "ptr_table_new"
.IX Item "ptr_table_new"
.IP "ptr_table_split" 4
.IX Xref "ptr_table_split"
.IX Item "ptr_table_split"
.IP "ptr_table_store" 4
.IX Xref "ptr_table_store"
.IX Item "ptr_table_store"
.IP "push_scope" 4
.IX Xref "push_scope"
.IX Item "push_scope"
.IP "re_compile" 4
.IX Xref "re_compile"
.IX Item "re_compile"
.IP "re_dup_guts" 4
.IX Xref "re_dup_guts"
.IX Item "re_dup_guts"
.IP "re_intuit_start" 4
.IX Xref "re_intuit_start"
.IX Item "re_intuit_start"
.IP "re_intuit_string" 4
.IX Xref "re_intuit_string"
.IX Item "re_intuit_string"
.IP "realloc" 4
.IX Xref "realloc"
.IX Item "realloc"
.IP "reentrant_free" 4
.IX Xref "reentrant_free"
.IX Item "reentrant_free"
.IP "reentrant_init" 4
.IX Xref "reentrant_init"
.IX Item "reentrant_init"
.IP "reentrant_retry" 4
.IX Xref "reentrant_retry"
.IX Item "reentrant_retry"
.IP "reentrant_size" 4
.IX Xref "reentrant_size"
.IX Item "reentrant_size"
.IP "ref" 4
.IX Xref "ref"
.IX Item "ref"
.IP "reg_named_buff_all" 4
.IX Xref "reg_named_buff_all"
.IX Item "reg_named_buff_all"
.IP "reg_named_buff_exists" 4
.IX Xref "reg_named_buff_exists"
.IX Item "reg_named_buff_exists"
.IP "reg_named_buff_fetch" 4
.IX Xref "reg_named_buff_fetch"
.IX Item "reg_named_buff_fetch"
.IP "reg_named_buff_firstkey" 4
.IX Xref "reg_named_buff_firstkey"
.IX Item "reg_named_buff_firstkey"
.IP "reg_named_buff_nextkey" 4
.IX Xref "reg_named_buff_nextkey"
.IX Item "reg_named_buff_nextkey"
.IP "reg_named_buff_scalar" 4
.IX Xref "reg_named_buff_scalar"
.IX Item "reg_named_buff_scalar"
.IP "regclass_swash" 4
.IX Xref "regclass_swash"
.IX Item "regclass_swash"
.IP "regdump" 4
.IX Xref "regdump"
.IX Item "regdump"
.IP "regdupe_internal" 4
.IX Xref "regdupe_internal"
.IX Item "regdupe_internal"
.IP "regexec_flags" 4
.IX Xref "regexec_flags"
.IX Item "regexec_flags"
.IP "regfree_internal" 4
.IX Xref "regfree_internal"
.IX Item "regfree_internal"
.IP "reginitcolors" 4
.IX Xref "reginitcolors"
.IX Item "reginitcolors"
.IP "regnext" 4
.IX Xref "regnext"
.IX Item "regnext"
.IP "repeatcpy" 4
.IX Xref "repeatcpy"
.IX Item "repeatcpy"
.IP "rninstr" 4
.IX Xref "rninstr"
.IX Item "rninstr"
.IP "rsignal" 4
.IX Xref "rsignal"
.IX Item "rsignal"
.IP "rsignal_state" 4
.IX Xref "rsignal_state"
.IX Item "rsignal_state"
.IP "runops_debug" 4
.IX Xref "runops_debug"
.IX Item "runops_debug"
.IP "runops_standard" 4
.IX Xref "runops_standard"
.IX Item "runops_standard"
.IP "rvpv_dup" 4
.IX Xref "rvpv_dup"
.IX Item "rvpv_dup"
.IP "safesyscalloc" 4
.IX Xref "safesyscalloc"
.IX Item "safesyscalloc"
.IP "safesysfree" 4
.IX Xref "safesysfree"
.IX Item "safesysfree"
.IP "safesysmalloc" 4
.IX Xref "safesysmalloc"
.IX Item "safesysmalloc"
.IP "safesysrealloc" 4
.IX Xref "safesysrealloc"
.IX Item "safesysrealloc"
.IP "save_I16" 4
.IX Xref "save_I16"
.IX Item "save_I16"
.IP "save_I32" 4
.IX Xref "save_I32"
.IX Item "save_I32"
.IP "save_I8" 4
.IX Xref "save_I8"
.IX Item "save_I8"
.IP "save_adelete" 4
.IX Xref "save_adelete"
.IX Item "save_adelete"
.IP "save_aelem" 4
.IX Xref "save_aelem"
.IX Item "save_aelem"
.IP "save_aelem_flags" 4
.IX Xref "save_aelem_flags"
.IX Item "save_aelem_flags"
.IP "save_alloc" 4
.IX Xref "save_alloc"
.IX Item "save_alloc"
.IP "save_aptr" 4
.IX Xref "save_aptr"
.IX Item "save_aptr"
.IP "save_ary" 4
.IX Xref "save_ary"
.IX Item "save_ary"
.IP "save_bool" 4
.IX Xref "save_bool"
.IX Item "save_bool"
.IP "save_clearsv" 4
.IX Xref "save_clearsv"
.IX Item "save_clearsv"
.IP "save_delete" 4
.IX Xref "save_delete"
.IX Item "save_delete"
.IP "save_destructor" 4
.IX Xref "save_destructor"
.IX Item "save_destructor"
.IP "save_destructor_x" 4
.IX Xref "save_destructor_x"
.IX Item "save_destructor_x"
.IP "save_freeop" 4
.IX Xref "save_freeop"
.IX Item "save_freeop"
.IP "save_freepv" 4
.IX Xref "save_freepv"
.IX Item "save_freepv"
.IP "save_freesv" 4
.IX Xref "save_freesv"
.IX Item "save_freesv"
.IP "save_generic_pvref" 4
.IX Xref "save_generic_pvref"
.IX Item "save_generic_pvref"
.IP "save_generic_svref" 4
.IX Xref "save_generic_svref"
.IX Item "save_generic_svref"
.IP "save_gp" 4
.IX Xref "save_gp"
.IX Item "save_gp"
.IP "save_hash" 4
.IX Xref "save_hash"
.IX Item "save_hash"
.IP "save_hdelete" 4
.IX Xref "save_hdelete"
.IX Item "save_hdelete"
.IP "save_helem" 4
.IX Xref "save_helem"
.IX Item "save_helem"
.IP "save_helem_flags" 4
.IX Xref "save_helem_flags"
.IX Item "save_helem_flags"
.IP "save_hints" 4
.IX Xref "save_hints"
.IX Item "save_hints"
.IP "save_hptr" 4
.IX Xref "save_hptr"
.IX Item "save_hptr"
.IP "save_int" 4
.IX Xref "save_int"
.IX Item "save_int"
.IP "save_item" 4
.IX Xref "save_item"
.IX Item "save_item"
.IP "save_iv" 4
.IX Xref "save_iv"
.IX Item "save_iv"
.IP "save_list" 4
.IX Xref "save_list"
.IX Item "save_list"
.IP "save_long" 4
.IX Xref "save_long"
.IX Item "save_long"
.IP "save_mortalizesv" 4
.IX Xref "save_mortalizesv"
.IX Item "save_mortalizesv"
.IP "save_nogv" 4
.IX Xref "save_nogv"
.IX Item "save_nogv"
.IP "save_op" 4
.IX Xref "save_op"
.IX Item "save_op"
.IP "save_padsv_and_mortalize" 4
.IX Xref "save_padsv_and_mortalize"
.IX Item "save_padsv_and_mortalize"
.IP "save_pptr" 4
.IX Xref "save_pptr"
.IX Item "save_pptr"
.IP "save_pushi32ptr" 4
.IX Xref "save_pushi32ptr"
.IX Item "save_pushi32ptr"
.IP "save_pushptr" 4
.IX Xref "save_pushptr"
.IX Item "save_pushptr"
.IP "save_pushptrptr" 4
.IX Xref "save_pushptrptr"
.IX Item "save_pushptrptr"
.IP "save_re_context" 4
.IX Xref "save_re_context"
.IX Item "save_re_context"
.IP "save_scalar" 4
.IX Xref "save_scalar"
.IX Item "save_scalar"
.IP "save_set_svflags" 4
.IX Xref "save_set_svflags"
.IX Item "save_set_svflags"
.IP "save_shared_pvref" 4
.IX Xref "save_shared_pvref"
.IX Item "save_shared_pvref"
.IP "save_sptr" 4
.IX Xref "save_sptr"
.IX Item "save_sptr"
.IP "save_svref" 4
.IX Xref "save_svref"
.IX Item "save_svref"
.IP "save_vptr" 4
.IX Xref "save_vptr"
.IX Item "save_vptr"
.IP "savestack_grow" 4
.IX Xref "savestack_grow"
.IX Item "savestack_grow"
.IP "savestack_grow_cnt" 4
.IX Xref "savestack_grow_cnt"
.IX Item "savestack_grow_cnt"
.IP "scan_num" 4
.IX Xref "scan_num"
.IX Item "scan_num"
.IP "scan_vstring" 4
.IX Xref "scan_vstring"
.IX Item "scan_vstring"
.IP "screaminstr" 4
.IX Xref "screaminstr"
.IX Item "screaminstr"
.IP "seed" 4
.IX Xref "seed"
.IX Item "seed"
.IP "set_context" 4
.IX Xref "set_context"
.IX Item "set_context"
.IP "set_numeric_local" 4
.IX Xref "set_numeric_local"
.IX Item "set_numeric_local"
.IP "set_numeric_radix" 4
.IX Xref "set_numeric_radix"
.IX Item "set_numeric_radix"
.IP "set_numeric_standard" 4
.IX Xref "set_numeric_standard"
.IX Item "set_numeric_standard"
.IP "share_hek" 4
.IX Xref "share_hek"
.IX Item "share_hek"
.IP "si_dup" 4
.IX Xref "si_dup"
.IX Item "si_dup"
.IP "ss_dup" 4
.IX Xref "ss_dup"
.IX Item "ss_dup"
.IP "stack_grow" 4
.IX Xref "stack_grow"
.IX Item "stack_grow"
.IP "start_subparse" 4
.IX Xref "start_subparse"
.IX Item "start_subparse"
.IP "stashpv_hvname_match" 4
.IX Xref "stashpv_hvname_match"
.IX Item "stashpv_hvname_match"
.IP "str_to_version" 4
.IX Xref "str_to_version"
.IX Item "str_to_version"
.IP "sv_2iv" 4
.IX Xref "sv_2iv"
.IX Item "sv_2iv"
.IP "sv_2pv" 4
.IX Xref "sv_2pv"
.IX Item "sv_2pv"
.IP "sv_2uv" 4
.IX Xref "sv_2uv"
.IX Item "sv_2uv"
.IP "sv_catpvf_mg_nocontext" 4
.IX Xref "sv_catpvf_mg_nocontext"
.IX Item "sv_catpvf_mg_nocontext"
.IP "sv_catpvf_nocontext" 4
.IX Xref "sv_catpvf_nocontext"
.IX Item "sv_catpvf_nocontext"
.IP "sv_compile_2op" 4
.IX Xref "sv_compile_2op"
.IX Item "sv_compile_2op"
.IP "sv_dump" 4
.IX Xref "sv_dump"
.IX Item "sv_dump"
.IP "sv_dup" 4
.IX Xref "sv_dup"
.IX Item "sv_dup"
.IP "sv_dup_inc" 4
.IX Xref "sv_dup_inc"
.IX Item "sv_dup_inc"
.IP "sv_peek" 4
.IX Xref "sv_peek"
.IX Item "sv_peek"
.IP "sv_pvn_nomg" 4
.IX Xref "sv_pvn_nomg"
.IX Item "sv_pvn_nomg"
.IP "sv_setpvf_mg_nocontext" 4
.IX Xref "sv_setpvf_mg_nocontext"
.IX Item "sv_setpvf_mg_nocontext"
.IP "sv_setpvf_nocontext" 4
.IX Xref "sv_setpvf_nocontext"
.IX Item "sv_setpvf_nocontext"
.IP "sv_utf8_upgrade_flags_grow" 4
.IX Xref "sv_utf8_upgrade_flags_grow"
.IX Item "sv_utf8_upgrade_flags_grow"
.IP "swash_fetch" 4
.IX Xref "swash_fetch"
.IX Item "swash_fetch"
.IP "swash_init" 4
.IX Xref "swash_init"
.IX Item "swash_init"
.IP "sys_init" 4
.IX Xref "sys_init"
.IX Item "sys_init"
.IP "sys_init3" 4
.IX Xref "sys_init3"
.IX Item "sys_init3"
.IP "sys_intern_clear" 4
.IX Xref "sys_intern_clear"
.IX Item "sys_intern_clear"
.IP "sys_intern_dup" 4
.IX Xref "sys_intern_dup"
.IX Item "sys_intern_dup"
.IP "sys_intern_init" 4
.IX Xref "sys_intern_init"
.IX Item "sys_intern_init"
.IP "sys_term" 4
.IX Xref "sys_term"
.IX Item "sys_term"
.IP "taint_env" 4
.IX Xref "taint_env"
.IX Item "taint_env"
.IP "taint_proper" 4
.IX Xref "taint_proper"
.IX Item "taint_proper"
.IP "tmps_grow" 4
.IX Xref "tmps_grow"
.IX Item "tmps_grow"
.IP "to_uni_fold" 4
.IX Xref "to_uni_fold"
.IX Item "to_uni_fold"
.IP "to_uni_lower" 4
.IX Xref "to_uni_lower"
.IX Item "to_uni_lower"
.IP "to_uni_lower_lc" 4
.IX Xref "to_uni_lower_lc"
.IX Item "to_uni_lower_lc"
.IP "to_uni_title" 4
.IX Xref "to_uni_title"
.IX Item "to_uni_title"
.IP "to_uni_title_lc" 4
.IX Xref "to_uni_title_lc"
.IX Item "to_uni_title_lc"
.IP "to_uni_upper" 4
.IX Xref "to_uni_upper"
.IX Item "to_uni_upper"
.IP "to_uni_upper_lc" 4
.IX Xref "to_uni_upper_lc"
.IX Item "to_uni_upper_lc"
.IP "unlnk" 4
.IX Xref "unlnk"
.IX Item "unlnk"
.IP "unsharepvn" 4
.IX Xref "unsharepvn"
.IX Item "unsharepvn"
.IP "utf16_to_utf8" 4
.IX Xref "utf16_to_utf8"
.IX Item "utf16_to_utf8"
.IP "utf16_to_utf8_reversed" 4
.IX Xref "utf16_to_utf8_reversed"
.IX Item "utf16_to_utf8_reversed"
.IP "uvchr_to_utf8_flags" 4
.IX Xref "uvchr_to_utf8_flags"
.IX Item "uvchr_to_utf8_flags"
.IP "uvuni_to_utf8" 4
.IX Xref "uvuni_to_utf8"
.IX Item "uvuni_to_utf8"
.IP "vdeb" 4
.IX Xref "vdeb"
.IX Item "vdeb"
.IP "vform" 4
.IX Xref "vform"
.IX Item "vform"
.IP "vload_module" 4
.IX Xref "vload_module"
.IX Item "vload_module"
.IP "vnewSVpvf" 4
.IX Xref "vnewSVpvf"
.IX Item "vnewSVpvf"
.IP "vwarner" 4
.IX Xref "vwarner"
.IX Item "vwarner"
.IP "warn_nocontext" 4
.IX Xref "warn_nocontext"
.IX Item "warn_nocontext"
.IP "warner" 4
.IX Xref "warner"
.IX Item "warner"
.IP "warner_nocontext" 4
.IX Xref "warner_nocontext"
.IX Item "warner_nocontext"
.IP "whichsig" 4
.IX Xref "whichsig"
.IX Item "whichsig"
.IP "whichsig_pv" 4
.IX Xref "whichsig_pv"
.IX Item "whichsig_pv"
.IP "whichsig_pvn" 4
.IX Xref "whichsig_pvn"
.IX Item "whichsig_pvn"
.IP "whichsig_sv" 4
.IX Xref "whichsig_sv"
.IX Item "whichsig_sv"
.PD
.SH "AUTHORS"
.IX Header "AUTHORS"
Until May 1997, this document was maintained by Jeff Okamoto
<okamoto@corp.hp.com>.  It is now maintained as part of Perl itself.
.PP
With lots of help and suggestions from Dean Roehrich, Malcolm Beattie,
Andreas Koenig, Paul Hudson, Ilya Zakharevich, Paul Marquess, Neil
Bowers, Matthew Green, Tim Bunce, Spider Boardman, Ulrich Pfeifer,
Stephen McCamant, and Gurusamy Sarathy.
.PP
\&\s-1API\s0 Listing originally by Dean Roehrich <roehrich@cray.com>.
.PP
Updated to be autogenerated from comments in the source by Benjamin Stuhl.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
perlguts, perlxs, perlxstut, perlintern
