/* first, some documentation for xsubpp-generated items */
/*
+=head1 Variables created by C<xsubpp> and C<xsubpp> internal functions
+
=for apidoc Amn|char*|CLASS
Variable which is setup by C<xsubpp> to indicate the
class name for a C++ XS constructor. This is always a C<char*>. See C<THIS>.
/* Typically used to return values from XS functions. */
/*
+=head1 Stack Manipulation Macros
+
=for apidoc Am|void|XST_mIV|int pos|IV iv
Place an integer into the specified position C<pos> on the stack. The
value is stored in a new mortal SV.
=for apidoc Ams||XSRETURN_EMPTY
Return an empty list from an XSUB immediately.
+=head1 Variables created by C<xsubpp> and C<xsubpp> internal functions
+
=for apidoc AmU||newXSproto
Used by C<xsubpp> to hook up XSUBs as Perl subs. Adds Perl prototypes to
the subs.
* meant that things should remain where they had set them)." --Treebeard
*/
+/*
+=head1 Array Manipulation Functions
+*/
+
#include "EXTERN.h"
#define PERL_IN_AV_C
#include "perl.h"
#define AVf_REUSED 4 /* got undeffed--don't turn old memory into SVs now */
/*
+=head1 Handy Values
+
=for apidoc AmU||Nullav
Null AV pointer.
+=head1 Array Manipulation Functions
+
=for apidoc Am|int|AvFILL|AV* av
Same as C<av_len()>. Deprecated, use C<av_len()> instead.
#define CXINC (cxstack_ix < cxstack_max ? ++cxstack_ix : (cxstack_ix = cxinc()))
-/* "gimme" values */
+/*
+=head1 "Gimme" Values
+*/
/*
=for apidoc AmU||G_SCALAR
};
/*
+=head1 Handy Values
+
=for apidoc AmU||Nullcv
Null CV pointer.
+=head1 CV Manipulation Functions
+
=for apidoc Am|HV*|CvSTASH|CV* cv
Returns the stash of the CV.
#endif /* SYSV IPC */
/*
+=head1 IO Functions
+
=for apidoc start_glob
Function called by C<do_readline> to spawn a glob (or do the glob inside
* laughed Pippin.
*/
+/*
+=head1 GV Functions
+*/
+
#include "EXTERN.h"
#define PERL_IN_GV_C
#include "perl.h"
#define GvFLAGS(gv) (GvXPVGV(gv)->xgv_flags)
/*
+=head1 GV Functions
+
=for apidoc Am|SV*|GvSV|GV* gv
Return the SV from the GV.
#define Null(type) ((type)NULL)
/*
-=for apidoc AmU||Nullch
-Null character pointer.
+=head1 Handy Values
+=for apidoc AmU||Nullch
+Null character pointer.
=for apidoc AmU||Nullsv
Null SV pointer.
#define Ctl(ch) ((ch) & 037)
/*
+=head1 Miscellaneous Functions
+
=for apidoc Am|bool|strNE|char* s1|char* s2
Test two strings to see if they are different. Returns true or
false.
#endif
/*
+
+=head1 Character classes
+
=for apidoc Am|bool|isALNUM|char ch
Returns a boolean indicating whether the C C<char> is an ASCII alphanumeric
character (including underscore) or digit.
*/
/*
+=head1 SV Manipulation Functions
+
=for apidoc Am|SV*|NEWSV|int id|STRLEN len
Creates a new SV. A non-zero C<len> parameter indicates the number of
bytes of preallocated string space the SV should have. An extra byte for a
space is allocated.) The reference count for the new SV is set to 1.
C<id> is an integer id between 0 and 1299 (used to identify leaks).
+=head1 Memory Management
+
=for apidoc Am|void|New|int id|void* ptr|int nitems|type
The XSUB-writer's interface to the C C<malloc> function.
} STMT_END
/*
+=head1 Hash Manipulation Functions
+
=for apidoc AmU||HEf_SVKEY
This flag, used in the length slot of hash entries and magic structures,
specifies the structure contains an C<SV*> pointer where a C<char*> pointer
is to be expected. (For information only--not to be used).
+=head1 Handy Values
+
=for apidoc AmU||Nullhv
Null HV pointer.
+=head1 Hash Manipulation Functions
+
=for apidoc Am|char*|HvNAME|HV* stash
Returns the package name of a stash. See C<SvSTASH>, C<CvSTASH>.
PERLVAR(Idoswitches, bool)
/*
+=head1 Global Variables
+
=for apidoc mn|bool|PL_dowarn
The C variable which corresponds to Perl's $^W warning variable.
* come here, and I don't want to see no more magic,' he said, and fell silent."
*/
+/*
+=head1 Magical Functions
+*/
+
#include "EXTERN.h"
#define PERL_IN_MG_C
#include "perl.h"
* wizards count differently to other people."
*/
+/*
+=head1 Numeric functions
+*/
+
#include "EXTERN.h"
#define PERL_IN_NUMERIC_C
#include "perl.h"
* either way, as the saying is, if you follow me." --the Gaffer
*/
+
#include "EXTERN.h"
#define PERL_IN_OP_C
#include "perl.h"
}
/*
+=head1 Embedding Functions
+
=for apidoc load_module
Loads the module whose name is pointed to by the string part of name.
static void const_sv_xsub(pTHX_ CV* cv);
/*
+
+=head1 Optree Manipulation Functions
+
=for apidoc cv_const_sv
If C<cv> is a constant sub eligible for inlining. returns the constant
dfl)
/*
+=head1 "Gimme" Values
+
=for apidoc Amn|U32|GIMME_V
The XSUB-writer's equivalent to Perl's C<wantarray>. Returns C<G_VOID>,
C<G_SCALAR> or C<G_ARRAY> for void, scalar or list context,
#else
/*
+=head1 Embedding Functions
+
=for apidoc perl_alloc
Allocates a new Perl interpreter. See L<perlembed>.
}
/*
+=head1 SV Manipulation Functions
+
=for apidoc p||get_sv
Returns the SV of the specified Perl scalar. If C<create> is set and the
}
/*
+=head1 Array Manipulation Functions
+
=for apidoc p||get_av
Returns the AV of the specified Perl array. If C<create> is set and the
}
/*
+=head1 Hash Manipulation Functions
+
=for apidoc p||get_hv
Returns the HV of the specified Perl hash. If C<create> is set and the
}
/*
+=head1 CV Manipulation Functions
+
=for apidoc p||get_cv
Returns the CV of the specified Perl subroutine. If C<create> is set and
/* Be sure to refetch the stack pointer after calling these routines. */
/*
+
+=head1 Callback Functions
+
=for apidoc p||call_argv
Performs a callback to the specified Perl sub. See L<perlcall>.
/* Require a module. */
/*
+=head1 Embedding Functions
+
=for apidoc p||require_pv
Tells Perl to C<require> the file named by the string argument. It is
#define PP(s) OP * Perl_##s(pTHX)
/*
+=head1 Stack Manipulation Macros
+
=for apidoc AmU||SP
Stack pointer. This is usually handled by C<xsubpp>. See C<dSP> and
C<SPAGAIN>.
}
/*
+=head1 Array Manipulation Functions
+
=for apidoc sortsv
Sort an array. Here is an example:
#define SSPOPDXPTR (PL_savestack[--PL_savestack_ix].any_dxptr)
/*
+=head1 Callback Functions
+
=for apidoc Ams||SAVETMPS
Opening bracket for temporaries on a callback. See C<FREETMPS> and
L<perlcall>.
*/
/*
+=head1 Shared SV Functions
+
=for apidoc sharedsv_init
Saves a space for keeping SVs wider than an interpreter,
/*
+=head1 SV Manipulation Functions
+
=for apidoc sv_add_arena
Given a chunk of memory, link it to the head of the list of arenas,
#endif /* USE_ITHREADS */
/*
+=head1 Unicode Support
+
=for apidoc sv_recode_to_utf8
The encoding is assumed to be an Encode object, on entry the PV
#endif
/*
+=head1 SV Flags
+
=for apidoc AmU||svtype
An enum of flags for Perl types. These are found in the file B<sv.h>
in the C<svtype> enum. Test these flags with the C<SvTYPE> macro.
};
/*
+=head1 SV Manipulation Functions
+
=for apidoc Am|U32|SvREFCNT|SV* sv
Returns the value of the object's reference count.
/* the following macros update any magic values this sv is associated with */
/*
+=head1 Magical Functions
+
=for apidoc Am|void|SvGETMAGIC|SV* sv
Invokes C<mg_get> on an SV if it has 'get' magic. This macro evaluates its
argument more than once.
=for apidoc Am|void|SvSetMagicSV_nosteal|SV* dsv|SV* ssv
Like C<SvSetMagicSV>, but does any set magic required afterwards.
+=head1 SV Manipulation Functions
+
=for apidoc Am|char *|SvGROW|SV* sv|STRLEN len
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
+/*
+=head1 Global Variables
+*/
+
/***********************************************/
/* Global only to current thread */
/***********************************************/
}
/*
+=head1 SV Manipulation Functions
+
=for apidoc sv_derived_from
Returns a boolean indicating whether the SV is derived from the specified
#define PERL_IN_UTF8_C
#include "perl.h"
-/* Unicode support */
+/*
+=head1 Unicode Support
-/*
=for apidoc A|U8 *|uvuni_to_utf8_flags|U8 *d|UV uv|UV flags
Adds the UTF8 representation of the Unicode codepoint C<uv> to the end
If FBMcf_TAIL, the table is created as if the string has a trailing \n. */
/*
+=head1 Miscellaneous Functions
+
=for apidoc fbm_compile
Analyses the string in order to make fast searches on it using fbm_instr()
/* copy a string to a safe spot */
/*
+=head1 Memory Management
+
=for apidoc savepv
Copy a string to a safe spot. This does not use an SV.
#endif /* PERL_IMPLICIT_CONTEXT */
/*
+=head1 Miscellaneous Functions
=for apidoc form
Takes a sprintf-style format pattern and conventional
#endif /* PERL_IMPLICIT_CONTEXT */
/*
+=head1 Warning and Dieing
+
=for apidoc croak
This is the XSUB-writer's interface to Perl's C<die> function.
(dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
/*
+=head1 Miscellaneous Functions
+
=for apidoc getcwd_sv
Fill the sv with current working directory
}
/*
+=head1 SV Manipulation Functions
+
=for apidoc new_vstring
Returns a pointer to the next character after the parsed