=item HvNAME
-Returns the package name of a stash. See C<SvSTASH>, C<CvSTASH>.
+Returns the package name of a stash, or NULL if C<stash> isn't a stash.
+See C<SvSTASH>, C<CvSTASH>.
char* HvNAME(HV* stash)
=for hackers
Found in file handy.h
-=item New
+=item Newx
The XSUB-writer's interface to the C C<malloc> function.
- void New(int id, void* ptr, int nitems, type)
+In 5.9.3, Newx() and friends replace the older New() API, and drops
+the first parameter, I<x>, a debug aid which allowed callers to identify
+themselves. This aid has been superceded by a new build option,
+PERL_MEM_LOG (see L<perlhack/PERL_MEM_LOG>). The older API is still
+there for use in XS modules supporting older perls.
+
+ void Newx(void* ptr, int nitems, type)
=for hackers
Found in file handy.h
-=item Newc
+=item Newxc
The XSUB-writer's interface to the C C<malloc> function, with
-cast.
+cast. See also C<Newx>.
- void Newc(int id, void* ptr, int nitems, type, cast)
+ void Newxc(void* ptr, int nitems, type, cast)
=for hackers
Found in file handy.h
-=item Newz
+=item Newxz
The XSUB-writer's interface to the C C<malloc> function. The allocated
-memory is zeroed with C<memzero>.
+memory is zeroed with C<memzero>. See also C<Newx>.
- void Newz(int id, void* ptr, int nitems, type)
+ void Newxz(void* ptr, int nitems, type)
=for hackers
Found in file handy.h
should be interpreted as if it had multiple decimals, even if
it doesn't.
- char* scan_version(const char *vstr, SV *sv, bool qv)
+ const char* scan_version(const char *vstr, SV *sv, bool qv)
=for hackers
Found in file util.c
C<PERL_SCAN_ALLOW_UNDERSCORES> is set in I<*flags> then the binary
number may use '_' characters to separate digits.
- UV grok_bin(const char* start, STRLEN* len, I32* flags, NV *result)
+ UV grok_bin(const char* start, STRLEN* len_p, I32* flags, NV *result)
=for hackers
Found in file numeric.c
C<PERL_SCAN_ALLOW_UNDERSCORES> is set in I<*flags> then the hex
number may use '_' characters to separate digits.
- UV grok_hex(const char* start, STRLEN* len, I32* flags, NV *result)
+ UV grok_hex(const char* start, STRLEN* len_p, I32* flags, NV *result)
=for hackers
Found in file numeric.c
If C<PERL_SCAN_ALLOW_UNDERSCORES> is set in I<*flags> then the octal
number may use '_' characters to separate digits.
- UV grok_oct(const char* start, STRLEN* len, I32* flags, NV *result)
+ UV grok_oct(const char* start, STRLEN* len_p, I32* flags, NV *result)
=for hackers
Found in file numeric.c
=item POPp
-Pops a string off the stack. Deprecated. New code should provide
-a STRLEN n_a and use POPpx.
+Pops a string off the stack. Deprecated. New code should use POPpx.
char* POPp
=item POPpbytex
Pops a string off the stack which must consist of bytes i.e. characters < 256.
-Requires a variable STRLEN n_a in scope.
char* POPpbytex
=item POPpx
Pops a string off the stack.
-Requires a variable STRLEN n_a in scope.
char* POPpx
=for hackers
Found in file sv.c
+=item newSVhek
+
+Creates a new SV from the hash key structure. It will generate scalars that
+point to the shared string table where possible. Returns a new (undefined)
+SV if the hek is NULL.
+
+ SV* newSVhek(const HEK *hek)
+
+=for hackers
+Found in file sv.c
+
=item newSViv
Creates a new SV and copies an integer into it. The reference count for the
=item newSVpvn_share
-Creates a new SV with its SvPVX pointing to a shared string in the string
+Creates a new SV 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 READONLY and FAKE. The string's hash is stored in the UV
slot of the SV; if the C<hash> parameter is non-zero, that value is used;
otherwise the hash is computed. The idea here is that as the string table
-is used for shared hash keys these strings will have SvPVX == HeKEY and
+is used for shared hash keys these strings will have SvPVX_const == HeKEY and
hash lookup will avoid string compare.
SV* newSVpvn_share(const char* s, I32 len, U32 hash)
=item SvCUR_set
-Set the current length of the string which is in the SV. See C<SvCUR>.
+Set the current length of the string which is in the SV. See C<SvCUR>
+and C<SvIV_set>.
void SvCUR_set(SV* sv, STRLEN len)
=item SvIV_set
-Set the value of the IV pointer in sv to val.
+Set the value of the IV pointer in sv to val. It is possible to perform
+the same function of this macro with an lvalue assignment to C<SvIVX>.
+With future Perls, however, it will be more efficient to use
+C<SvIV_set> instead of the lvalue assignment to C<SvIVX>.
void SvIV_set(SV* sv, IV val)
=item SvLEN_set
-Set the actual length of the string which is in the SV.
+Set the actual length of the string which is in the SV. See C<SvIV_set>.
void SvLEN_set(SV* sv, STRLEN len)
=item SvMAGIC_set
-Set the value of the MAGIC pointer in sv to val.
+Set the value of the MAGIC pointer in sv to val. See C<SvIV_set>.
void SvMAGIC_set(SV* sv, MAGIC* val)
=item SvNV_set
-Set the value of the IV pointer in sv to val.
+Set the value of the NV pointer in sv to val. See C<SvIV_set>.
void SvNV_set(SV* sv, NV val)
=item SvPV_set
-Set the value of the PV pointer in sv to val.
+Set the value of the PV pointer in sv to val. See C<SvIV_set>.
void SvPV_set(SV* sv, char* val)
=item SvRV_set
-Set the value of the RV pointer in sv to val.
+Set the value of the RV pointer in sv to val. See C<SvIV_set>.
void SvRV_set(SV* sv, SV* val)
=item SvSTASH_set
-Set the value of the STASH pointer in sv to val.
+Set the value of the STASH pointer in sv to val. See C<SvIV_set>.
void SvSTASH_set(SV* sv, STASH* val)
=item SvUV_set
-Set the value of the PV pointer in sv to val.
+Set the value of the UV pointer in sv to val. See C<SvIV_set>.
void SvUV_set(SV* sv, UV val)
SvPOK(sv) must be true and the C<ptr> must be a pointer to somewhere inside
the string buffer. The C<ptr> becomes the first character of the adjusted
string. Uses the "OOK hack".
-Beware: after this function returns, C<ptr> and SvPVX(sv) may no longer
+Beware: after this function returns, C<ptr> and SvPVX_const(sv) may no longer
refer to the same chunk of data.
- void sv_chop(SV* sv, char* ptr)
+ void sv_chop(SV* sv, const char* ptr)
=for hackers
Found in file sv.c
Note that C<sv_setref_pv> copies the pointer while this copies the string.
- SV* sv_setref_pvn(SV* rv, const char* classname, char* pv, STRLEN n)
+ SV* sv_setref_pvn(SV* rv, const char* classname, const char* pv, STRLEN n)
=for hackers
Found in file sv.c
SV, then copies across as much information as possible from the old body.
You generally want to use the C<SvUPGRADE> macro wrapper. See also C<svtype>.
- bool sv_upgrade(SV* sv, U32 mt)
+ void sv_upgrade(SV* sv, U32 mt)
=for hackers
Found in file sv.c
not mean 'a string that contains code points above 0x7F encoded in UTF-8'
because a valid ASCII string is a valid UTF-8 string.
+See also is_utf8_string_loclen() and is_utf8_string_loc().
+
bool is_utf8_string(const U8 *s, STRLEN len)
=for hackers
=item is_utf8_string_loc
-Like is_ut8_string but store the location of the failure in
-the last argument.
+Like is_ut8_string() but stores the location of the failure (in the
+case of "utf8ness failure") or the location s+len (in the case of
+"utf8ness success") in the C<ep>.
+
+See also is_utf8_string_loclen() and is_utf8_string().
bool is_utf8_string_loc(const U8 *s, STRLEN len, const U8 **p)
=for hackers
Found in file utf8.c
+=item is_utf8_string_loclen
+
+Like is_ut8_string() but stores the location of the failure (in the
+case of "utf8ness failure") or the location s+len (in the case of
+"utf8ness success") in the C<ep>, and the number of UTF-8
+encoded characters in the C<el>.
+
+See also is_utf8_string_loc() and is_utf8_string().
+
+ bool is_utf8_string_loclen(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el)
+
+=for hackers
+Found in file utf8.c
+
=item pv_uni_display
Build to the scalar dsv a displayable version of the string spv,
The "normal" is a string like "ToLower" which means the swash
%utf8::ToLower.
- UV to_utf8_case(const U8 *p, U8* ustrp, STRLEN *lenp, SV **swash, const char *normal, const char *special)
+ UV to_utf8_case(const U8 *p, U8* ustrp, STRLEN *lenp, SV **swashp, const char *normal, const char *special)
=for hackers
Found in file utf8.c
Allows length and flags to be passed to low level routine.
- UV utf8n_to_uvchr(const U8 *s, STRLEN curlen, STRLEN* retlen, U32 flags)
+ UV utf8n_to_uvchr(const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags)
=for hackers
Found in file utf8.c
Most code should use utf8_to_uvchr() rather than call this directly.
- UV utf8n_to_uvuni(const U8 *s, STRLEN curlen, STRLEN* retlen, U32 flags)
+ UV utf8n_to_uvuni(const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags)
=for hackers
Found in file utf8.c
If C<s> does not point to a well-formed UTF-8 character, zero is
returned and retlen is set, if possible, to -1.
- UV utf8_to_uvchr(const U8 *s, STRLEN* retlen)
+ UV utf8_to_uvchr(const U8 *s, STRLEN *retlen)
=for hackers
Found in file utf8.c
If C<s> does not point to a well-formed UTF-8 character, zero is
returned and retlen is set, if possible, to -1.
- UV utf8_to_uvuni(const U8 *s, STRLEN* retlen)
+ UV utf8_to_uvuni(const U8 *s, STRLEN *retlen)
=for hackers
Found in file utf8.c