AV* newAV()
=for hackers
-Found in file av.c
+Found in file av.h
=item sortsv
X<sortsv>
|const U32 flags
Converts a string into something presentable, handling escaping via
-pv_escape() and supporting quoting and elipses.
+pv_escape() and supporting quoting and ellipses.
If the PERL_PV_PRETTY_QUOTE flag is set then the result will be
double quoted with any double quotes in the string escaped. Otherwise
if the PERL_PV_PRETTY_LTGT flag is set then the result be wrapped in
angle brackets.
-If the PERL_PV_PRETTY_ELIPSES flag is set and not all characters in
-string were output then an elipses C<...> will be appended to the
+If the PERL_PV_PRETTY_ELLIPSES flag is set and not all characters in
+string were output then an ellipsis C<...> will be appended to the
string. Note that this happens AFTER it has been quoted.
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 elipses.
+any quotes or ellipses.
Returns a pointer to the prettified text as held by dsv.
Null AV pointer.
+(deprecated - use C<(AV *)NULL> instead)
+
=for hackers
Found in file av.h
=item Nullch
X<Nullch>
-Null character pointer.
+Null character pointer. (No longer available when C<PERL_CORE> is defined.)
=for hackers
Found in file handy.h
Null CV pointer.
+(deprecated - use C<(CV *)NULL> instead)
+
=for hackers
Found in file cv.h
Null HV pointer.
+(deprecated - use C<(HV *)NULL> instead)
+
=for hackers
Found in file hv.h
=item Nullsv
X<Nullsv>
-Null SV pointer.
+Null SV pointer. (No longer available when C<PERL_CORE> is defined.)
=for hackers
Found in file handy.h
variable. Remember though, that hash keys in perl are free to contain
embedded nulls, so using C<strlen()> or similar is not a good way to find
the length of hash keys. This is very similar to the C<SvPV()> macro
-described elsewhere in this document.
+described elsewhere in this document. See also C<HeUTF8>.
+
+If you are using C<HePV> to get values to pass to C<newSVpvn()> to create a
+new SV, you should consider using C<newSVhek(HeKEY_hek(he))> as it is more
+efficient.
char* HePV(HE* he, STRLEN len)
=for hackers
Found in file hv.h
+=item HeUTF8
+X<HeUTF8>
+
+Returns whether the C<char *> value returned by C<HePV> is encoded in UTF-8,
+doing any necessary dereferencing of possibly C<SV*> keys. The value returned
+will be 0 or non-0, not necessarily 1 (or even a value with any low bits set),
+so B<do not> blindly assign this to a C<bool> variable, as C<bool> may be a
+typedef for C<char>.
+
+ char* HeUTF8(HE* he, STRLEN len)
+
+=for hackers
+Found in file hv.h
+
=item HeVAL
X<HeVAL>
HV* newHV()
=for hackers
-Found in file hv.c
+Found in file hv.h
=back
=for hackers
Found in file handy.h
+=item sv_destroyable
+X<sv_destroyable>
+
+Dummy routine which reports that object can be destroyed when there is no
+sharing module present. It ignores its single SV argument, and returns
+'true'. Exists to avoid test for a NULL function pointer and because it
+could potentially warn under some level of strict-ness.
+
+ bool sv_destroyable(SV *sv)
+
+=for hackers
+Found in file util.c
+
=item sv_nosharing
X<sv_nosharing>
X<mPUSHi>
Push an integer onto the stack. The stack must have room for this element.
-Handles 'set' magic. Does not use C<TARG>. See also C<PUSHi>, C<mXPUSHi>
-and C<XPUSHi>.
+Does not use C<TARG>. See also C<PUSHi>, C<mXPUSHi> and C<XPUSHi>.
void mPUSHi(IV iv)
X<mPUSHn>
Push a double onto the stack. The stack must have room for this element.
-Handles 'set' magic. Does not use C<TARG>. See also C<PUSHn>, C<mXPUSHn>
-and C<XPUSHn>.
+Does not use C<TARG>. See also C<PUSHn>, C<mXPUSHn> and C<XPUSHn>.
void mPUSHn(NV nv)
X<mPUSHp>
Push a string onto the stack. The stack must have room for this element.
-The C<len> indicates the length of the string. Handles 'set' magic. Does
-not use C<TARG>. See also C<PUSHp>, C<mXPUSHp> and C<XPUSHp>.
+The C<len> indicates the length of the string. Does not use C<TARG>.
+See also C<PUSHp>, C<mXPUSHp> and C<XPUSHp>.
void mPUSHp(char* str, STRLEN len)
=for hackers
Found in file pp.h
+=item mPUSHs
+X<mPUSHs>
+
+Push an SV onto the stack and mortalizes the SV. The stack must have room
+for this element. Does not use C<TARG>. See also C<PUSHs> and C<mXPUSHs>.
+
+ void mPUSHs(SV* sv)
+
+=for hackers
+Found in file pp.h
+
=item mPUSHu
X<mPUSHu>
Push an unsigned integer onto the stack. The stack must have room for this
-element. Handles 'set' magic. Does not use C<TARG>. See also C<PUSHu>,
-C<mXPUSHu> and C<XPUSHu>.
+element. Does not use C<TARG>. See also C<PUSHu>, C<mXPUSHu> and C<XPUSHu>.
void mPUSHu(UV uv)
=item mXPUSHi
X<mXPUSHi>
-Push an integer onto the stack, extending the stack if necessary. Handles
-'set' magic. Does not use C<TARG>. See also C<XPUSHi>, C<mPUSHi> and
-C<PUSHi>.
+Push an integer onto the stack, extending the stack if necessary.
+Does not use C<TARG>. See also C<XPUSHi>, C<mPUSHi> and C<PUSHi>.
void mXPUSHi(IV iv)
=item mXPUSHn
X<mXPUSHn>
-Push a double onto the stack, extending the stack if necessary. Handles
-'set' magic. Does not use C<TARG>. See also C<XPUSHn>, C<mPUSHn> and
-C<PUSHn>.
+Push a double onto the stack, extending the stack if necessary.
+Does not use C<TARG>. See also C<XPUSHn>, C<mPUSHn> and C<PUSHn>.
void mXPUSHn(NV nv)
X<mXPUSHp>
Push a string onto the stack, extending the stack if necessary. The C<len>
-indicates the length of the string. Handles 'set' magic. Does not use
-C<TARG>. See also C<XPUSHp>, C<mPUSHp> and C<PUSHp>.
+indicates the length of the string. Does not use C<TARG>. See also C<XPUSHp>,
+C<mPUSHp> and C<PUSHp>.
void mXPUSHp(char* str, STRLEN len)
=for hackers
Found in file pp.h
+=item mXPUSHs
+X<mXPUSHs>
+
+Push an SV onto the stack, extending the stack if necessary and mortalizes
+the SV. Does not use C<TARG>. See also C<XPUSHs> and C<mPUSHs>.
+
+ void mXPUSHs(SV* sv)
+
+=for hackers
+Found in file pp.h
+
=item mXPUSHu
X<mXPUSHu>
Push an unsigned integer onto the stack, extending the stack if necessary.
-Handles 'set' magic. Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu>
-and C<PUSHu>.
+Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>.
void mXPUSHu(UV uv)
X<PUSHmortal>
Push a new mortal SV onto the stack. The stack must have room for this
-element. Does not handle 'set' magic. Does not use C<TARG>. See also
-C<PUSHs>, C<XPUSHmortal> and C<XPUSHs>.
+element. Does not use C<TARG>. See also C<PUSHs>, C<XPUSHmortal> and C<XPUSHs>.
void PUSHmortal()
=item XPUSHmortal
X<XPUSHmortal>
-Push a new mortal SV onto the stack, extending the stack if necessary. Does
-not handle 'set' magic. Does not use C<TARG>. See also C<XPUSHs>,
-C<PUSHmortal> and C<PUSHs>.
+Push a new mortal SV onto the stack, extending the stack if necessary.
+Does not use C<TARG>. See also C<XPUSHs>, C<PUSHmortal> and C<PUSHs>.
void XPUSHmortal()
=for hackers
Found in file sv.h
+=item newSVpvn_utf8
+X<newSVpvn_utf8>
+
+Creates a new SV and copies a string into it. If utf8 is true, calls
+C<SvUTF8_on> on the new SV. Implemented as a wrapper around C<newSVpvn_flags>.
+
+ SV* newSVpvn_utf8(NULLOK const char* s, STRLEN len, U32 utf8)
+
+=for hackers
+Found in file sv.h
+
=item SvCUR
X<SvCUR>
=item SvOOK
X<SvOOK>
-Returns a U32 indicating whether the SvIVX is a valid offset value for
-the SvPVX. 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 really (SvPVX - SvIVX).
+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 C<SvOOK_offset()> bytes before SvPVX.
+This offset used to be stored in SvIVX, but is now stored within the spare
+part of the buffer.
U32 SvOOK(SV* sv)
=for hackers
Found in file sv.h
+=item SvOOK_offset
+X<SvOOK_offset>
+
+Reads into I<len> the offset from SvPVX back to the true start of the
+allocated buffer, which will be non-zero if C<sv_chop> has been used to
+efficiently remove characters from start of the buffer. Implemented as a
+macro, which takes the address of I<len>, which must be of type C<STRLEN>.
+Evaluates I<sv> more than once. Sets I<len> to 0 if C<SvOOK(sv)> is false.
+
+ void SvOOK_offset(NN SV*sv, STRLEN len)
+
+=for hackers
+Found in file sv.h
+
=item SvPOK
X<SvPOK>
I<at the C level>. To check derivation at the Perl level, call C<isa()> as a
normal Perl method.
- bool sv_derived_from(SV* sv, const char* name)
+ bool sv_derived_from(SV* sv, const char *const name)
=for hackers
Found in file universal.c
Returns a boolean indicating whether the SV performs a specific, named role.
The SV can be a Perl object or the name of a Perl class.
- bool sv_does(SV* sv, const char* name)
+ bool sv_does(SV* sv, const char *const name)
=for hackers
Found in file universal.c
=for hackers
Found in file sv.c
+=item newSVpvn_flags
+X<newSVpvn_flags>
+
+Creates a new SV and copies a string into it. The reference count for the
+SV is set to 1. Note that if C<len> is zero, Perl will create a zero length
+string. You are responsible for ensuring that the source string is at least
+C<len> bytes long. If the C<s> argument is NULL the new SV will be undefined.
+Currently the only flag bits accepted are C<SVf_UTF8> and C<SVs_TEMP>.
+If C<SVs_TEMP> is set, then C<sv2mortal()> is called on the result before
+returning. If C<SVf_UTF8> is set, then it will be set on the new SV.
+C<newSVpvn_utf8()> is a convenience wrapper for this function, defined as
+
+ #define newSVpvn_utf8(s, len, u) \
+ newSVpvn_flags((s), (len), (u) ? SVf_UTF8 : 0)
+
+ SV* newSVpvn_flags(const char* s, STRLEN len, U32 flags)
+
+=for hackers
+Found in file sv.c
+
=item newSVpvn_share
X<newSVpvn_share>
=for hackers
Found in file handy.h
+=item newSVpvs_flags
+X<newSVpvs_flags>
+
+Like C<newSVpvn_flags>, but takes a literal string instead of a string/length
+pair.
+
+ SV* newSVpvs_flags(const char* s, U32 flags)
+
+=for hackers
+Found in file handy.h
+
=item newSVpvs_share
X<newSVpvs_share>
=item newSV_type
X<newSV_type>
-Creates a new SV, of the type specificied. The reference count for the new SV
+Creates a new SV, of the type specified. The reference count for the new SV
is set to 1.
SV* newSV_type(svtype type)
Compares the strings in two SVs in a locale-aware manner. Is UTF-8 and
'use bytes' aware, handles get magic, and will coerce its args to strings
-if necessary. See also C<sv_cmp_locale>. See also C<sv_cmp>.
+if necessary. See also C<sv_cmp>.
I32 sv_cmp_locale(SV* sv1, SV* sv2)