⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 perlapi.pod

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 POD
📖 第 1 页 / 共 5 页
字号:
X<toLOWER>Converts the specified character to lowercase.	char	toLOWER(char ch)=for hackersFound in file handy.h=item toUPPERX<toUPPER>Converts the specified character to uppercase.	char	toUPPER(char ch)=for hackersFound in file handy.h=back=head1 Cloning an interpreter=over 8=item perl_cloneX<perl_clone>Create and return a new interpreter by cloning the current one.perl_clone takes these flags as parameters:CLONEf_COPY_STACKS - is used to, well, copy the stacks also,without it we only clone the data and zero the stacks,with it we copy the stacks and the new perl interpreter isready to run at the exact same point as the previous one.The pseudo-fork code uses COPY_STACKS while thethreads->create doesn't.CLONEf_KEEP_PTR_TABLEperl_clone keeps a ptr_table with the pointer of the oldvariable as a key and the new variable as a value,this allows it to check if something has been cloned and notclone it again but rather just use the value and increase therefcount. If KEEP_PTR_TABLE is not set then perl_clone will killthe ptr_table using the functionC<ptr_table_free(PL_ptr_table); PL_ptr_table = NULL;>,reason to keep it around is if you want to dup some of your ownvariable who are outside the graph perl scans, example of thiscode is in threads.xs createCLONEf_CLONE_HOSTThis is a win32 thing, it is ignored on unix, it tells perlswin32host code (which is c++) to clone itself, this is needed onwin32 if you want to run two threads at the same time,if you just want to do some stuff in a separate perl interpreterand then throw it away and return to the original one,you don't need to do anything.	PerlInterpreter*	perl_clone(PerlInterpreter* interp, UV flags)=for hackersFound in file sv.c=back=head1 CV Manipulation Functions=over 8=item CvSTASHX<CvSTASH>Returns the stash of the CV.	HV*	CvSTASH(CV* cv)=for hackersFound in file cv.h=item get_cvX<get_cv>Uses C<strlen> to get the length of C<name>, then calls C<get_cvn_flags>.NOTE: the perl_ form of this function is deprecated.	CV*	get_cv(const char* name, I32 flags)=for hackersFound in file perl.c=item get_cvn_flagsX<get_cvn_flags>Returns the CV of the specified Perl subroutine.  C<flags> are passed toC<gv_fetchpvn_flags>. If C<GV_ADD> is set and the Perl subroutine does notexist then it will be declared (which has the same effect as sayingC<sub name;>).  If C<GV_ADD> is not set and the subroutine does not existthen NULL is returned.NOTE: the perl_ form of this function is deprecated.	CV*	get_cvn_flags(const char* name, STRLEN len, I32 flags)=for hackersFound in file perl.c=back=head1 Embedding Functions=over 8=item cv_undefX<cv_undef>Clear out all the active components of a CV. This can happen eitherby an explicit C<undef &foo>, or by the reference count going to zero.In the former case, we keep the CvOUTSIDE pointer, so that any anonymouschildren can still follow the full lexical scope chain.	void	cv_undef(CV* cv)=for hackersFound in file op.c=item load_moduleX<load_module>Loads the module whose name is pointed to by the string part of name.Note that the actual module name, not its filename, should be given.Eg, "Foo::Bar" instead of "Foo/Bar.pm".  flags can be any ofPERL_LOADMOD_DENY, PERL_LOADMOD_NOIMPORT, or PERL_LOADMOD_IMPORT_OPS(or 0 for no flags). ver, if specified, provides version semanticssimilar to C<use Foo::Bar VERSION>.  The optional trailing SV*arguments can be used to specify arguments to the module's import()method, similar to C<use Foo::Bar VERSION LIST>.	void	load_module(U32 flags, SV* name, SV* ver, ...)=for hackersFound in file op.c=item nothreadhookX<nothreadhook>Stub that provides thread hook for perl_destruct when there areno threads.	int	nothreadhook()=for hackersFound in file perl.c=item perl_allocX<perl_alloc>Allocates a new Perl interpreter.  See L<perlembed>.	PerlInterpreter*	perl_alloc()=for hackersFound in file perl.c=item perl_constructX<perl_construct>Initializes a new Perl interpreter.  See L<perlembed>.	void	perl_construct(PerlInterpreter* interp)=for hackersFound in file perl.c=item perl_destructX<perl_destruct>Shuts down a Perl interpreter.  See L<perlembed>.	int	perl_destruct(PerlInterpreter* interp)=for hackersFound in file perl.c=item perl_freeX<perl_free>Releases a Perl interpreter.  See L<perlembed>.	void	perl_free(PerlInterpreter* interp)=for hackersFound in file perl.c=item perl_parseX<perl_parse>Tells a Perl interpreter to parse a Perl script.  See L<perlembed>.	int	perl_parse(PerlInterpreter* interp, XSINIT_t xsinit, int argc, char** argv, char** env)=for hackersFound in file perl.c=item perl_runX<perl_run>Tells a Perl interpreter to run.  See L<perlembed>.	int	perl_run(PerlInterpreter* interp)=for hackersFound in file perl.c=item require_pvX<require_pv>Tells Perl to C<require> the file named by the string argument.  It isanalogous to the Perl code C<eval "require '$file'">.  It's evenimplemented that way; consider using load_module instead.NOTE: the perl_ form of this function is deprecated.	void	require_pv(const char* pv)=for hackersFound in file perl.c=back=head1 Functions in file dump.c=over 8=item pv_displayX<pv_display>  char *pv_display(SV *dsv, const char *pv, STRLEN cur, STRLEN len,                   STRLEN pvlim, U32 flags)Similar to  pv_escape(dsv,pv,cur,pvlim,PERL_PV_ESCAPE_QUOTE);except that an additional "\0" will be appended to the string whenlen > cur and pv[cur] is "\0".Note that the final string may be up to 7 chars longer than pvlim.	char*	pv_display(SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim)=for hackersFound in file dump.c=item pv_escapeX<pv_escape>               |const STRLEN count|const STRLEN max               |STRLEN const *escaped, const U32 flagsEscapes at most the first "count" chars of pv and puts the results intodsv such that the size of the escaped string will not exceed "max" charsand will not contain any incomplete escape sequences.If flags contains PERL_PV_ESCAPE_QUOTE then any double quotes in the stringwill also be escaped.Normally the SV will be cleared before the escaped string is prepared,but when PERL_PV_ESCAPE_NOCLEAR is set this will not occur.If PERL_PV_ESCAPE_UNI is set then the input string is treated as Unicode,if PERL_PV_ESCAPE_UNI_DETECT is set then the input string is scannedusing C<is_utf8_string()> to determine if it is Unicode.If PERL_PV_ESCAPE_ALL is set then all input chars will be outputusing C<\x01F1> style escapes, otherwise only chars above 255 will beescaped using this style, other non printable chars will use octal orcommon escaped patterns like C<\n>. If PERL_PV_ESCAPE_NOBACKSLASHthen all chars below 255 will be treated as printable and will be output as literals.If PERL_PV_ESCAPE_FIRSTCHAR is set then only the first char of thestring will be escaped, regardles of max. If the string is utf8 and the chars value is >255 then it will be returned as a plain hex sequence. Thus the output will either be a single char, an octal escape sequence, a special escape like C<\n> or a 3 or more digit hex value. If PERL_PV_ESCAPE_RE is set then the escape char used will be a '%' andnot a '\\'. This is because regexes very often contain backslashedsequences, whereas '%' is not a particularly common character in patterns.Returns a pointer to the escaped text as held by dsv.NOTE: the perl_ form of this function is deprecated.	char*	pv_escape(SV *dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags)=for hackersFound in file dump.c=item pv_prettyX<pv_pretty>           |const STRLEN count|const STRLEN max\           |const char const *start_color| const char const *end_color\           |const U32 flagsConverts a string into something presentable, handling escaping viapv_escape() and supporting quoting and ellipses.If the PERL_PV_PRETTY_QUOTE flag is set then the result will be double quoted with any double quotes in the string escaped. Otherwiseif the PERL_PV_PRETTY_LTGT flag is set then the result be wrapped inangle brackets.            If the PERL_PV_PRETTY_ELLIPSES flag is set and not all characters instring were output then an ellipsis C<...> will be appended to thestring. Note that this happens AFTER it has been quoted.           If start_color is non-null then it will be inserted after the openingquote (if there is one) but before the escaped text. If end_coloris non-null then it will be inserted after the escaped text but beforeany quotes or ellipses.Returns a pointer to the prettified text as held by dsv.           NOTE: the perl_ form of this function is deprecated.	char*	pv_pretty(SV *dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags)=for hackersFound in file dump.c=back=head1 Functions in file mathoms.c=over 8=item gv_fetchmethodX<gv_fetchmethod>See L<gv_fetchmethod_autoload>.	GV*	gv_fetchmethod(HV* stash, const char* name)=for hackersFound in file mathoms.c=item pack_catX<pack_cat>The engine implementing pack() Perl function. Note: parameters next_in_list andflags are not used. This call should not be used; use packlist instead.	void	pack_cat(SV *cat, const char *pat, const char *patend, SV **beglist, SV **endlist, SV ***next_in_list, U32 flags)=for hackersFound in file mathoms.c=item sv_2pvbyte_nolenX<sv_2pvbyte_nolen>Return a pointer to the byte-encoded representation of the SV.May cause the SV to be downgraded from UTF-8 as a side-effect.Usually accessed via the C<SvPVbyte_nolen> macro.	char*	sv_2pvbyte_nolen(SV* sv)=for hackersFound in file mathoms.c=item sv_2pvutf8_nolenX<sv_2pvutf8_nolen>Return a pointer to the UTF-8-encoded representation of the SV.May cause the SV to be upgraded to UTF-8 as a side-effect.Usually accessed via the C<SvPVutf8_nolen> macro.	char*	sv_2pvutf8_nolen(SV* sv)=for hackersFound in file mathoms.c=item sv_2pv_nolenX<sv_2pv_nolen>Like C<sv_2pv()>, but doesn't return the length too. You should usuallyuse the macro wrapper C<SvPV_nolen(sv)> instead.	char*	sv_2pv_nolen(SV* sv)=for hackersFound in file mathoms.c=item sv_catpvn_mgX<sv_catpvn_mg>Like C<sv_catpvn>, but also handles 'set' magic.	void	sv_catpvn_mg(SV *sv, const char *ptr, STRLEN len)=for hackersFound in file mathoms.c=item sv_catsv_mgX<sv_catsv_mg>Like C<sv_catsv>, but also handles 'set' magic.	void	sv_catsv_mg(SV *dstr, SV *sstr)=for hackersFound in file mathoms.c=item sv_force_normalX<sv_force_normal>Undo various types of fakery on an SV: if the PV is a shared string, makea private copy; if we're a ref, stop refing; if we're a glob, downgrade toan xpvmg. See also C<sv_force_normal_flags>.	void	sv_force_normal(SV *sv)=for hackersFound in file mathoms.c=item sv_ivX<sv_iv>A private implementation of the C<SvIVx> macro for compilers which can'tcope with complex macro expressions. Always use the macro instead.	IV	sv_iv(SV* sv)=for hackersFound in file mathoms.c=item sv_nolockingX<sv_nolocking>Dummy routine which "locks" an SV when there is no locking module present.Exists to avoid test for a NULL function pointer and because it couldpotentially warn under some level of strict-ness."Superseded" by sv_nosharing().	void	sv_nolocking(SV *sv)=for hackersFound in file mathoms.c=item sv_nounlockingX<sv_nounlocking>Dummy routine which "unlocks" an SV when there is no locking module present.Exists to avoid test for a NULL function pointer and because it couldpotentially warn under some level of strict-ness."Superseded" by sv_nosharing().	void	sv_nounlocking(SV *sv)=for hackersFound in file mathoms.c=item sv_nvX<sv_nv>A private implementation of the C<SvNVx> macro for compilers which can'tcope with complex macro expressions. Always use the macro instead.	NV	sv_nv(SV* sv)=for hackersFound in file mathoms.c=item sv_pvX<sv_pv>Use the C<SvPV_nolen> macro instead	char*	sv_pv(SV *sv)=for hackersFound in file mathoms.c=item sv_pvbyteX<sv_pvbyte>Use C<SvPVbyte_nolen> instead.	char*	sv_pvbyte(SV *sv)=for hackersFound in file mathoms.c=item sv_pvbytenX<sv_pvbyten>A private implementation of the C<SvPVbyte> macro for compilerswhich can't cope with complex macro expressions. Always use the macroinstead.	char*	sv_pvbyten(SV *sv, STRLEN *len)=for hackersFound in file mathoms.c=item sv_pvnX<sv_pvn>A private implementation of the C<SvPV> macro for compilers which can'tcope with complex macro expressions. Always use the macro instead.	char*	sv_pvn(SV *sv, STRLEN *len)=for hackersFound in file mathoms.c=item sv_pvutf8X<sv_pvutf8>Use the C<SvPVutf8_nolen> macro instead	char*	sv_pvutf8(SV *sv)=for hackersFound in file mathoms.c=item sv_pvutf8nX<sv_pvutf8n>A private implementation of the C<SvPVutf8> macro for compilerswhich can't cope with complex macro expressions. Always use the macroinstead.	char*	sv_pvutf8n(SV *sv, STRLEN *len)=for hackersFound in file mathoms.c=item sv_taintX<sv_taint>Taint an SV. Use C<SvTAINTED_on> instead.	void	sv_taint(SV* sv)=for hackersFound in file mathoms.c=item sv_unrefX<sv_unref>Unsets the RV status of the SV, and decrements the reference count ofwhatever was being referenced by the RV.  This can almost be thought ofas a reversal of C<newSVrv>.  This is C<sv_unref_flags> with the C<flag>being zero.  See C<SvROK_off>.	void	sv_unref(SV* sv)=for hackersFound in file mathoms.c

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -