home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 2000-03-23 | 91.4 KB | 2,234 lines
<HTML> <HEAD> <TITLE>perlapi - autogenerated documentation for the perl public API</TITLE> <LINK REL="stylesheet" HREF="../../Active.css" TYPE="text/css"> <LINK REV="made" HREF="mailto:"> </HEAD> <BODY> <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%> <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc"> <STRONG><P CLASS=block> perlapi - autogenerated documentation for the perl public API</P></STRONG> </TD></TR> </TABLE> <A NAME="__index__"></A> <!-- INDEX BEGIN --> <UL> <LI><A HREF="#name">NAME</A></LI> <LI><A HREF="#description">DESCRIPTION</A></LI> <LI><A HREF="#authors">AUTHORS</A></LI> <LI><A HREF="#see also">SEE ALSO</A></LI> </UL> <!-- INDEX END --> <HR> <P> <H1><A NAME="name">NAME</A></H1> <P>perlapi - autogenerated documentation for the perl public API</P> <P> <HR> <H1><A NAME="description">DESCRIPTION</A></H1> <P>This file contains the documentation of the perl public API generated by embed.pl, specifically a listing of functions, macros, flags, and variables that may be used by extension writers. The interfaces of any functions that are not listed here are subject to change without notice. For this reason, blindly using functions listed in proto.h is to be avoided when writing extensions.</P> <P>Note that all Perl API global variables must be referenced with the <CODE>PL_</CODE> prefix. Some macros are provided for compatibility with the older, unadorned names, but this support may be disabled in a future release.</P> <P>The listing is alphabetical, case insensitive.</P> <DL> <DT><STRONG><A NAME="item_AvFILL">AvFILL</A></STRONG><BR> <DD> Same as <A HREF="#item_av_len"><CODE>av_len()</CODE></A>. Deprecated, use <A HREF="#item_av_len"><CODE>av_len()</CODE></A> instead. <PRE> int AvFILL(AV* av)</PRE> <P></P> <DT><STRONG><A NAME="item_av_clear">av_clear</A></STRONG><BR> <DD> Clears an array, making it empty. Does not free the memory used by the array itself. <PRE> void av_clear(AV* ar)</PRE> <P></P> <DT><STRONG><A NAME="item_av_extend">av_extend</A></STRONG><BR> <DD> Pre-extend an array. The <CODE>key</CODE> is the index to which the array should be extended. <PRE> void av_extend(AV* ar, I32 key)</PRE> <P></P> <DT><STRONG><A NAME="item_av_fetch">av_fetch</A></STRONG><BR> <DD> Returns the SV at the specified index in the array. The <CODE>key</CODE> is the index. If <CODE>lval</CODE> is set then the fetch will be part of a store. Check that the return value is non-null before dereferencing it to a <CODE>SV*</CODE>. <P>See <A HREF="../../lib/Pod/perlguts.html#understanding the magic of tied hashes and arrays">Understanding the Magic of Tied Hashes and Arrays in the perlguts manpage</A> for more information on how to use this function on tied arrays.</P> <PRE> SV** av_fetch(AV* ar, I32 key, I32 lval)</PRE> <P></P> <DT><STRONG><A NAME="item_av_len">av_len</A></STRONG><BR> <DD> Returns the highest index in the array. Returns -1 if the array is empty. <PRE> I32 av_len(AV* ar)</PRE> <P></P> <DT><STRONG><A NAME="item_av_make">av_make</A></STRONG><BR> <DD> Creates a new AV 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 AV will have a reference count of 1. <PRE> AV* av_make(I32 size, SV** svp)</PRE> <P></P> <DT><STRONG><A NAME="item_av_pop">av_pop</A></STRONG><BR> <DD> Pops an SV off the end of the array. Returns <CODE>&PL_sv_undef</CODE> if the array is empty. <PRE> SV* av_pop(AV* ar)</PRE> <P></P> <DT><STRONG><A NAME="item_av_push">av_push</A></STRONG><BR> <DD> Pushes an SV onto the end of the array. The array will grow automatically to accommodate the addition. <PRE> void av_push(AV* ar, SV* val)</PRE> <P></P> <DT><STRONG><A NAME="item_av_shift">av_shift</A></STRONG><BR> <DD> Shifts an SV off the beginning of the array. <PRE> SV* av_shift(AV* ar)</PRE> <P></P> <DT><STRONG><A NAME="item_av_store">av_store</A></STRONG><BR> <DD> Stores an SV in an array. The array index is specified as <CODE>key</CODE>. The return value will be NULL 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 original <CODE>SV*</CODE>. Note that the caller is responsible for suitably incrementing the reference count of <CODE>val</CODE> before the call, and decrementing it if the function returned NULL. <P>See <A HREF="../../lib/Pod/perlguts.html#understanding the magic of tied hashes and arrays">Understanding the Magic of Tied Hashes and Arrays in the perlguts manpage</A> for more information on how to use this function on tied arrays.</P> <PRE> SV** av_store(AV* ar, I32 key, SV* val)</PRE> <P></P> <DT><STRONG><A NAME="item_av_undef">av_undef</A></STRONG><BR> <DD> Undefines the array. Frees the memory used by the array itself. <PRE> void av_undef(AV* ar)</PRE> <P></P> <DT><STRONG><A NAME="item_av_unshift">av_unshift</A></STRONG><BR> <DD> Unshift the given number of <A HREF="../../lib/Pod/perlfunc.html#item_undef"><CODE>undef</CODE></A> values onto the beginning of the array. The array will grow automatically to accommodate the addition. You must then use <A HREF="#item_av_store"><CODE>av_store</CODE></A> to assign values to these new elements. <PRE> void av_unshift(AV* ar, I32 num)</PRE> <P></P> <DT><STRONG><A NAME="item_call_argv">call_argv</A></STRONG><BR> <DD> Performs a callback to the specified Perl sub. See <A HREF="../../lib/Pod/perlcall.html">the perlcall manpage</A>. <P>NOTE: the perl_ form of this function is deprecated.</P> <PRE> I32 call_argv(const char* sub_name, I32 flags, char** argv)</PRE> <P></P> <DT><STRONG><A NAME="item_call_method">call_method</A></STRONG><BR> <DD> Performs a callback to the specified Perl method. The blessed object must be on the stack. See <A HREF="../../lib/Pod/perlcall.html">the perlcall manpage</A>. <P>NOTE: the perl_ form of this function is deprecated.</P> <PRE> I32 call_method(const char* methname, I32 flags)</PRE> <P></P> <DT><STRONG><A NAME="item_call_pv">call_pv</A></STRONG><BR> <DD> Performs a callback to the specified Perl sub. See <A HREF="../../lib/Pod/perlcall.html">the perlcall manpage</A>. <P>NOTE: the perl_ form of this function is deprecated.</P> <PRE> I32 call_pv(const char* sub_name, I32 flags)</PRE> <P></P> <DT><STRONG><A NAME="item_call_sv">call_sv</A></STRONG><BR> <DD> Performs a callback to the Perl sub whose name is in the SV. See <A HREF="../../lib/Pod/perlcall.html">the perlcall manpage</A>. <P>NOTE: the perl_ form of this function is deprecated.</P> <PRE> I32 call_sv(SV* sv, I32 flags)</PRE> <P></P> <DT><STRONG><A NAME="item_CLASS">CLASS</A></STRONG><BR> <DD> Variable which is setup by <CODE>xsubpp</CODE> to indicate the class name for a C++ XS constructor. This is always a <CODE>char*</CODE>. See <A HREF="#item_THIS"><CODE>THIS</CODE></A>. <PRE> char* CLASS</PRE> <P></P> <DT><STRONG><A NAME="item_Copy">Copy</A></STRONG><BR> <DD> The XSUB-writer's interface to the C <CODE>memcpy</CODE> function. The <CODE>src</CODE> is the source, <CODE>dest</CODE> is the destination, <CODE>nitems</CODE> is the number of items, and <CODE>type</CODE> is the type. May fail on overlapping copies. See also <A HREF="#item_Move"><CODE>Move</CODE></A>. <PRE> void Copy(void* src, void* dest, int nitems, type)</PRE> <P></P> <DT><STRONG><A NAME="item_croak">croak</A></STRONG><BR> <DD> This is the XSUB-writer's interface to Perl's <A HREF="../../lib/Pod/perlfunc.html#item_die"><CODE>die</CODE></A> function. Use this function the same way you use the C <A HREF="../../lib/Pod/perlfunc.html#item_printf"><CODE>printf</CODE></A> function. See <A HREF="#item_warn"><CODE>warn</CODE></A>. <PRE> void croak(const char* pat, ...)</PRE> <P></P> <DT><STRONG><A NAME="item_CvSTASH">CvSTASH</A></STRONG><BR> <DD> Returns the stash of the CV. <PRE> HV* CvSTASH(CV* cv)</PRE> <P></P> <DT><STRONG><A NAME="item_dMARK">dMARK</A></STRONG><BR> <DD> Declare a stack marker variable, <CODE>mark</CODE>, for the XSUB. See <A HREF="#item_MARK"><CODE>MARK</CODE></A> and <A HREF="#item_dORIGMARK"><CODE>dORIGMARK</CODE></A>. <PRE> dMARK;</PRE> <P></P> <DT><STRONG><A NAME="item_dORIGMARK">dORIGMARK</A></STRONG><BR> <DD> Saves the original stack mark for the XSUB. See <A HREF="#item_ORIGMARK"><CODE>ORIGMARK</CODE></A>. <PRE> dORIGMARK;</PRE> <P></P> <DT><STRONG><A NAME="item_dSP">dSP</A></STRONG><BR> <DD> Declares a local copy of perl's stack pointer for the XSUB, available via the <A HREF="#item_SP"><CODE>SP</CODE></A> macro. See <A HREF="#item_SP"><CODE>SP</CODE></A>. <PRE> dSP;</PRE> <P></P> <DT><STRONG><A NAME="item_dXSARGS">dXSARGS</A></STRONG><BR> <DD> Sets up stack and mark pointers for an XSUB, calling dSP and dMARK. This is usually handled automatically by <CODE>xsubpp</CODE>. Declares the <A HREF="#item_items"><CODE>items</CODE></A> variable to indicate the number of items on the stack. <PRE> dXSARGS;</PRE> <P></P> <DT><STRONG><A NAME="item_dXSI32">dXSI32</A></STRONG><BR> <DD> Sets up the <A HREF="#item_ix"><CODE>ix</CODE></A> variable for an XSUB which has aliases. This is usually handled automatically by <CODE>xsubpp</CODE>. <PRE> dXSI32;</PRE> <P></P> <DT><STRONG><A NAME="item_ENTER">ENTER</A></STRONG><BR> <DD> Opening bracket on a callback. See <A HREF="#item_LEAVE"><CODE>LEAVE</CODE></A> and <A HREF="../../lib/Pod/perlcall.html">the perlcall manpage</A>. <PRE> ENTER;</PRE> <P></P> <DT><STRONG><A NAME="item_eval_pv">eval_pv</A></STRONG><BR> <DD> Tells Perl to <A HREF="../../lib/Pod/perlfunc.html#item_eval"><CODE>eval</CODE></A> the given string and return an SV* result. <P>NOTE: the perl_ form of this function is deprecated.</P> <PRE> SV* eval_pv(const char* p, I32 croak_on_error)</PRE> <P></P> <DT><STRONG><A NAME="item_eval_sv">eval_sv</A></STRONG><BR> <DD> Tells Perl to <A HREF="../../lib/Pod/perlfunc.html#item_eval"><CODE>eval</CODE></A> the string in the SV. <P>NOTE: the perl_ form of this function is deprecated.</P> <PRE> I32 eval_sv(SV* sv, I32 flags)</PRE> <P></P> <DT><STRONG><A NAME="item_EXTEND">EXTEND</A></STRONG><BR> <DD> Used to extend the argument stack for an XSUB's return values. Once used, guarrantees that there is room for at least <CODE>nitems</CODE> to be pushed onto the stack. <PRE> void EXTEND(SP, int nitems)</PRE> <P></P> <DT><STRONG><A NAME="item_fbm_compile">fbm_compile</A></STRONG><BR> <DD> Analyses the string in order to make fast searches on it using <A HREF="#item_fbm_instr"><CODE>fbm_instr()</CODE></A> -- the Boyer-Moore algorithm. <PRE> void fbm_compile(SV* sv, U32 flags)</PRE> <P></P> <DT><STRONG><A NAME="item_fbm_instr">fbm_instr</A></STRONG><BR> <DD> Returns the location of the SV in the string delimited by <CODE>str</CODE> and <CODE>strend</CODE>. It returns <A HREF="#item_Nullch"><CODE>Nullch</CODE></A> if the string can't be found. The <CODE>sv</CODE> does not have to be fbm_compiled, but the search will not be as fast then. <PRE> char* fbm_instr(unsigned char* big, unsigned char* bigend, SV* littlesv, U32 flags)</PRE> <P></P> <DT><STRONG><A NAME="item_FREETMPS">FREETMPS</A></STRONG><BR> <DD> Closing bracket for temporaries on a callback. See <A HREF="#item_SAVETMPS"><CODE>SAVETMPS</CODE></A> and <A HREF="../../lib/Pod/perlcall.html">the perlcall manpage</A>. <PRE> FREETMPS;</PRE> <P></P> <DT><STRONG><A NAME="item_get_av">get_av</A></STRONG><BR> <DD> Returns the AV of the specified Perl array. If <CODE>create</CODE> is set and the Perl variable does not exist then it will be created. If <CODE>create</CODE> is not set and the variable does not exist then NULL is returned. <P>NOTE: the perl_ form of this function is deprecated.</P> <PRE> AV* get_av(const char* name, I32 create)</PRE> <P></P> <DT><STRONG><A NAME="item_get_cv">get_cv</A></STRONG><BR> <DD> Returns the CV of the specified Perl subroutine. If <CODE>create</CODE> is set and the Perl subroutine does not exist then it will be declared (which has the same effect as saying <CODE>sub name;</CODE>). If <CODE>create</CODE> is not set and the subroutine does not exist then NULL is returned. <P>NOTE: the perl_ form of this function is deprecated.</P> <PRE> CV* get_cv(const char* name, I32 create)</PRE> <P></P> <DT><STRONG><A NAME="item_get_hv">get_hv</A></STRONG><BR> <DD> Returns the HV of the specified Perl hash. If <CODE>create</CODE> is set and the Perl variable does not exist then it will be created. If <CODE>create</CODE> is not set and the variable does not exist then NULL is returned. <P>NOTE: the perl_ form of this function is deprecated.</P> <PRE> HV* get_hv(const char* name, I32 create)</PRE> <P></P> <DT><STRONG><A NAME="item_get_sv">get_sv</A></STRONG><BR> <DD> Returns the SV of the specified Perl scalar. If <CODE>create</CODE> is set and the Perl variable does not exist then it will be created. If <CODE>create</CODE> is not set and the variable does not exist then NULL is returned. <P>NOTE: the perl_ form of this function is deprecated.</P> <PRE> SV* get_sv(const char* name, I32 create)</PRE> <P></P> <DT><STRONG><A NAME="item_GIMME">GIMME</A></STRONG><BR> <DD> A backward-compatible version of <A HREF="#item_GIMME_V"><CODE>GIMME_V</CODE></A> which can only return <A HREF="#item_G_SCALAR"><CODE>G_SCALAR</CODE></A> or <A HREF="#item_G_ARRAY"><CODE>G_ARRAY</CODE></A>; in a void context, it returns <A HREF="#item_G_SCALAR"><CODE>G_SCALAR</CODE></A>. Deprecated. Use <A HREF="#item_GIMME_V"><CODE>GIMME_V</CODE></A> instead. <PRE> U32 GIMME</PRE> <P></P> <DT><STRONG><A NAME="item_GIMME_V">GIMME_V</A></STRONG><BR> <DD> The XSUB-writer's equivalent to Perl's <A HREF="../../lib/Pod/perlfunc.html#item_wantarray"><CODE>wantarray</CODE></A>. Returns <A HREF="#item_G_VOID"><CODE>G_VOID</CODE></A>, <A HREF="#item_G_SCALAR"><CODE>G_SCALAR</CODE></A> or <A HREF="#item_G_ARRAY"><CODE>G_ARRAY</CODE></A> for void, scalar or array context, respectively. <PRE> U32 GIMME_V</PRE> <P></P> <DT><STRONG><A NAME="item_GvSV">GvSV</A></STRONG><BR> <DD> Return the SV from the GV. <PRE> SV* GvSV(GV* gv)</PRE> <P></P> <DT><STRONG><A NAME="item_gv_fetchmeth">gv_fetchmeth</A></STRONG><BR> <DD> Returns the glob with the given <CODE>name</CODE> and a defined subroutine or <CODE>NULL</CODE>. The glob lives in the given <CODE>stash</CODE>, or in the stashes accessible via @ISA and @UNIVERSAL. <P>The argument <CODE>level</CODE> should be either 0 or -1. If <CODE>level==0</CODE>, as a side-effect creates a glob with the given <CODE>name</CODE> in the given <CODE>stash</CODE> which in the case of success contains an alias for the subroutine, and sets up caching info for this glob. Similarly for all the searched stashes.</P> <P>This function grants <CODE>"SUPER"</CODE> token as a postfix of the stash name. The GV returned from <A HREF="#item_gv_fetchmeth"><CODE>gv_fetchmeth</CODE></A> may be a method cache entry, which is not visible to Perl code. So when calling <A HREF="#item_call_sv"><CODE>call_sv</CODE></A>, you should not use the GV directly; instead, you should use the method's CV, which can be obtained from the GV with the <CODE>GvCV</CODE> macro.</P> <PRE> GV* gv_fetchmeth(HV* stash, const char* name, STRLEN len, I32 level)</PRE> <P></P> <DT><STRONG><A NAME="item_gv_fetchmethod">gv_fetchmethod</A></STRONG><BR> <DD> See <A HREF="#item_gv_fetchmethod_autoload">gv_fetchmethod_autoload</A>. <PRE> GV* gv_fetchmethod(HV* stash, const char* name)</PRE> <P></P> <DT><STRONG><A NAME="item_gv_fetchmethod_autoload">gv_fetchmethod_autoload</A></STRONG><BR> <DD> Returns the glob which contains the subroutine to call to invoke the method on the <CODE>stash</CODE>. In fact in the presence of autoloading this may be the glob for ``AUTOLOAD''. In this case the corresponding variable $AUTOLOAD is already setup. <P>The third parameter of <A HREF="#item_gv_fetchmethod_autoload"><CODE>gv_fetchmethod_autoload</CODE></A> determines whether AUTOLOAD lookup is performed if the given method is not present: non-zero means yes, look for AUTOLOAD; zero means no, don't look for AUTOLOAD. Calling <A HREF="#item_gv_fetchmethod"><CODE>gv_fetchmethod</CODE></A> is equivalent to calling <A HREF="#item_gv_fetchmethod_autoload"><CODE>gv_fetchmethod_autoload</CODE></A> with a non-zero <CODE>autoload</CODE> parameter.</P> <P>These functions grant <CODE>"SUPER"</CODE> 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 ``AUTOLOAD'', since at the later time the call may load a different subroutine due to $AUTOLOAD changing its value. Use the glob created via a side effect to do this.</P> <P>These functions have the same side-effects and as <A HREF="#item_gv_fetchmeth"><CODE>gv_fetchmeth</CODE></A> with <CODE>level==0</CODE>. <CODE>name</CODE> should be writable if contains <CODE>':'</CODE> or <CODE>' ''</CODE>. The warning against passing the GV returned by <A HREF="#item_gv_fetchmeth"><CODE>gv_fetchmeth</CODE></A> to <A HREF="#item_call_sv"><CODE>call_sv</CODE></A> apply equally to these functions.</P> <PRE> GV* gv_fetchmethod_autoload(HV* stash, const char* name, I32 autoload)</PRE> <P></P> <DT><STRONG><A NAME="item_gv_stashpv">gv_stashpv</A></STRONG><BR> <DD> Returns a pointer to the stash for a specified package. <CODE>name</CODE> should be a valid UTF-8 string. If <CODE>create</CODE> is set then the package will be created if it does not already exist. If <CODE>create</CODE> is not set and the package does not exist then NULL is returned. <PRE> HV* gv_stashpv(const char* name, I32 create)</PRE> <P></P> <DT><STRONG><A NAME="item_gv_stashsv">gv_stashsv</A></STRONG><BR> <DD> Returns a pointer to the stash for a specified package, which must be a valid UTF-8 string. See <A HREF="#item_gv_stashpv"><CODE>gv_stashpv</CODE></A>. <PRE> HV* gv_stashsv(SV* sv, I32 create)</PRE> <P></P> <DT><STRONG><A NAME="item_G_ARRAY">G_ARRAY</A></STRONG><BR> <DD> Used to indicate array context. See <A HREF="#item_GIMME_V"><CODE>GIMME_V</CODE></A>, <A HREF="#item_GIMME"><CODE>GIMME</CODE></A> and <A HREF="../../lib/Pod/perlcall.html">the perlcall manpage</A>. <P></P> <DT><STRONG><A NAME="item_G_DISCARD">G_DISCARD</A></STRONG><BR> <DD> Indicates that arguments returned from a callback should be discarded. See <A HREF="../../lib/Pod/perlcall.html">the perlcall manpage</A>. <P></P> <DT><STRONG><A NAME="item_G_EVAL">G_EVAL</A></STRONG><BR> <DD> Used to force a Perl <A HREF="../../lib/Pod/perlfunc.html#item_eval"><CODE>eval</CODE></A> wrapper around a callback. See <A HREF="../../lib/Pod/perlcall.html">the perlcall manpage</A>. <P></P> <DT><STRONG><A NAME="item_G_NOARGS">G_NOARGS</A></STRONG><BR> <DD> Indicates that no arguments are being sent to a callback. See <A HREF="../../lib/Pod/perlcall.html">the perlcall manpage</A>. <P></P> <DT><STRONG><A NAME="item_G_SCALAR">G_SCALAR</A></STRONG><BR> <DD> Used to indicate scalar context. See <A HREF="#item_GIMME_V"><CODE>GIMME_V</CODE></A>, <A HREF="#item_GIMME"><CODE>GIMME</CODE></A>, and <A HREF="../../lib/Pod/perlcall.html">the perlcall manpage</A>. <P></P> <DT><STRONG><A NAME="item_G_VOID">G_VOID</A></STRONG><BR> <DD> Used to indicate void context. See <A HREF="#item_GIMME_V"><CODE>GIMME_V</CODE></A> and <A HREF="../../lib/Pod/perlcall.html">the perlcall manpage</A>. <P></P> <DT><STRONG><A NAME="item_HEf_SVKEY">HEf_SVKEY</A></STRONG><BR> <DD> This flag, used in the length slot of hash entries and magic structures, specifies the structure contains a <CODE>SV*</CODE> pointer where a <CODE>char*</CODE> pointer is to be expected. (For information only--not to be used). <P></P> <DT><STRONG><A NAME="item_HeHASH">HeHASH</A></STRONG><BR> <DD> Returns the computed hash stored in the hash entry. <PRE> U32 HeHASH(HE* he)</PRE> <P></P> <DT><STRONG><A NAME="item_HeKEY">HeKEY</A></STRONG><BR> <DD> Returns the actual pointer stored in the key slot of the hash entry. The pointer may be either <CODE>char*</CODE> or <CODE>SV*</CODE>, depending on the value of <A HREF="#item_HeKLEN"><CODE>HeKLEN()</CODE></A>. Can be assigned to. The <A HREF="#item_HePV"><CODE>HePV()</CODE></A> or <A HREF="#item_HeSVKEY"><CODE>HeSVKEY()</CODE></A> macros are usually preferable for finding the value of a key. <PRE> void* HeKEY(HE* he)</PRE> <P></P> <DT><STRONG><A NAME="item_HeKLEN">HeKLEN</A></STRONG><BR> <DD> If this is negative, and amounts to <A HREF="#item_HEf_SVKEY"><CODE>HEf_SVKEY</CODE></A>, it indicates the entry holds an <CODE>SV*</CODE> key. Otherwise, holds the actual length of the key. Can be assigned to. The <A HREF="#item_HePV"><CODE>HePV()</CODE></A> macro is usually preferable for finding key lengths. <PRE> STRLEN HeKLEN(HE* he)</PRE> <P></P> <DT><STRONG><A NAME="item_HePV">HePV</A></STRONG><BR> <DD> Returns the key slot of the hash entry as a <CODE>char*</CODE> value, doing any necessary dereferencing of possibly <CODE>SV*</CODE> keys. The length of the string is placed in <CODE>len</CODE> (this is a macro, so do <EM>not</EM> use <CODE>&len</CODE>). If you do not care about what the length of the key is, you may use the global variable <A HREF="#item_PL_na"><CODE>PL_na</CODE></A>, 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 <CODE>strlen()</CODE> or similar is not a good way to find the length of hash keys. This is very similar to the <A HREF="#item_SvPV"><CODE>SvPV()</CODE></A> macro described elsewhere in this document. <PRE> char* HePV(HE* he, STRLEN len)</PRE> <P></P> <DT><STRONG><A NAME="item_HeSVKEY">HeSVKEY</A></STRONG><BR> <DD> Returns the key as an <CODE>SV*</CODE>, or <A HREF="#item_Nullsv"><CODE>Nullsv</CODE></A> if the hash entry does not contain an <CODE>SV*</CODE> key. <PRE> SV* HeSVKEY(HE* he)</PRE> <P></P> <DT><STRONG><A NAME="item_HeSVKEY_force">HeSVKEY_force</A></STRONG><BR> <DD> Returns the key as an <CODE>SV*</CODE>. Will create and return a temporary mortal <CODE>SV*</CODE> if the hash entry contains only a <CODE>char*</CODE> key. <PRE> SV* HeSVKEY_force(HE* he)</PRE> <P></P> <DT><STRONG><A NAME="item_HeSVKEY_set">HeSVKEY_set</A></STRONG><BR> <DD> Sets the key to a given <CODE>SV*</CODE>, taking care to set the appropriate flags to indicate the presence of an <CODE>SV*</CODE> key, and returns the same <CODE>SV*</CODE>. <PRE> SV* HeSVKEY_set(HE* he, SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_HeVAL">HeVAL</A></STRONG><BR> <DD> Returns the value slot (type <CODE>SV*</CODE>) stored in the hash entry. <PRE> SV* HeVAL(HE* he)</PRE> <P></P> <DT><STRONG><A NAME="item_HvNAME">HvNAME</A></STRONG><BR> <DD> Returns the package name of a stash. See <A HREF="#item_SvSTASH"><CODE>SvSTASH</CODE></A>, <A HREF="#item_CvSTASH"><CODE>CvSTASH</CODE></A>. <PRE> char* HvNAME(HV* stash)</PRE> <P></P> <DT><STRONG><A NAME="item_hv_clear">hv_clear</A></STRONG><BR> <DD> Clears a hash, making it empty. <PRE> void hv_clear(HV* tb)</PRE> <P></P> <DT><STRONG><A NAME="item_hv_delete">hv_delete</A></STRONG><BR> <DD> Deletes a key/value pair in the hash. The value SV is removed from the hash and returned to the caller. The <CODE>klen</CODE> is the length of the key. The <CODE>flags</CODE> value will normally be zero; if set to G_DISCARD then NULL will be returned. <PRE> SV* hv_delete(HV* tb, const char* key, U32 klen, I32 flags)</PRE> <P></P> <DT><STRONG><A NAME="item_hv_delete_ent">hv_delete_ent</A></STRONG><BR> <DD> Deletes a key/value pair in the hash. The value SV is removed from the hash and returned to the caller. The <CODE>flags</CODE> value will normally be zero; if set to G_DISCARD then NULL will be returned. <CODE>hash</CODE> can be a valid precomputed hash value, or 0 to ask for it to be computed. <PRE> SV* hv_delete_ent(HV* tb, SV* key, I32 flags, U32 hash)</PRE> <P></P> <DT><STRONG><A NAME="item_hv_exists">hv_exists</A></STRONG><BR> <DD> Returns a boolean indicating whether the specified hash key exists. The <CODE>klen</CODE> is the length of the key. <PRE> bool hv_exists(HV* tb, const char* key, U32 klen)</PRE> <P></P> <DT><STRONG><A NAME="item_hv_exists_ent">hv_exists_ent</A></STRONG><BR> <DD> Returns a boolean indicating whether the specified hash key exists. <CODE>hash</CODE> can be a valid precomputed hash value, or 0 to ask for it to be computed. <PRE> bool hv_exists_ent(HV* tb, SV* key, U32 hash)</PRE> <P></P> <DT><STRONG><A NAME="item_hv_fetch">hv_fetch</A></STRONG><BR> <DD> Returns the SV which corresponds to the specified key in the hash. The <CODE>klen</CODE> is the length of the key. If <CODE>lval</CODE> is set then the fetch will be part of a store. Check that the return value is non-null before dereferencing it to a <CODE>SV*</CODE>. <P>See <A HREF="../../lib/Pod/perlguts.html#understanding the magic of tied hashes and arrays">Understanding the Magic of Tied Hashes and Arrays in the perlguts manpage</A> for more information on how to use this function on tied hashes.</P> <PRE> SV** hv_fetch(HV* tb, const char* key, U32 klen, I32 lval)</PRE> <P></P> <DT><STRONG><A NAME="item_hv_fetch_ent">hv_fetch_ent</A></STRONG><BR> <DD> Returns the hash entry which corresponds to the specified key in the hash. <CODE>hash</CODE> must be a valid precomputed hash number for the given <CODE>key</CODE>, or 0 if you want the function to compute it. IF <CODE>lval</CODE> 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 <CODE>tb</CODE> 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. <P>See <A HREF="../../lib/Pod/perlguts.html#understanding the magic of tied hashes and arrays">Understanding the Magic of Tied Hashes and Arrays in the perlguts manpage</A> for more information on how to use this function on tied hashes.</P> <PRE> HE* hv_fetch_ent(HV* tb, SV* key, I32 lval, U32 hash)</PRE> <P></P> <DT><STRONG><A NAME="item_hv_iterinit">hv_iterinit</A></STRONG><BR> <DD> Prepares a starting point to traverse a hash table. Returns the number of keys in the hash (i.e. the same as <CODE>HvKEYS(tb)</CODE>). The return value is currently only meaningful for hashes without tie magic. <P>NOTE: Before version 5.004_65, <A HREF="#item_hv_iterinit"><CODE>hv_iterinit</CODE></A> 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 <CODE>HvFILL(tb)</CODE>.</P> <PRE> I32 hv_iterinit(HV* tb)</PRE> <P></P> <DT><STRONG><A NAME="item_hv_iterkey">hv_iterkey</A></STRONG><BR> <DD> Returns the key from the current position of the hash iterator. See <A HREF="#item_hv_iterinit"><CODE>hv_iterinit</CODE></A>. <PRE> char* hv_iterkey(HE* entry, I32* retlen)</PRE> <P></P> <DT><STRONG><A NAME="item_hv_iterkeysv">hv_iterkeysv</A></STRONG><BR> <DD> Returns the key as an <CODE>SV*</CODE> from the current position of the hash iterator. The return value will always be a mortal copy of the key. Also see <A HREF="#item_hv_iterinit"><CODE>hv_iterinit</CODE></A>. <PRE> SV* hv_iterkeysv(HE* entry)</PRE> <P></P> <DT><STRONG><A NAME="item_hv_iternext">hv_iternext</A></STRONG><BR> <DD> Returns entries from a hash iterator. See <A HREF="#item_hv_iterinit"><CODE>hv_iterinit</CODE></A>. <PRE> HE* hv_iternext(HV* tb)</PRE> <P></P> <DT><STRONG><A NAME="item_hv_iternextsv">hv_iternextsv</A></STRONG><BR> <DD> Performs an <A HREF="#item_hv_iternext"><CODE>hv_iternext</CODE></A>, <A HREF="#item_hv_iterkey"><CODE>hv_iterkey</CODE></A>, and <A HREF="#item_hv_iterval"><CODE>hv_iterval</CODE></A> in one operation. <PRE> SV* hv_iternextsv(HV* hv, char** key, I32* retlen)</PRE> <P></P> <DT><STRONG><A NAME="item_hv_iterval">hv_iterval</A></STRONG><BR> <DD> Returns the value from the current position of the hash iterator. See <A HREF="#item_hv_iterkey"><CODE>hv_iterkey</CODE></A>. <PRE> SV* hv_iterval(HV* tb, HE* entry)</PRE> <P></P> <DT><STRONG><A NAME="item_hv_magic">hv_magic</A></STRONG><BR> <DD> Adds magic to a hash. See <A HREF="#item_sv_magic"><CODE>sv_magic</CODE></A>. <PRE> void hv_magic(HV* hv, GV* gv, int how)</PRE> <P></P> <DT><STRONG><A NAME="item_hv_store">hv_store</A></STRONG><BR> <DD> Stores an SV in a hash. The hash key is specified as <CODE>key</CODE> and <CODE>klen</CODE> is the length of the key. The <CODE>hash</CODE> parameter is the precomputed hash value; if it is zero then Perl will compute it. The return value will be NULL 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 <CODE>SV*</CODE>. Note that the caller is responsible for suitably incrementing the reference count of <CODE>val</CODE> before the call, and decrementing it if the function returned NULL. <P>See <A HREF="../../lib/Pod/perlguts.html#understanding the magic of tied hashes and arrays">Understanding the Magic of Tied Hashes and Arrays in the perlguts manpage</A> for more information on how to use this function on tied hashes.</P> <PRE> SV** hv_store(HV* tb, const char* key, U32 klen, SV* val, U32 hash)</PRE> <P></P> <DT><STRONG><A NAME="item_hv_store_ent">hv_store_ent</A></STRONG><BR> <DD> Stores <CODE>val</CODE> in a hash. The hash key is specified as <CODE>key</CODE>. The <CODE>hash</CODE> 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 NULL 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 <CODE>He???</CODE> macros described here. Note that the caller is responsible for suitably incrementing the reference count of <CODE>val</CODE> before the call, and decrementing it if the function returned NULL. <P>See <A HREF="../../lib/Pod/perlguts.html#understanding the magic of tied hashes and arrays">Understanding the Magic of Tied Hashes and Arrays in the perlguts manpage</A> for more information on how to use this function on tied hashes.</P> <PRE> HE* hv_store_ent(HV* tb, SV* key, SV* val, U32 hash)</PRE> <P></P> <DT><STRONG><A NAME="item_hv_undef">hv_undef</A></STRONG><BR> <DD> Undefines the hash. <PRE> void hv_undef(HV* tb)</PRE> <P></P> <DT><STRONG><A NAME="item_isALNUM">isALNUM</A></STRONG><BR> <DD> Returns a boolean indicating whether the C <CODE>char</CODE> is an ascii alphanumeric character or digit. <PRE> bool isALNUM(char ch)</PRE> <P></P> <DT><STRONG><A NAME="item_isALPHA">isALPHA</A></STRONG><BR> <DD> Returns a boolean indicating whether the C <CODE>char</CODE> is an ascii alphabetic character. <PRE> bool isALPHA(char ch)</PRE> <P></P> <DT><STRONG><A NAME="item_isDIGIT">isDIGIT</A></STRONG><BR> <DD> Returns a boolean indicating whether the C <CODE>char</CODE> is an ascii digit. <PRE> bool isDIGIT(char ch)</PRE> <P></P> <DT><STRONG><A NAME="item_isLOWER">isLOWER</A></STRONG><BR> <DD> Returns a boolean indicating whether the C <CODE>char</CODE> is a lowercase character. <PRE> bool isLOWER(char ch)</PRE> <P></P> <DT><STRONG><A NAME="item_isSPACE">isSPACE</A></STRONG><BR> <DD> Returns a boolean indicating whether the C <CODE>char</CODE> is whitespace. <PRE> bool isSPACE(char ch)</PRE> <P></P> <DT><STRONG><A NAME="item_isUPPER">isUPPER</A></STRONG><BR> <DD> Returns a boolean indicating whether the C <CODE>char</CODE> is an uppercase character. <PRE> bool isUPPER(char ch)</PRE> <P></P> <DT><STRONG><A NAME="item_items">items</A></STRONG><BR> <DD> Variable which is setup by <CODE>xsubpp</CODE> to indicate the number of items on the stack. See <A HREF="../../lib/Pod/perlxs.html#variablelength parameter lists">Variable-length Parameter Lists in the perlxs manpage</A>. <PRE> I32 items</PRE> <P></P> <DT><STRONG><A NAME="item_ix">ix</A></STRONG><BR> <DD> Variable which is setup by <CODE>xsubpp</CODE> to indicate which of an XSUB's aliases was used to invoke it. See <A HREF="../../lib/Pod/perlxs.html#the alias: keyword">The ALIAS: Keyword in the perlxs manpage</A>. <PRE> I32 ix</PRE> <P></P> <DT><STRONG><A NAME="item_LEAVE">LEAVE</A></STRONG><BR> <DD> Closing bracket on a callback. See <A HREF="#item_ENTER"><CODE>ENTER</CODE></A> and <A HREF="../../lib/Pod/perlcall.html">the perlcall manpage</A>. <PRE> LEAVE;</PRE> <P></P> <DT><STRONG><A NAME="item_looks_like_number">looks_like_number</A></STRONG><BR> <DD> Test if an the content of an SV looks like a number (or is a number). <PRE> I32 looks_like_number(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_MARK">MARK</A></STRONG><BR> <DD> Stack marker variable for the XSUB. See <A HREF="#item_dMARK"><CODE>dMARK</CODE></A>. <P></P> <DT><STRONG><A NAME="item_mg_clear">mg_clear</A></STRONG><BR> <DD> Clear something magical that the SV represents. See <A HREF="#item_sv_magic"><CODE>sv_magic</CODE></A>. <PRE> int mg_clear(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_mg_copy">mg_copy</A></STRONG><BR> <DD> Copies the magic from one SV to another. See <A HREF="#item_sv_magic"><CODE>sv_magic</CODE></A>. <PRE> int mg_copy(SV* sv, SV* nsv, const char* key, I32 klen)</PRE> <P></P> <DT><STRONG><A NAME="item_mg_find">mg_find</A></STRONG><BR> <DD> Finds the magic pointer for type matching the SV. See <A HREF="#item_sv_magic"><CODE>sv_magic</CODE></A>. <PRE> MAGIC* mg_find(SV* sv, int type)</PRE> <P></P> <DT><STRONG><A NAME="item_mg_free">mg_free</A></STRONG><BR> <DD> Free any magic storage used by the SV. See <A HREF="#item_sv_magic"><CODE>sv_magic</CODE></A>. <PRE> int mg_free(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_mg_get">mg_get</A></STRONG><BR> <DD> Do magic after a value is retrieved from the SV. See <A HREF="#item_sv_magic"><CODE>sv_magic</CODE></A>. <PRE> int mg_get(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_mg_length">mg_length</A></STRONG><BR> <DD> Report on the SV's length. See <A HREF="#item_sv_magic"><CODE>sv_magic</CODE></A>. <PRE> U32 mg_length(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_mg_magical">mg_magical</A></STRONG><BR> <DD> Turns on the magical status of an SV. See <A HREF="#item_sv_magic"><CODE>sv_magic</CODE></A>. <PRE> void mg_magical(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_mg_set">mg_set</A></STRONG><BR> <DD> Do magic after a value is assigned to the SV. See <A HREF="#item_sv_magic"><CODE>sv_magic</CODE></A>. <PRE> int mg_set(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_Move">Move</A></STRONG><BR> <DD> The XSUB-writer's interface to the C <CODE>memmove</CODE> function. The <CODE>src</CODE> is the source, <CODE>dest</CODE> is the destination, <CODE>nitems</CODE> is the number of items, and <CODE>type</CODE> is the type. Can do overlapping moves. See also <A HREF="#item_Copy"><CODE>Copy</CODE></A>. <PRE> void Move(void* src, void* dest, int nitems, type)</PRE> <P></P> <DT><STRONG><A NAME="item_New">New</A></STRONG><BR> <DD> The XSUB-writer's interface to the C <CODE>malloc</CODE> function. <PRE> void New(int id, void* ptr, int nitems, type)</PRE> <P></P> <DT><STRONG><A NAME="item_newAV">newAV</A></STRONG><BR> <DD> Creates a new AV. The reference count is set to 1. <PRE> AV* newAV()</PRE> <P></P> <DT><STRONG><A NAME="item_Newc">Newc</A></STRONG><BR> <DD> The XSUB-writer's interface to the C <CODE>malloc</CODE> function, with cast. <PRE> void Newc(int id, void* ptr, int nitems, type, cast)</PRE> <P></P> <DT><STRONG><A NAME="item_newCONSTSUB">newCONSTSUB</A></STRONG><BR> <DD> Creates a constant sub equivalent to Perl <CODE>sub FOO () { 123 }</CODE> which is eligible for inlining at compile-time. <PRE> void newCONSTSUB(HV* stash, char* name, SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_newHV">newHV</A></STRONG><BR> <DD> Creates a new HV. The reference count is set to 1. <PRE> HV* newHV()</PRE> <P></P> <DT><STRONG><A NAME="item_newRV_inc">newRV_inc</A></STRONG><BR> <DD> Creates an RV wrapper for an SV. The reference count for the original SV is incremented. <PRE> SV* newRV_inc(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_newRV_noinc">newRV_noinc</A></STRONG><BR> <DD> Creates an RV wrapper for an SV. The reference count for the original SV is <STRONG>not</STRONG> incremented. <PRE> SV* newRV_noinc(SV *sv)</PRE> <P></P> <DT><STRONG><A NAME="item_NEWSV">NEWSV</A></STRONG><BR> <DD> Creates a new SV. A non-zero <CODE>len</CODE> parameter indicates the number of bytes of preallocated string space the SV should have. An extra byte for a tailing NUL is also reserved. (SvPOK is not set for the SV even if string space is allocated.) The reference count for the new SV is set to 1. <CODE>id</CODE> is an integer id between 0 and 1299 (used to identify leaks). <PRE> SV* NEWSV(int id, STRLEN len)</PRE> <P></P> <DT><STRONG><A NAME="item_newSViv">newSViv</A></STRONG><BR> <DD> Creates a new SV and copies an integer into it. The reference count for the SV is set to 1. <PRE> SV* newSViv(IV i)</PRE> <P></P> <DT><STRONG><A NAME="item_newSVnv">newSVnv</A></STRONG><BR> <DD> Creates a new SV and copies a floating point value into it. The reference count for the SV is set to 1. <PRE> SV* newSVnv(NV n)</PRE> <P></P> <DT><STRONG><A NAME="item_newSVpv">newSVpv</A></STRONG><BR> <DD> Creates a new SV and copies a string into it. The reference count for the SV is set to 1. If <CODE>len</CODE> is zero, Perl will compute the length using strlen(). For efficiency, consider using <A HREF="#item_newSVpvn"><CODE>newSVpvn</CODE></A> instead. <PRE> SV* newSVpv(const char* s, STRLEN len)</PRE> <P></P> <DT><STRONG><A NAME="item_newSVpvf">newSVpvf</A></STRONG><BR> <DD> Creates a new SV an initialize it with the string formatted like <A HREF="../../lib/Pod/perlfunc.html#item_sprintf"><CODE>sprintf</CODE></A>. <PRE> SV* newSVpvf(const char* pat, ...)</PRE> <P></P> <DT><STRONG><A NAME="item_newSVpvn">newSVpvn</A></STRONG><BR> <DD> Creates a new SV and copies a string into it. The reference count for the SV is set to 1. Note that if <CODE>len</CODE> is zero, Perl will create a zero length string. You are responsible for ensuring that the source string is at least <CODE>len</CODE> bytes long. <PRE> SV* newSVpvn(const char* s, STRLEN len)</PRE> <P></P> <DT><STRONG><A NAME="item_newSVrv">newSVrv</A></STRONG><BR> <DD> Creates a new SV for the RV, <CODE>rv</CODE>, to point to. If <CODE>rv</CODE> is not an RV then it will be upgraded to one. If <CODE>classname</CODE> is non-null then the new SV will be blessed in the specified package. The new SV is returned and its reference count is 1. <PRE> SV* newSVrv(SV* rv, const char* classname)</PRE> <P></P> <DT><STRONG><A NAME="item_newSVsv">newSVsv</A></STRONG><BR> <DD> Creates a new SV which is an exact duplicate of the original SV. <PRE> SV* newSVsv(SV* old)</PRE> <P></P> <DT><STRONG><A NAME="item_newSVuv">newSVuv</A></STRONG><BR> <DD> Creates a new SV and copies an unsigned integer into it. The reference count for the SV is set to 1. <PRE> SV* newSVuv(UV u)</PRE> <P></P> <DT><STRONG><A NAME="item_newXS">newXS</A></STRONG><BR> <DD> Used by <CODE>xsubpp</CODE> to hook up XSUBs as Perl subs. <P></P> <DT><STRONG><A NAME="item_newXSproto">newXSproto</A></STRONG><BR> <DD> Used by <CODE>xsubpp</CODE> to hook up XSUBs as Perl subs. Adds Perl prototypes to the subs. <P></P> <DT><STRONG><A NAME="item_Newz">Newz</A></STRONG><BR> <DD> The XSUB-writer's interface to the C <CODE>malloc</CODE> function. The allocated memory is zeroed with <CODE>memzero</CODE>. <PRE> void Newz(int id, void* ptr, int nitems, type)</PRE> <P></P> <DT><STRONG><A NAME="item_Nullav">Nullav</A></STRONG><BR> <DD> Null AV pointer. <P></P> <DT><STRONG><A NAME="item_Nullch">Nullch</A></STRONG><BR> <DD> Null character pointer. <P></P> <DT><STRONG><A NAME="item_Nullcv">Nullcv</A></STRONG><BR> <DD> Null CV pointer. <P></P> <DT><STRONG><A NAME="item_Nullhv">Nullhv</A></STRONG><BR> <DD> Null HV pointer. <P></P> <DT><STRONG><A NAME="item_Nullsv">Nullsv</A></STRONG><BR> <DD> Null SV pointer. <P></P> <DT><STRONG><A NAME="item_ORIGMARK">ORIGMARK</A></STRONG><BR> <DD> The original stack mark for the XSUB. See <A HREF="#item_dORIGMARK"><CODE>dORIGMARK</CODE></A>. <P></P> <DT><STRONG><A NAME="item_perl_alloc">perl_alloc</A></STRONG><BR> <DD> Allocates a new Perl interpreter. See <A HREF="../../lib/Pod/perlembed.html">the perlembed manpage</A>. <PRE> PerlInterpreter* perl_alloc()</PRE> <P></P> <DT><STRONG><A NAME="item_perl_construct">perl_construct</A></STRONG><BR> <DD> Initializes a new Perl interpreter. See <A HREF="../../lib/Pod/perlembed.html">the perlembed manpage</A>. <PRE> void perl_construct(PerlInterpreter* interp)</PRE> <P></P> <DT><STRONG><A NAME="item_perl_destruct">perl_destruct</A></STRONG><BR> <DD> Shuts down a Perl interpreter. See <A HREF="../../lib/Pod/perlembed.html">the perlembed manpage</A>. <PRE> void perl_destruct(PerlInterpreter* interp)</PRE> <P></P> <DT><STRONG><A NAME="item_perl_free">perl_free</A></STRONG><BR> <DD> Releases a Perl interpreter. See <A HREF="../../lib/Pod/perlembed.html">the perlembed manpage</A>. <PRE> void perl_free(PerlInterpreter* interp)</PRE> <P></P> <DT><STRONG><A NAME="item_perl_parse">perl_parse</A></STRONG><BR> <DD> Tells a Perl interpreter to parse a Perl script. See <A HREF="../../lib/Pod/perlembed.html">the perlembed manpage</A>. <PRE> int perl_parse(PerlInterpreter* interp, XSINIT_t xsinit, int argc, char** argv, char** env)</PRE> <P></P> <DT><STRONG><A NAME="item_perl_run">perl_run</A></STRONG><BR> <DD> Tells a Perl interpreter to run. See <A HREF="../../lib/Pod/perlembed.html">the perlembed manpage</A>. <PRE> int perl_run(PerlInterpreter* interp)</PRE> <P></P> <DT><STRONG><A NAME="item_PL_DBsingle">PL_DBsingle</A></STRONG><BR> <DD> When Perl is run in debugging mode, with the <STRONG>-d</STRONG> switch, this SV is a boolean which indicates whether subs are being single-stepped. Single-stepping is automatically turned on after every step. This is the C variable which corresponds to Perl's $DB::single variable. See <A HREF="#item_PL_DBsub"><CODE>PL_DBsub</CODE></A>. <PRE> SV * PL_DBsingle</PRE> <P></P> <DT><STRONG><A NAME="item_PL_DBsub">PL_DBsub</A></STRONG><BR> <DD> When Perl is run in debugging mode, with the <STRONG>-d</STRONG> switch, this GV contains the SV which holds the name of the sub being debugged. This is the C variable which corresponds to Perl's $DB::sub variable. See <A HREF="#item_PL_DBsingle"><CODE>PL_DBsingle</CODE></A>. <PRE> GV * PL_DBsub</PRE> <P></P> <DT><STRONG><A NAME="item_PL_DBtrace">PL_DBtrace</A></STRONG><BR> <DD> Trace variable used when Perl is run in debugging mode, with the <STRONG>-d</STRONG> switch. This is the C variable which corresponds to Perl's $DB::trace variable. See <A HREF="#item_PL_DBsingle"><CODE>PL_DBsingle</CODE></A>. <PRE> SV * PL_DBtrace</PRE> <P></P> <DT><STRONG><A NAME="item_PL_dowarn">PL_dowarn</A></STRONG><BR> <DD> The C variable which corresponds to Perl's $^W warning variable. <PRE> bool PL_dowarn</PRE> <P></P> <DT><STRONG><A NAME="item_PL_modglobal">PL_modglobal</A></STRONG><BR> <DD> <A HREF="#item_PL_modglobal"><CODE>PL_modglobal</CODE></A> is a general purpose, interpreter global HV 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. <PRE> HV* PL_modglobal</PRE> <P></P> <DT><STRONG><A NAME="item_PL_na">PL_na</A></STRONG><BR> <DD> A convenience variable which is typically used with <A HREF="#item_SvPV"><CODE>SvPV</CODE></A> 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 <A HREF="#item_SvPV_nolen"><CODE>SvPV_nolen</CODE></A> macro. <PRE> STRLEN PL_na</PRE> <P></P> <DT><STRONG><A NAME="item_PL_sv_no">PL_sv_no</A></STRONG><BR> <DD> This is the <CODE>false</CODE> SV. See <A HREF="#item_PL_sv_yes"><CODE>PL_sv_yes</CODE></A>. Always refer to this as <CODE>&PL_sv_no</CODE>. <PRE> SV PL_sv_no</PRE> <P></P> <DT><STRONG><A NAME="item_PL_sv_undef">PL_sv_undef</A></STRONG><BR> <DD> This is the <A HREF="../../lib/Pod/perlfunc.html#item_undef"><CODE>undef</CODE></A> SV. Always refer to this as <CODE>&PL_sv_undef</CODE>. <PRE> SV PL_sv_undef</PRE> <P></P> <DT><STRONG><A NAME="item_PL_sv_yes">PL_sv_yes</A></STRONG><BR> <DD> This is the <CODE>true</CODE> SV. See <A HREF="#item_PL_sv_no"><CODE>PL_sv_no</CODE></A>. Always refer to this as <CODE>&PL_sv_yes</CODE>. <PRE> SV PL_sv_yes</PRE> <P></P> <DT><STRONG><A NAME="item_POPi">POPi</A></STRONG><BR> <DD> Pops an integer off the stack. <PRE> IV POPi</PRE> <P></P> <DT><STRONG><A NAME="item_POPl">POPl</A></STRONG><BR> <DD> Pops a long off the stack. <PRE> long POPl</PRE> <P></P> <DT><STRONG><A NAME="item_POPn">POPn</A></STRONG><BR> <DD> Pops a double off the stack. <PRE> NV POPn</PRE> <P></P> <DT><STRONG><A NAME="item_POPp">POPp</A></STRONG><BR> <DD> Pops a string off the stack. <PRE> char* POPp</PRE> <P></P> <DT><STRONG><A NAME="item_POPs">POPs</A></STRONG><BR> <DD> Pops an SV off the stack. <PRE> SV* POPs</PRE> <P></P> <DT><STRONG><A NAME="item_PUSHi">PUSHi</A></STRONG><BR> <DD> Push an integer onto the stack. The stack must have room for this element. Handles 'set' magic. See <A HREF="#item_XPUSHi"><CODE>XPUSHi</CODE></A>. <PRE> void PUSHi(IV iv)</PRE> <P></P> <DT><STRONG><A NAME="item_PUSHMARK">PUSHMARK</A></STRONG><BR> <DD> Opening bracket for arguments on a callback. See <A HREF="#item_PUTBACK"><CODE>PUTBACK</CODE></A> and <A HREF="../../lib/Pod/perlcall.html">the perlcall manpage</A>. <PRE> PUSHMARK;</PRE> <P></P> <DT><STRONG><A NAME="item_PUSHn">PUSHn</A></STRONG><BR> <DD> Push a double onto the stack. The stack must have room for this element. Handles 'set' magic. See <A HREF="#item_XPUSHn"><CODE>XPUSHn</CODE></A>. <PRE> void PUSHn(NV nv)</PRE> <P></P> <DT><STRONG><A NAME="item_PUSHp">PUSHp</A></STRONG><BR> <DD> Push a string onto the stack. The stack must have room for this element. The <CODE>len</CODE> indicates the length of the string. Handles 'set' magic. See <A HREF="#item_XPUSHp"><CODE>XPUSHp</CODE></A>. <PRE> void PUSHp(char* str, STRLEN len)</PRE> <P></P> <DT><STRONG><A NAME="item_PUSHs">PUSHs</A></STRONG><BR> <DD> Push an SV onto the stack. The stack must have room for this element. Does not handle 'set' magic. See <A HREF="#item_XPUSHs"><CODE>XPUSHs</CODE></A>. <PRE> void PUSHs(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_PUSHu">PUSHu</A></STRONG><BR> <DD> Push an unsigned integer onto the stack. The stack must have room for this element. See <A HREF="#item_XPUSHu"><CODE>XPUSHu</CODE></A>. <PRE> void PUSHu(UV uv)</PRE> <P></P> <DT><STRONG><A NAME="item_PUTBACK">PUTBACK</A></STRONG><BR> <DD> Closing bracket for XSUB arguments. This is usually handled by <CODE>xsubpp</CODE>. See <A HREF="#item_PUSHMARK"><CODE>PUSHMARK</CODE></A> and <A HREF="../../lib/Pod/perlcall.html">the perlcall manpage</A> for other uses. <PRE> PUTBACK;</PRE> <P></P> <DT><STRONG><A NAME="item_Renew">Renew</A></STRONG><BR> <DD> The XSUB-writer's interface to the C <CODE>realloc</CODE> function. <PRE> void Renew(void* ptr, int nitems, type)</PRE> <P></P> <DT><STRONG><A NAME="item_Renewc">Renewc</A></STRONG><BR> <DD> The XSUB-writer's interface to the C <CODE>realloc</CODE> function, with cast. <PRE> void Renewc(void* ptr, int nitems, type, cast)</PRE> <P></P> <DT><STRONG><A NAME="item_require_pv">require_pv</A></STRONG><BR> <DD> Tells Perl to <A HREF="../../lib/Pod/perlfunc.html#item_require"><CODE>require</CODE></A> a module. <P>NOTE: the perl_ form of this function is deprecated.</P> <PRE> void require_pv(const char* pv)</PRE> <P></P> <DT><STRONG><A NAME="item_RETVAL">RETVAL</A></STRONG><BR> <DD> Variable which is setup by <CODE>xsubpp</CODE> to hold the return value for an XSUB. This is always the proper type for the XSUB. See <A HREF="../../lib/Pod/perlxs.html#the retval variable">The RETVAL Variable in the perlxs manpage</A>. <PRE> (whatever) RETVAL</PRE> <P></P> <DT><STRONG><A NAME="item_Safefree">Safefree</A></STRONG><BR> <DD> The XSUB-writer's interface to the C <CODE>free</CODE> function. <PRE> void Safefree(void* src, void* dest, int nitems, type)</PRE> <P></P> <DT><STRONG><A NAME="item_savepv">savepv</A></STRONG><BR> <DD> Copy a string to a safe spot. This does not use an SV. <PRE> char* savepv(const char* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_savepvn">savepvn</A></STRONG><BR> <DD> Copy a string to a safe spot. The <CODE>len</CODE> indicates number of bytes to copy. This does not use an SV. <PRE> char* savepvn(const char* sv, I32 len)</PRE> <P></P> <DT><STRONG><A NAME="item_SAVETMPS">SAVETMPS</A></STRONG><BR> <DD> Opening bracket for temporaries on a callback. See <A HREF="#item_FREETMPS"><CODE>FREETMPS</CODE></A> and <A HREF="../../lib/Pod/perlcall.html">the perlcall manpage</A>. <PRE> SAVETMPS;</PRE> <P></P> <DT><STRONG><A NAME="item_SP">SP</A></STRONG><BR> <DD> Stack pointer. This is usually handled by <CODE>xsubpp</CODE>. See <A HREF="#item_dSP"><CODE>dSP</CODE></A> and <A HREF="#item_SPAGAIN"><CODE>SPAGAIN</CODE></A>. <P></P> <DT><STRONG><A NAME="item_SPAGAIN">SPAGAIN</A></STRONG><BR> <DD> Refetch the stack pointer. Used after a callback. See <A HREF="../../lib/Pod/perlcall.html">the perlcall manpage</A>. <PRE> SPAGAIN;</PRE> <P></P> <DT><STRONG><A NAME="item_ST">ST</A></STRONG><BR> <DD> Used to access elements on the XSUB's stack. <PRE> SV* ST(int ix)</PRE> <P></P> <DT><STRONG><A NAME="item_strEQ">strEQ</A></STRONG><BR> <DD> Test two strings to see if they are equal. Returns true or false. <PRE> bool strEQ(char* s1, char* s2)</PRE> <P></P> <DT><STRONG><A NAME="item_strGE">strGE</A></STRONG><BR> <DD> Test two strings to see if the first, <CODE>s1</CODE>, is greater than or equal to the second, <CODE>s2</CODE>. Returns true or false. <PRE> bool strGE(char* s1, char* s2)</PRE> <P></P> <DT><STRONG><A NAME="item_strGT">strGT</A></STRONG><BR> <DD> Test two strings to see if the first, <CODE>s1</CODE>, is greater than the second, <CODE>s2</CODE>. Returns true or false. <PRE> bool strGT(char* s1, char* s2)</PRE> <P></P> <DT><STRONG><A NAME="item_strLE">strLE</A></STRONG><BR> <DD> Test two strings to see if the first, <CODE>s1</CODE>, is less than or equal to the second, <CODE>s2</CODE>. Returns true or false. <PRE> bool strLE(char* s1, char* s2)</PRE> <P></P> <DT><STRONG><A NAME="item_strLT">strLT</A></STRONG><BR> <DD> Test two strings to see if the first, <CODE>s1</CODE>, is less than the second, <CODE>s2</CODE>. Returns true or false. <PRE> bool strLT(char* s1, char* s2)</PRE> <P></P> <DT><STRONG><A NAME="item_strNE">strNE</A></STRONG><BR> <DD> Test two strings to see if they are different. Returns true or false. <PRE> bool strNE(char* s1, char* s2)</PRE> <P></P> <DT><STRONG><A NAME="item_strnEQ">strnEQ</A></STRONG><BR> <DD> Test two strings to see if they are equal. The <CODE>len</CODE> parameter indicates the number of bytes to compare. Returns true or false. (A wrapper for <CODE>strncmp</CODE>). <PRE> bool strnEQ(char* s1, char* s2, STRLEN len)</PRE> <P></P> <DT><STRONG><A NAME="item_strnNE">strnNE</A></STRONG><BR> <DD> Test two strings to see if they are different. The <CODE>len</CODE> parameter indicates the number of bytes to compare. Returns true or false. (A wrapper for <CODE>strncmp</CODE>). <PRE> bool strnNE(char* s1, char* s2, STRLEN len)</PRE> <P></P> <DT><STRONG><A NAME="item_StructCopy">StructCopy</A></STRONG><BR> <DD> This is an architecture-independant macro to copy one structure to another. <PRE> void StructCopy(type src, type dest, type)</PRE> <P></P> <DT><STRONG><A NAME="item_SvCUR">SvCUR</A></STRONG><BR> <DD> Returns the length of the string which is in the SV. See <A HREF="#item_SvLEN"><CODE>SvLEN</CODE></A>. <PRE> STRLEN SvCUR(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvCUR_set">SvCUR_set</A></STRONG><BR> <DD> Set the length of the string which is in the SV. See <A HREF="#item_SvCUR"><CODE>SvCUR</CODE></A>. <PRE> void SvCUR_set(SV* sv, STRLEN len)</PRE> <P></P> <DT><STRONG><A NAME="item_SvEND">SvEND</A></STRONG><BR> <DD> Returns a pointer to the last character in the string which is in the SV. See <A HREF="#item_SvCUR"><CODE>SvCUR</CODE></A>. Access the character as *(SvEND(sv)). <PRE> char* SvEND(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvGETMAGIC">SvGETMAGIC</A></STRONG><BR> <DD> Invokes <A HREF="#item_mg_get"><CODE>mg_get</CODE></A> on an SV if it has 'get' magic. This macro evaluates its argument more than once. <PRE> void SvGETMAGIC(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvGROW">SvGROW</A></STRONG><BR> <DD> Expands the character buffer in the SV so that it has room for the indicated number of bytes (remember to reserve space for an extra trailing NUL character). Calls <A HREF="#item_sv_grow"><CODE>sv_grow</CODE></A> to perform the expansion if necessary. Returns a pointer to the character buffer. <PRE> void SvGROW(SV* sv, STRLEN len)</PRE> <P></P> <DT><STRONG><A NAME="item_SvIOK">SvIOK</A></STRONG><BR> <DD> Returns a boolean indicating whether the SV contains an integer. <PRE> bool SvIOK(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvIOKp">SvIOKp</A></STRONG><BR> <DD> Returns a boolean indicating whether the SV contains an integer. Checks the <STRONG>private</STRONG> setting. Use <A HREF="#item_SvIOK"><CODE>SvIOK</CODE></A>. <PRE> bool SvIOKp(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvIOK_off">SvIOK_off</A></STRONG><BR> <DD> Unsets the IV status of an SV. <PRE> void SvIOK_off(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvIOK_on">SvIOK_on</A></STRONG><BR> <DD> Tells an SV that it is an integer. <PRE> void SvIOK_on(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvIOK_only">SvIOK_only</A></STRONG><BR> <DD> Tells an SV that it is an integer and disables all other OK bits. <PRE> void SvIOK_only(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvIV">SvIV</A></STRONG><BR> <DD> Coerces the given SV to an integer and returns it. <PRE> IV SvIV(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvIVX">SvIVX</A></STRONG><BR> <DD> Returns the integer which is stored in the SV, assuming SvIOK is true. <PRE> IV SvIVX(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvLEN">SvLEN</A></STRONG><BR> <DD> Returns the size of the string buffer in the SV. See <A HREF="#item_SvCUR"><CODE>SvCUR</CODE></A>. <PRE> STRLEN SvLEN(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvNIOK">SvNIOK</A></STRONG><BR> <DD> Returns a boolean indicating whether the SV contains a number, integer or double. <PRE> bool SvNIOK(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvNIOKp">SvNIOKp</A></STRONG><BR> <DD> Returns a boolean indicating whether the SV contains a number, integer or double. Checks the <STRONG>private</STRONG> setting. Use <A HREF="#item_SvNIOK"><CODE>SvNIOK</CODE></A>. <PRE> bool SvNIOKp(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvNIOK_off">SvNIOK_off</A></STRONG><BR> <DD> Unsets the NV/IV status of an SV. <PRE> void SvNIOK_off(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvNOK">SvNOK</A></STRONG><BR> <DD> Returns a boolean indicating whether the SV contains a double. <PRE> bool SvNOK(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvNOKp">SvNOKp</A></STRONG><BR> <DD> Returns a boolean indicating whether the SV contains a double. Checks the <STRONG>private</STRONG> setting. Use <A HREF="#item_SvNOK"><CODE>SvNOK</CODE></A>. <PRE> bool SvNOKp(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvNOK_off">SvNOK_off</A></STRONG><BR> <DD> Unsets the NV status of an SV. <PRE> void SvNOK_off(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvNOK_on">SvNOK_on</A></STRONG><BR> <DD> Tells an SV that it is a double. <PRE> void SvNOK_on(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvNOK_only">SvNOK_only</A></STRONG><BR> <DD> Tells an SV that it is a double and disables all other OK bits. <PRE> void SvNOK_only(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvNV">SvNV</A></STRONG><BR> <DD> Coerce the given SV to a double and return it. <PRE> NV SvNV(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvNVX">SvNVX</A></STRONG><BR> <DD> Returns the double which is stored in the SV, assuming SvNOK is true. <PRE> NV SvNVX(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvOK">SvOK</A></STRONG><BR> <DD> Returns a boolean indicating whether the value is an SV. <PRE> bool SvOK(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvOOK">SvOOK</A></STRONG><BR> <DD> Returns a boolean 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). <PRE> bool SvOOK(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvPOK">SvPOK</A></STRONG><BR> <DD> Returns a boolean indicating whether the SV contains a character string. <PRE> bool SvPOK(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvPOKp">SvPOKp</A></STRONG><BR> <DD> Returns a boolean indicating whether the SV contains a character string. Checks the <STRONG>private</STRONG> setting. Use <A HREF="#item_SvPOK"><CODE>SvPOK</CODE></A>. <PRE> bool SvPOKp(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvPOK_off">SvPOK_off</A></STRONG><BR> <DD> Unsets the PV status of an SV. <PRE> void SvPOK_off(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvPOK_on">SvPOK_on</A></STRONG><BR> <DD> Tells an SV that it is a string. <PRE> void SvPOK_on(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvPOK_only">SvPOK_only</A></STRONG><BR> <DD> Tells an SV that it is a string and disables all other OK bits. <PRE> void SvPOK_only(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvPV">SvPV</A></STRONG><BR> <DD> Returns a pointer to the string in the SV, or a stringified form of the SV if the SV does not contain a string. Handles 'get' magic. <PRE> char* SvPV(SV* sv, STRLEN len)</PRE> <P></P> <DT><STRONG><A NAME="item_SvPVX">SvPVX</A></STRONG><BR> <DD> Returns a pointer to the string in the SV. The SV must contain a string. <PRE> char* SvPVX(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvPV_force">SvPV_force</A></STRONG><BR> <DD> Like <SvPV> but will force the SV into becoming a string (SvPOK). You want force if you are going to update the SvPVX directly. <PRE> char* SvPV_force(SV* sv, STRLEN len)</PRE> <P></P> <DT><STRONG><A NAME="item_SvPV_nolen">SvPV_nolen</A></STRONG><BR> <DD> Returns a pointer to the string in the SV, or a stringified form of the SV if the SV does not contain a string. Handles 'get' magic. <PRE> char* SvPV_nolen(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvREFCNT">SvREFCNT</A></STRONG><BR> <DD> Returns the value of the object's reference count. <PRE> U32 SvREFCNT(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvREFCNT_dec">SvREFCNT_dec</A></STRONG><BR> <DD> Decrements the reference count of the given SV. <PRE> void SvREFCNT_dec(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvREFCNT_inc">SvREFCNT_inc</A></STRONG><BR> <DD> Increments the reference count of the given SV. <PRE> SV* SvREFCNT_inc(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvROK">SvROK</A></STRONG><BR> <DD> Tests if the SV is an RV. <PRE> bool SvROK(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvROK_off">SvROK_off</A></STRONG><BR> <DD> Unsets the RV status of an SV. <PRE> void SvROK_off(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvROK_on">SvROK_on</A></STRONG><BR> <DD> Tells an SV that it is an RV. <PRE> void SvROK_on(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvRV">SvRV</A></STRONG><BR> <DD> Dereferences an RV to return the SV. <PRE> SV* SvRV(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvSETMAGIC">SvSETMAGIC</A></STRONG><BR> <DD> Invokes <A HREF="#item_mg_set"><CODE>mg_set</CODE></A> on an SV if it has 'set' magic. This macro evaluates its argument more than once. <PRE> void SvSETMAGIC(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvSetSV">SvSetSV</A></STRONG><BR> <DD> Calls <A HREF="#item_sv_setsv"><CODE>sv_setsv</CODE></A> if dsv is not the same as ssv. May evaluate arguments more than once. <PRE> void SvSetSV(SV* dsb, SV* ssv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvSetSV_nosteal">SvSetSV_nosteal</A></STRONG><BR> <DD> Calls a non-destructive version of <A HREF="#item_sv_setsv"><CODE>sv_setsv</CODE></A> if dsv is not the same as ssv. May evaluate arguments more than once. <PRE> void SvSetSV_nosteal(SV* dsv, SV* ssv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvSTASH">SvSTASH</A></STRONG><BR> <DD> Returns the stash of the SV. <PRE> HV* SvSTASH(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvTAINT">SvTAINT</A></STRONG><BR> <DD> Taints an SV if tainting is enabled <PRE> void SvTAINT(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvTAINTED">SvTAINTED</A></STRONG><BR> <DD> Checks to see if an SV is tainted. Returns TRUE if it is, FALSE if not. <PRE> bool SvTAINTED(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvTAINTED_off">SvTAINTED_off</A></STRONG><BR> <DD> Untaints an SV. Be <EM>very</EM> careful with this routine, as it short-circuits some of Perl's fundamental security features. XS 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. <PRE> void SvTAINTED_off(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvTAINTED_on">SvTAINTED_on</A></STRONG><BR> <DD> Marks an SV as tainted. <PRE> void SvTAINTED_on(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvTRUE">SvTRUE</A></STRONG><BR> <DD> Returns a boolean indicating whether Perl would evaluate the SV as true or false, defined or undefined. Does not handle 'get' magic. <PRE> bool SvTRUE(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvTYPE">SvTYPE</A></STRONG><BR> <DD> Returns the type of the SV. See <A HREF="#item_svtype"><CODE>svtype</CODE></A>. <PRE> svtype SvTYPE(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_svtype">svtype</A></STRONG><BR> <DD> An enum of flags for Perl types. These are found in the file <STRONG>sv.h</STRONG> in the <A HREF="#item_svtype"><CODE>svtype</CODE></A> enum. Test these flags with the <A HREF="#item_SvTYPE"><CODE>SvTYPE</CODE></A> macro. <P></P> <DT><STRONG><A NAME="item_SVt_IV">SVt_IV</A></STRONG><BR> <DD> Integer type flag for scalars. See <A HREF="#item_svtype"><CODE>svtype</CODE></A>. <P></P> <DT><STRONG><A NAME="item_SVt_NV">SVt_NV</A></STRONG><BR> <DD> Double type flag for scalars. See <A HREF="#item_svtype"><CODE>svtype</CODE></A>. <P></P> <DT><STRONG><A NAME="item_SVt_PV">SVt_PV</A></STRONG><BR> <DD> Pointer type flag for scalars. See <A HREF="#item_svtype"><CODE>svtype</CODE></A>. <P></P> <DT><STRONG><A NAME="item_SVt_PVAV">SVt_PVAV</A></STRONG><BR> <DD> Type flag for arrays. See <A HREF="#item_svtype"><CODE>svtype</CODE></A>. <P></P> <DT><STRONG><A NAME="item_SVt_PVCV">SVt_PVCV</A></STRONG><BR> <DD> Type flag for code refs. See <A HREF="#item_svtype"><CODE>svtype</CODE></A>. <P></P> <DT><STRONG><A NAME="item_SVt_PVHV">SVt_PVHV</A></STRONG><BR> <DD> Type flag for hashes. See <A HREF="#item_svtype"><CODE>svtype</CODE></A>. <P></P> <DT><STRONG><A NAME="item_SVt_PVMG">SVt_PVMG</A></STRONG><BR> <DD> Type flag for blessed scalars. See <A HREF="#item_svtype"><CODE>svtype</CODE></A>. <P></P> <DT><STRONG><A NAME="item_SvUPGRADE">SvUPGRADE</A></STRONG><BR> <DD> Used to upgrade an SV to a more complex form. Uses <A HREF="#item_sv_upgrade"><CODE>sv_upgrade</CODE></A> to perform the upgrade if necessary. See <A HREF="#item_svtype"><CODE>svtype</CODE></A>. <PRE> void SvUPGRADE(SV* sv, svtype type)</PRE> <P></P> <DT><STRONG><A NAME="item_SvUV">SvUV</A></STRONG><BR> <DD> Coerces the given SV to an unsigned integer and returns it. <PRE> UV SvUV(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_SvUVX">SvUVX</A></STRONG><BR> <DD> Returns the unsigned integer which is stored in the SV, assuming SvIOK is true. <PRE> UV SvUVX(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_2mortal">sv_2mortal</A></STRONG><BR> <DD> Marks an SV as mortal. The SV will be destroyed when the current context ends. <PRE> SV* sv_2mortal(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_bless">sv_bless</A></STRONG><BR> <DD> Blesses an SV into a specified package. The SV must be an RV. The package must be designated by its stash (see <A HREF="#item_gv_stashpv"><CODE>gv_stashpv()</CODE></A>). The reference count of the SV is unaffected. <PRE> SV* sv_bless(SV* sv, HV* stash)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_catpv">sv_catpv</A></STRONG><BR> <DD> Concatenates the string onto the end of the string which is in the SV. Handles 'get' magic, but not 'set' magic. See <A HREF="#item_sv_catpv_mg"><CODE>sv_catpv_mg</CODE></A>. <PRE> void sv_catpv(SV* sv, const char* ptr)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_catpvf">sv_catpvf</A></STRONG><BR> <DD> Processes its arguments like <A HREF="../../lib/Pod/perlfunc.html#item_sprintf"><CODE>sprintf</CODE></A> and appends the formatted output to an SV. Handles 'get' magic, but not 'set' magic. <A HREF="#item_SvSETMAGIC"><CODE>SvSETMAGIC()</CODE></A> must typically be called after calling this function to handle 'set' magic. <PRE> void sv_catpvf(SV* sv, const char* pat, ...)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_catpvf_mg">sv_catpvf_mg</A></STRONG><BR> <DD> Like <A HREF="#item_sv_catpvf"><CODE>sv_catpvf</CODE></A>, but also handles 'set' magic. <PRE> void sv_catpvf_mg(SV *sv, const char* pat, ...)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_catpvn">sv_catpvn</A></STRONG><BR> <DD> Concatenates the string onto the end of the string which is in the SV. The <CODE>len</CODE> indicates number of bytes to copy. Handles 'get' magic, but not 'set' magic. See <A HREF="#item_sv_catpvn_mg"><CODE>sv_catpvn_mg</CODE></A>. <PRE> void sv_catpvn(SV* sv, const char* ptr, STRLEN len)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_catpvn_mg">sv_catpvn_mg</A></STRONG><BR> <DD> Like <A HREF="#item_sv_catpvn"><CODE>sv_catpvn</CODE></A>, but also handles 'set' magic. <PRE> void sv_catpvn_mg(SV *sv, const char *ptr, STRLEN len)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_catpv_mg">sv_catpv_mg</A></STRONG><BR> <DD> Like <A HREF="#item_sv_catpv"><CODE>sv_catpv</CODE></A>, but also handles 'set' magic. <PRE> void sv_catpv_mg(SV *sv, const char *ptr)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_catsv">sv_catsv</A></STRONG><BR> <DD> Concatenates the string from SV <CODE>ssv</CODE> onto the end of the string in SV <CODE>dsv</CODE>. Handles 'get' magic, but not 'set' magic. See <A HREF="#item_sv_catsv_mg"><CODE>sv_catsv_mg</CODE></A>. <PRE> void sv_catsv(SV* dsv, SV* ssv)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_catsv_mg">sv_catsv_mg</A></STRONG><BR> <DD> Like <A HREF="#item_sv_catsv"><CODE>sv_catsv</CODE></A>, but also handles 'set' magic. <PRE> void sv_catsv_mg(SV *dstr, SV *sstr)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_chop">sv_chop</A></STRONG><BR> <DD> Efficient removal of characters from the beginning of the string buffer. <A HREF="#item_SvPOK"><CODE>SvPOK(sv)</CODE></A> must be true and the <CODE>ptr</CODE> must be a pointer to somewhere inside the string buffer. The <CODE>ptr</CODE> becomes the first character of the adjusted string. <PRE> void sv_chop(SV* sv, char* ptr)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_cmp">sv_cmp</A></STRONG><BR> <DD> Compares the strings in two SVs. Returns -1, 0, or 1 indicating whether the string in <CODE>sv1</CODE> is less than, equal to, or greater than the string in <CODE>sv2</CODE>. <PRE> I32 sv_cmp(SV* sv1, SV* sv2)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_dec">sv_dec</A></STRONG><BR> <DD> Auto-decrement of the value in the SV. <PRE> void sv_dec(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_derived_from">sv_derived_from</A></STRONG><BR> <DD> Returns a boolean indicating whether the SV is derived from the specified class. This is the function that implements <CODE>UNIVERSAL::isa</CODE>. It works for class names as well as for objects. <PRE> bool sv_derived_from(SV* sv, const char* name)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_eq">sv_eq</A></STRONG><BR> <DD> Returns a boolean indicating whether the strings in the two SVs are identical. <PRE> I32 sv_eq(SV* sv1, SV* sv2)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_grow">sv_grow</A></STRONG><BR> <DD> Expands the character buffer in the SV. This will use <A HREF="#item_sv_unref"><CODE>sv_unref</CODE></A> and will upgrade the SV to <A HREF="#item_SVt_PV"><CODE>SVt_PV</CODE></A>. Returns a pointer to the character buffer. Use <A HREF="#item_SvGROW"><CODE>SvGROW</CODE></A>. <PRE> char* sv_grow(SV* sv, STRLEN newlen)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_inc">sv_inc</A></STRONG><BR> <DD> Auto-increment of the value in the SV. <PRE> void sv_inc(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_insert">sv_insert</A></STRONG><BR> <DD> Inserts a string at the specified offset/length within the SV. Similar to the Perl <A HREF="../../lib/Pod/perlfunc.html#item_substr"><CODE>substr()</CODE></A> function. <PRE> void sv_insert(SV* bigsv, STRLEN offset, STRLEN len, char* little, STRLEN littlelen)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_isa">sv_isa</A></STRONG><BR> <DD> Returns a boolean indicating whether the SV is blessed into the specified class. This does not check for subtypes; use <A HREF="#item_sv_derived_from"><CODE>sv_derived_from</CODE></A> to verify an inheritance relationship. <PRE> int sv_isa(SV* sv, const char* name)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_isobject">sv_isobject</A></STRONG><BR> <DD> Returns a boolean indicating whether the SV is an RV pointing to a blessed object. If the SV is not an RV, or if the object is not blessed, then this will return false. <PRE> int sv_isobject(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_len">sv_len</A></STRONG><BR> <DD> Returns the length of the string in the SV. See also <A HREF="#item_SvCUR"><CODE>SvCUR</CODE></A>. <PRE> STRLEN sv_len(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_magic">sv_magic</A></STRONG><BR> <DD> Adds magic to an SV. <PRE> void sv_magic(SV* sv, SV* obj, int how, const char* name, I32 namlen)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_mortalcopy">sv_mortalcopy</A></STRONG><BR> <DD> Creates a new SV which is a copy of the original SV. The new SV is marked as mortal. <PRE> SV* sv_mortalcopy(SV* oldsv)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_newmortal">sv_newmortal</A></STRONG><BR> <DD> Creates a new SV which is mortal. The reference count of the SV is set to 1. <PRE> SV* sv_newmortal()</PRE> <P></P> <DT><STRONG><A NAME="item_sv_setiv">sv_setiv</A></STRONG><BR> <DD> Copies an integer into the given SV. Does not handle 'set' magic. See <A HREF="#item_sv_setiv_mg"><CODE>sv_setiv_mg</CODE></A>. <PRE> void sv_setiv(SV* sv, IV num)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_setiv_mg">sv_setiv_mg</A></STRONG><BR> <DD> Like <A HREF="#item_sv_setiv"><CODE>sv_setiv</CODE></A>, but also handles 'set' magic. <PRE> void sv_setiv_mg(SV *sv, IV i)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_setnv">sv_setnv</A></STRONG><BR> <DD> Copies a double into the given SV. Does not handle 'set' magic. See <A HREF="#item_sv_setnv_mg"><CODE>sv_setnv_mg</CODE></A>. <PRE> void sv_setnv(SV* sv, NV num)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_setnv_mg">sv_setnv_mg</A></STRONG><BR> <DD> Like <A HREF="#item_sv_setnv"><CODE>sv_setnv</CODE></A>, but also handles 'set' magic. <PRE> void sv_setnv_mg(SV *sv, NV num)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_setpv">sv_setpv</A></STRONG><BR> <DD> Copies a string into an SV. The string must be null-terminated. Does not handle 'set' magic. See <A HREF="#item_sv_setpv_mg"><CODE>sv_setpv_mg</CODE></A>. <PRE> void sv_setpv(SV* sv, const char* ptr)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_setpvf">sv_setpvf</A></STRONG><BR> <DD> Processes its arguments like <A HREF="../../lib/Pod/perlfunc.html#item_sprintf"><CODE>sprintf</CODE></A> and sets an SV to the formatted output. Does not handle 'set' magic. See <A HREF="#item_sv_setpvf_mg"><CODE>sv_setpvf_mg</CODE></A>. <PRE> void sv_setpvf(SV* sv, const char* pat, ...)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_setpvf_mg">sv_setpvf_mg</A></STRONG><BR> <DD> Like <A HREF="#item_sv_setpvf"><CODE>sv_setpvf</CODE></A>, but also handles 'set' magic. <PRE> void sv_setpvf_mg(SV *sv, const char* pat, ...)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_setpviv">sv_setpviv</A></STRONG><BR> <DD> Copies an integer into the given SV, also updating its string value. Does not handle 'set' magic. See <A HREF="#item_sv_setpviv_mg"><CODE>sv_setpviv_mg</CODE></A>. <PRE> void sv_setpviv(SV* sv, IV num)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_setpviv_mg">sv_setpviv_mg</A></STRONG><BR> <DD> Like <A HREF="#item_sv_setpviv"><CODE>sv_setpviv</CODE></A>, but also handles 'set' magic. <PRE> void sv_setpviv_mg(SV *sv, IV iv)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_setpvn">sv_setpvn</A></STRONG><BR> <DD> Copies a string into an SV. The <CODE>len</CODE> parameter indicates the number of bytes to be copied. Does not handle 'set' magic. See <A HREF="#item_sv_setpvn_mg"><CODE>sv_setpvn_mg</CODE></A>. <PRE> void sv_setpvn(SV* sv, const char* ptr, STRLEN len)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_setpvn_mg">sv_setpvn_mg</A></STRONG><BR> <DD> Like <A HREF="#item_sv_setpvn"><CODE>sv_setpvn</CODE></A>, but also handles 'set' magic. <PRE> void sv_setpvn_mg(SV *sv, const char *ptr, STRLEN len)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_setpv_mg">sv_setpv_mg</A></STRONG><BR> <DD> Like <A HREF="#item_sv_setpv"><CODE>sv_setpv</CODE></A>, but also handles 'set' magic. <PRE> void sv_setpv_mg(SV *sv, const char *ptr)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_setref_iv">sv_setref_iv</A></STRONG><BR> <DD> Copies an integer into a new SV, optionally blessing the SV. The <CODE>rv</CODE> argument will be upgraded to an RV. That RV will be modified to point to the new SV. The <CODE>classname</CODE> argument indicates the package for the blessing. Set <CODE>classname</CODE> to <A HREF="#item_Nullch"><CODE>Nullch</CODE></A> to avoid the blessing. The new SV will be returned and will have a reference count of 1. <PRE> SV* sv_setref_iv(SV* rv, const char* classname, IV iv)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_setref_nv">sv_setref_nv</A></STRONG><BR> <DD> Copies a double into a new SV, optionally blessing the SV. The <CODE>rv</CODE> argument will be upgraded to an RV. That RV will be modified to point to the new SV. The <CODE>classname</CODE> argument indicates the package for the blessing. Set <CODE>classname</CODE> to <A HREF="#item_Nullch"><CODE>Nullch</CODE></A> to avoid the blessing. The new SV will be returned and will have a reference count of 1. <PRE> SV* sv_setref_nv(SV* rv, const char* classname, NV nv)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_setref_pv">sv_setref_pv</A></STRONG><BR> <DD> Copies a pointer into a new SV, optionally blessing the SV. The <CODE>rv</CODE> argument will be upgraded to an RV. That RV will be modified to point to the new SV. If the <CODE>pv</CODE> argument is NULL then <A HREF="#item_PL_sv_undef"><CODE>PL_sv_undef</CODE></A> will be placed into the SV. The <CODE>classname</CODE> argument indicates the package for the blessing. Set <CODE>classname</CODE> to <A HREF="#item_Nullch"><CODE>Nullch</CODE></A> to avoid the blessing. The new SV will be returned and will have a reference count of 1. <P>Do not use with other Perl types such as HV, AV, SV, CV, because those objects will become corrupted by the pointer copy process.</P> <P>Note that <A HREF="#item_sv_setref_pvn"><CODE>sv_setref_pvn</CODE></A> copies the string while this copies the pointer.</P> <PRE> SV* sv_setref_pv(SV* rv, const char* classname, void* pv)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_setref_pvn">sv_setref_pvn</A></STRONG><BR> <DD> Copies a string into a new SV, optionally blessing the SV. The length of the string must be specified with <CODE>n</CODE>. The <CODE>rv</CODE> argument will be upgraded to an RV. That RV will be modified to point to the new SV. The <CODE>classname</CODE> argument indicates the package for the blessing. Set <CODE>classname</CODE> to <A HREF="#item_Nullch"><CODE>Nullch</CODE></A> to avoid the blessing. The new SV will be returned and will have a reference count of 1. <P>Note that <A HREF="#item_sv_setref_pv"><CODE>sv_setref_pv</CODE></A> copies the pointer while this copies the string.</P> <PRE> SV* sv_setref_pvn(SV* rv, const char* classname, char* pv, STRLEN n)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_setsv">sv_setsv</A></STRONG><BR> <DD> Copies the contents of the source SV <CODE>ssv</CODE> into the destination SV <CODE>dsv</CODE>. The source SV may be destroyed if it is mortal. Does not handle 'set' magic. See the macro forms <A HREF="#item_SvSetSV"><CODE>SvSetSV</CODE></A>, <A HREF="#item_SvSetSV_nosteal"><CODE>SvSetSV_nosteal</CODE></A> and <A HREF="#item_sv_setsv_mg"><CODE>sv_setsv_mg</CODE></A>. <PRE> void sv_setsv(SV* dsv, SV* ssv)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_setsv_mg">sv_setsv_mg</A></STRONG><BR> <DD> Like <A HREF="#item_sv_setsv"><CODE>sv_setsv</CODE></A>, but also handles 'set' magic. <PRE> void sv_setsv_mg(SV *dstr, SV *sstr)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_setuv">sv_setuv</A></STRONG><BR> <DD> Copies an unsigned integer into the given SV. Does not handle 'set' magic. See <A HREF="#item_sv_setuv_mg"><CODE>sv_setuv_mg</CODE></A>. <PRE> void sv_setuv(SV* sv, UV num)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_setuv_mg">sv_setuv_mg</A></STRONG><BR> <DD> Like <A HREF="#item_sv_setuv"><CODE>sv_setuv</CODE></A>, but also handles 'set' magic. <PRE> void sv_setuv_mg(SV *sv, UV u)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_unref">sv_unref</A></STRONG><BR> <DD> Unsets the RV status of the SV, and decrements the reference count of whatever was being referenced by the RV. This can almost be thought of as a reversal of <A HREF="#item_newSVrv"><CODE>newSVrv</CODE></A>. See <A HREF="#item_SvROK_off"><CODE>SvROK_off</CODE></A>. <PRE> void sv_unref(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_upgrade">sv_upgrade</A></STRONG><BR> <DD> Upgrade an SV to a more complex form. Use <A HREF="#item_SvUPGRADE"><CODE>SvUPGRADE</CODE></A>. See <A HREF="#item_svtype"><CODE>svtype</CODE></A>. <PRE> bool sv_upgrade(SV* sv, U32 mt)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_usepvn">sv_usepvn</A></STRONG><BR> <DD> Tells an SV to use <CODE>ptr</CODE> to find its string value. Normally the string is stored inside the SV but sv_usepvn allows the SV to use an outside string. The <CODE>ptr</CODE> should point to memory that was allocated by <CODE>malloc</CODE>. The string length, <CODE>len</CODE>, must be supplied. This function will realloc the memory pointed to by <CODE>ptr</CODE>, so that pointer should not be freed or used by the programmer after giving it to sv_usepvn. Does not handle 'set' magic. See <A HREF="#item_sv_usepvn_mg"><CODE>sv_usepvn_mg</CODE></A>. <PRE> void sv_usepvn(SV* sv, char* ptr, STRLEN len)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_usepvn_mg">sv_usepvn_mg</A></STRONG><BR> <DD> Like <A HREF="#item_sv_usepvn"><CODE>sv_usepvn</CODE></A>, but also handles 'set' magic. <PRE> void sv_usepvn_mg(SV *sv, char *ptr, STRLEN len)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_vcatpvfn">sv_vcatpvfn</A></STRONG><BR> <DD> Processes its arguments like <CODE>vsprintf</CODE> and appends the formatted output to an SV. Uses an array of SVs if the C style variable argument list is missing (NULL). When running with taint checks enabled, indicates via <CODE>maybe_tainted</CODE> if results are untrustworthy (often due to the use of locales). <PRE> void sv_vcatpvfn(SV* sv, const char* pat, STRLEN patlen, va_list* args, SV** svargs, I32 svmax, bool *maybe_tainted)</PRE> <P></P> <DT><STRONG><A NAME="item_sv_vsetpvfn">sv_vsetpvfn</A></STRONG><BR> <DD> Works like <CODE>vcatpvfn</CODE> but copies the text into the SV instead of appending it. <PRE> void sv_vsetpvfn(SV* sv, const char* pat, STRLEN patlen, va_list* args, SV** svargs, I32 svmax, bool *maybe_tainted)</PRE> <P></P> <DT><STRONG><A NAME="item_THIS">THIS</A></STRONG><BR> <DD> Variable which is setup by <CODE>xsubpp</CODE> to designate the object in a C++ XSUB. This is always the proper type for the C++ object. See <A HREF="#item_CLASS"><CODE>CLASS</CODE></A> and <A HREF="../../lib/Pod/perlxs.html#using xs with c++">Using XS With C++ in the perlxs manpage</A>. <PRE> (whatever) THIS</PRE> <P></P> <DT><STRONG><A NAME="item_toLOWER">toLOWER</A></STRONG><BR> <DD> Converts the specified character to lowercase. <PRE> char toLOWER(char ch)</PRE> <P></P> <DT><STRONG><A NAME="item_toUPPER">toUPPER</A></STRONG><BR> <DD> Converts the specified character to uppercase. <PRE> char toUPPER(char ch)</PRE> <P></P> <DT><STRONG><A NAME="item_warn">warn</A></STRONG><BR> <DD> This is the XSUB-writer's interface to Perl's <A HREF="#item_warn"><CODE>warn</CODE></A> function. Use this function the same way you use the C <A HREF="../../lib/Pod/perlfunc.html#item_printf"><CODE>printf</CODE></A> function. See <A HREF="#item_croak"><CODE>croak</CODE></A>. <PRE> void warn(const char* pat, ...)</PRE> <P></P> <DT><STRONG><A NAME="item_XPUSHi">XPUSHi</A></STRONG><BR> <DD> Push an integer onto the stack, extending the stack if necessary. Handles 'set' magic. See <A HREF="#item_PUSHi"><CODE>PUSHi</CODE></A>. <PRE> void XPUSHi(IV iv)</PRE> <P></P> <DT><STRONG><A NAME="item_XPUSHn">XPUSHn</A></STRONG><BR> <DD> Push a double onto the stack, extending the stack if necessary. Handles 'set' magic. See <A HREF="#item_PUSHn"><CODE>PUSHn</CODE></A>. <PRE> void XPUSHn(NV nv)</PRE> <P></P> <DT><STRONG><A NAME="item_XPUSHp">XPUSHp</A></STRONG><BR> <DD> Push a string onto the stack, extending the stack if necessary. The <CODE>len</CODE> indicates the length of the string. Handles 'set' magic. See <A HREF="#item_PUSHp"><CODE>PUSHp</CODE></A>. <PRE> void XPUSHp(char* str, STRLEN len)</PRE> <P></P> <DT><STRONG><A NAME="item_XPUSHs">XPUSHs</A></STRONG><BR> <DD> Push an SV onto the stack, extending the stack if necessary. Does not handle 'set' magic. See <A HREF="#item_PUSHs"><CODE>PUSHs</CODE></A>. <PRE> void XPUSHs(SV* sv)</PRE> <P></P> <DT><STRONG><A NAME="item_XPUSHu">XPUSHu</A></STRONG><BR> <DD> Push an unsigned integer onto the stack, extending the stack if necessary. See <A HREF="#item_PUSHu"><CODE>PUSHu</CODE></A>. <PRE> void XPUSHu(UV uv)</PRE> <P></P> <DT><STRONG><A NAME="item_XS">XS</A></STRONG><BR> <DD> Macro to declare an XSUB and its C parameter list. This is handled by <CODE>xsubpp</CODE>. <P></P> <DT><STRONG><A NAME="item_XSRETURN">XSRETURN</A></STRONG><BR> <DD> Return from XSUB, indicating number of items on the stack. This is usually handled by <CODE>xsubpp</CODE>. <PRE> void XSRETURN(int nitems)</PRE> <P></P> <DT><STRONG><A NAME="item_XSRETURN_EMPTY">XSRETURN_EMPTY</A></STRONG><BR> <DD> Return an empty list from an XSUB immediately. <PRE> XSRETURN_EMPTY;</PRE> <P></P> <DT><STRONG><A NAME="item_XSRETURN_IV">XSRETURN_IV</A></STRONG><BR> <DD> Return an integer from an XSUB immediately. Uses <A HREF="#item_XST_mIV"><CODE>XST_mIV</CODE></A>. <PRE> void XSRETURN_IV(IV iv)</PRE> <P></P> <DT><STRONG><A NAME="item_XSRETURN_NO">XSRETURN_NO</A></STRONG><BR> <DD> Return <CODE>&PL_sv_no</CODE> from an XSUB immediately. Uses <A HREF="#item_XST_mNO"><CODE>XST_mNO</CODE></A>. <PRE> XSRETURN_NO;</PRE> <P></P> <DT><STRONG><A NAME="item_XSRETURN_NV">XSRETURN_NV</A></STRONG><BR> <DD> Return an double from an XSUB immediately. Uses <A HREF="#item_XST_mNV"><CODE>XST_mNV</CODE></A>. <PRE> void XSRETURN_NV(NV nv)</PRE> <P></P> <DT><STRONG><A NAME="item_XSRETURN_PV">XSRETURN_PV</A></STRONG><BR> <DD> Return a copy of a string from an XSUB immediately. Uses <A HREF="#item_XST_mPV"><CODE>XST_mPV</CODE></A>. <PRE> void XSRETURN_PV(char* str)</PRE> <P></P> <DT><STRONG><A NAME="item_XSRETURN_UNDEF">XSRETURN_UNDEF</A></STRONG><BR> <DD> Return <CODE>&PL_sv_undef</CODE> from an XSUB immediately. Uses <A HREF="#item_XST_mUNDEF"><CODE>XST_mUNDEF</CODE></A>. <PRE> XSRETURN_UNDEF;</PRE> <P></P> <DT><STRONG><A NAME="item_XSRETURN_YES">XSRETURN_YES</A></STRONG><BR> <DD> Return <CODE>&PL_sv_yes</CODE> from an XSUB immediately. Uses <A HREF="#item_XST_mYES"><CODE>XST_mYES</CODE></A>. <PRE> XSRETURN_YES;</PRE> <P></P> <DT><STRONG><A NAME="item_XST_mIV">XST_mIV</A></STRONG><BR> <DD> Place an integer into the specified position <A HREF="../../lib/Pod/perlfunc.html#item_pos"><CODE>pos</CODE></A> on the stack. The value is stored in a new mortal SV. <PRE> void XST_mIV(int pos, IV iv)</PRE> <P></P> <DT><STRONG><A NAME="item_XST_mNO">XST_mNO</A></STRONG><BR> <DD> Place <CODE>&PL_sv_no</CODE> into the specified position <A HREF="../../lib/Pod/perlfunc.html#item_pos"><CODE>pos</CODE></A> on the stack. <PRE> void XST_mNO(int pos)</PRE> <P></P> <DT><STRONG><A NAME="item_XST_mNV">XST_mNV</A></STRONG><BR> <DD> Place a double into the specified position <A HREF="../../lib/Pod/perlfunc.html#item_pos"><CODE>pos</CODE></A> on the stack. The value is stored in a new mortal SV. <PRE> void XST_mNV(int pos, NV nv)</PRE> <P></P> <DT><STRONG><A NAME="item_XST_mPV">XST_mPV</A></STRONG><BR> <DD> Place a copy of a string into the specified position <A HREF="../../lib/Pod/perlfunc.html#item_pos"><CODE>pos</CODE></A> on the stack. The value is stored in a new mortal SV. <PRE> void XST_mPV(int pos, char* str)</PRE> <P></P> <DT><STRONG><A NAME="item_XST_mUNDEF">XST_mUNDEF</A></STRONG><BR> <DD> Place <CODE>&PL_sv_undef</CODE> into the specified position <A HREF="../../lib/Pod/perlfunc.html#item_pos"><CODE>pos</CODE></A> on the stack. <PRE> void XST_mUNDEF(int pos)</PRE> <P></P> <DT><STRONG><A NAME="item_XST_mYES">XST_mYES</A></STRONG><BR> <DD> Place <CODE>&PL_sv_yes</CODE> into the specified position <A HREF="../../lib/Pod/perlfunc.html#item_pos"><CODE>pos</CODE></A> on the stack. <PRE> void XST_mYES(int pos)</PRE> <P></P> <DT><STRONG><A NAME="item_XS_VERSION">XS_VERSION</A></STRONG><BR> <DD> The version identifier for an XS module. This is usually handled automatically by <CODE>ExtUtils::MakeMaker</CODE>. See <A HREF="#item_XS_VERSION_BOOTCHECK"><CODE>XS_VERSION_BOOTCHECK</CODE></A>. <P></P> <DT><STRONG><A NAME="item_XS_VERSION_BOOTCHECK">XS_VERSION_BOOTCHECK</A></STRONG><BR> <DD> Macro to verify that a PM module's $VERSION variable matches the XS module's <A HREF="#item_XS_VERSION"><CODE>XS_VERSION</CODE></A> variable. This is usually handled automatically by <CODE>xsubpp</CODE>. See <A HREF="../../lib/Pod/perlxs.html#the versioncheck: keyword">The VERSIONCHECK: Keyword in the perlxs manpage</A>. <PRE> XS_VERSION_BOOTCHECK;</PRE> <P></P> <DT><STRONG><A NAME="item_Zero">Zero</A></STRONG><BR> <DD> The XSUB-writer's interface to the C <CODE>memzero</CODE> function. The <CODE>dest</CODE> is the destination, <CODE>nitems</CODE> is the number of items, and <CODE>type</CODE> is the type. <PRE> void Zero(void* dest, int nitems, type)</PRE> <P></P></DL> <P> <HR> <H1><A NAME="authors">AUTHORS</A></H1> <P>Until May 1997, this document was maintained by Jeff Okamoto <<A HREF="mailto:okamoto@corp.hp.com">okamoto@corp.hp.com</A>>. It is now maintained as part of Perl itself.</P> <P>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.</P> <P>API Listing originally by Dean Roehrich <<A HREF="mailto:roehrich@cray.com">roehrich@cray.com</A>>.</P> <P>Updated to be autogenerated from comments in the source by Benjamin Stuhl.</P> <P> <HR> <H1><A NAME="see also">SEE ALSO</A></H1> <P>perlguts(1), perlxs(1), perlxstut(1), <CODE>perlintern(1)</CODE></P> <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%> <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc"> <STRONG><P CLASS=block> perlapi - autogenerated documentation for the perl public API</P></STRONG> </TD></TR> </TABLE> </BODY> </HTML>