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

📄 perlapi.1

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 1
📖 第 1 页 / 共 5 页
字号:
.Ve.IP "newAV" 8.IX Xref "newAV".IX Item "newAV"Creates a new \s-1AV\s0.  The reference count is set to 1..Sp.Vb 1\&        AV*     newAV().Ve.IP "sortsv" 8.IX Xref "sortsv".IX Item "sortsv"Sort an array. Here is an example:.Sp.Vb 1\&    sortsv(AvARRAY(av), av_len(av)+1, Perl_sv_cmp_locale);.Ve.SpCurrently this always uses mergesort. See sortsv_flags for a moreflexible routine..Sp.Vb 1\&        void    sortsv(SV** array, size_t num_elts, SVCOMPARE_t cmp).Ve.IP "sortsv_flags" 8.IX Xref "sortsv_flags".IX Item "sortsv_flags"Sort an array, with various options..Sp.Vb 1\&        void    sortsv_flags(SV** array, size_t num_elts, SVCOMPARE_t cmp, U32 flags).Ve.SH "Callback Functions".IX Header "Callback Functions".IP "call_argv" 8.IX Xref "call_argv".IX Item "call_argv"Performs a callback to the specified Perl sub.  See perlcall..Sp\&\s-1NOTE:\s0 the perl_ form of this function is deprecated..Sp.Vb 1\&        I32     call_argv(const char* sub_name, I32 flags, char** argv).Ve.IP "call_method" 8.IX Xref "call_method".IX Item "call_method"Performs a callback to the specified Perl method.  The blessed object mustbe on the stack.  See perlcall..Sp\&\s-1NOTE:\s0 the perl_ form of this function is deprecated..Sp.Vb 1\&        I32     call_method(const char* methname, I32 flags).Ve.IP "call_pv" 8.IX Xref "call_pv".IX Item "call_pv"Performs a callback to the specified Perl sub.  See perlcall..Sp\&\s-1NOTE:\s0 the perl_ form of this function is deprecated..Sp.Vb 1\&        I32     call_pv(const char* sub_name, I32 flags).Ve.IP "call_sv" 8.IX Xref "call_sv".IX Item "call_sv"Performs a callback to the Perl sub whose name is in the \s-1SV\s0.  Seeperlcall..Sp\&\s-1NOTE:\s0 the perl_ form of this function is deprecated..Sp.Vb 1\&        I32     call_sv(SV* sv, I32 flags).Ve.IP "\s-1ENTER\s0" 8.IX Xref "ENTER".IX Item "ENTER"Opening bracket on a callback.  See \f(CW\*(C`LEAVE\*(C'\fR and perlcall..Sp.Vb 1\&                ENTER;.Ve.IP "eval_pv" 8.IX Xref "eval_pv".IX Item "eval_pv"Tells Perl to \f(CW\*(C`eval\*(C'\fR the given string and return an SV* result..Sp\&\s-1NOTE:\s0 the perl_ form of this function is deprecated..Sp.Vb 1\&        SV*     eval_pv(const char* p, I32 croak_on_error).Ve.IP "eval_sv" 8.IX Xref "eval_sv".IX Item "eval_sv"Tells Perl to \f(CW\*(C`eval\*(C'\fR the string in the \s-1SV\s0..Sp\&\s-1NOTE:\s0 the perl_ form of this function is deprecated..Sp.Vb 1\&        I32     eval_sv(SV* sv, I32 flags).Ve.IP "\s-1FREETMPS\s0" 8.IX Xref "FREETMPS".IX Item "FREETMPS"Closing bracket for temporaries on a callback.  See \f(CW\*(C`SAVETMPS\*(C'\fR andperlcall..Sp.Vb 1\&                FREETMPS;.Ve.IP "\s-1LEAVE\s0" 8.IX Xref "LEAVE".IX Item "LEAVE"Closing bracket on a callback.  See \f(CW\*(C`ENTER\*(C'\fR and perlcall..Sp.Vb 1\&                LEAVE;.Ve.IP "\s-1SAVETMPS\s0" 8.IX Xref "SAVETMPS".IX Item "SAVETMPS"Opening bracket for temporaries on a callback.  See \f(CW\*(C`FREETMPS\*(C'\fR andperlcall..Sp.Vb 1\&                SAVETMPS;.Ve.SH "Character classes".IX Header "Character classes".IP "isALNUM" 8.IX Xref "isALNUM".IX Item "isALNUM"Returns a boolean indicating whether the C \f(CW\*(C`char\*(C'\fR is an \s-1ASCII\s0 alphanumericcharacter (including underscore) or digit..Sp.Vb 1\&        bool    isALNUM(char ch).Ve.IP "isALPHA" 8.IX Xref "isALPHA".IX Item "isALPHA"Returns a boolean indicating whether the C \f(CW\*(C`char\*(C'\fR is an \s-1ASCII\s0 alphabeticcharacter..Sp.Vb 1\&        bool    isALPHA(char ch).Ve.IP "isDIGIT" 8.IX Xref "isDIGIT".IX Item "isDIGIT"Returns a boolean indicating whether the C \f(CW\*(C`char\*(C'\fR is an \s-1ASCII\s0digit..Sp.Vb 1\&        bool    isDIGIT(char ch).Ve.IP "isLOWER" 8.IX Xref "isLOWER".IX Item "isLOWER"Returns a boolean indicating whether the C \f(CW\*(C`char\*(C'\fR is a lowercasecharacter..Sp.Vb 1\&        bool    isLOWER(char ch).Ve.IP "isSPACE" 8.IX Xref "isSPACE".IX Item "isSPACE"Returns a boolean indicating whether the C \f(CW\*(C`char\*(C'\fR is whitespace..Sp.Vb 1\&        bool    isSPACE(char ch).Ve.IP "isUPPER" 8.IX Xref "isUPPER".IX Item "isUPPER"Returns a boolean indicating whether the C \f(CW\*(C`char\*(C'\fR is an uppercasecharacter..Sp.Vb 1\&        bool    isUPPER(char ch).Ve.IP "toLOWER" 8.IX Xref "toLOWER".IX Item "toLOWER"Converts the specified character to lowercase..Sp.Vb 1\&        char    toLOWER(char ch).Ve.IP "toUPPER" 8.IX Xref "toUPPER".IX Item "toUPPER"Converts the specified character to uppercase..Sp.Vb 1\&        char    toUPPER(char ch).Ve.SH "Cloning an interpreter".IX Header "Cloning an interpreter".IP "perl_clone" 8.IX Xref "perl_clone".IX Item "perl_clone"Create and return a new interpreter by cloning the current one..Spperl_clone takes these flags as parameters:.SpCLONEf_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 \s-1COPY_STACKS\s0 while thethreads\->create doesn't..SpCLONEf_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 \s-1KEEP_PTR_TABLE\s0 is not set then perl_clone will killthe ptr_table using the function\&\f(CW\*(C`ptr_table_free(PL_ptr_table); PL_ptr_table = NULL;\*(C'\fR,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 create.SpCLONEf_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..Sp.Vb 1\&        PerlInterpreter*        perl_clone(PerlInterpreter* interp, UV flags).Ve.SH "CV Manipulation Functions".IX Header "CV Manipulation Functions".IP "CvSTASH" 8.IX Xref "CvSTASH".IX Item "CvSTASH"Returns the stash of the \s-1CV\s0..Sp.Vb 1\&        HV*     CvSTASH(CV* cv).Ve.IP "get_cv" 8.IX Xref "get_cv".IX Item "get_cv"Uses \f(CW\*(C`strlen\*(C'\fR to get the length of \f(CW\*(C`name\*(C'\fR, then calls \f(CW\*(C`get_cvn_flags\*(C'\fR..Sp\&\s-1NOTE:\s0 the perl_ form of this function is deprecated..Sp.Vb 1\&        CV*     get_cv(const char* name, I32 flags).Ve.IP "get_cvn_flags" 8.IX Xref "get_cvn_flags".IX Item "get_cvn_flags"Returns the \s-1CV\s0 of the specified Perl subroutine.  \f(CW\*(C`flags\*(C'\fR are passed to\&\f(CW\*(C`gv_fetchpvn_flags\*(C'\fR. If \f(CW\*(C`GV_ADD\*(C'\fR is set and the Perl subroutine does notexist then it will be declared (which has the same effect as saying\&\f(CW\*(C`sub name;\*(C'\fR).  If \f(CW\*(C`GV_ADD\*(C'\fR is not set and the subroutine does not existthen \s-1NULL\s0 is returned..Sp\&\s-1NOTE:\s0 the perl_ form of this function is deprecated..Sp.Vb 1\&        CV*     get_cvn_flags(const char* name, STRLEN len, I32 flags).Ve.SH "Embedding Functions".IX Header "Embedding Functions".IP "cv_undef" 8.IX Xref "cv_undef".IX Item "cv_undef"Clear out all the active components of a \s-1CV\s0. This can happen eitherby an explicit \f(CW\*(C`undef &foo\*(C'\fR, 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..Sp.Vb 1\&        void    cv_undef(CV* cv).Ve.IP "load_module" 8.IX Xref "load_module".IX Item "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, \*(L"Foo::Bar\*(R" instead of \*(L"Foo/Bar.pm\*(R".  flags can be any of\&\s-1PERL_LOADMOD_DENY\s0, \s-1PERL_LOADMOD_NOIMPORT\s0, or \s-1PERL_LOADMOD_IMPORT_OPS\s0(or 0 for no flags). ver, if specified, provides version semanticssimilar to \f(CW\*(C`use Foo::Bar VERSION\*(C'\fR.  The optional trailing SV*arguments can be used to specify arguments to the module's \fIimport()\fRmethod, similar to \f(CW\*(C`use Foo::Bar VERSION LIST\*(C'\fR..Sp.Vb 1\&        void    load_module(U32 flags, SV* name, SV* ver, ...).Ve.IP "nothreadhook" 8.IX Xref "nothreadhook".IX Item "nothreadhook"Stub that provides thread hook for perl_destruct when there areno threads..Sp.Vb 1\&        int     nothreadhook().Ve.IP "perl_alloc" 8.IX Xref "perl_alloc".IX Item "perl_alloc"Allocates a new Perl interpreter.  See perlembed..Sp.Vb 1\&        PerlInterpreter*        perl_alloc().Ve.IP "perl_construct" 8.IX Xref "perl_construct".IX Item "perl_construct"Initializes a new Perl interpreter.  See perlembed..Sp.Vb 1\&        void    perl_construct(PerlInterpreter* interp).Ve.IP "perl_destruct" 8.IX Xref "perl_destruct".IX Item "perl_destruct"Shuts down a Perl interpreter.  See perlembed..Sp.Vb 1\&        int     perl_destruct(PerlInterpreter* interp).Ve.IP "perl_free" 8.IX Xref "perl_free".IX Item "perl_free"Releases a Perl interpreter.  See perlembed..Sp.Vb 1\&        void    perl_free(PerlInterpreter* interp).Ve.IP "perl_parse" 8.IX Xref "perl_parse".IX Item "perl_parse"Tells a Perl interpreter to parse a Perl script.  See perlembed..Sp.Vb 1\&        int     perl_parse(PerlInterpreter* interp, XSINIT_t xsinit, int argc, char** argv, char** env).Ve.IP "perl_run" 8.IX Xref "perl_run".IX Item "perl_run"Tells a Perl interpreter to run.  See perlembed..Sp.Vb 1\&        int     perl_run(PerlInterpreter* interp).Ve.IP "require_pv" 8.IX Xref "require_pv".IX Item "require_pv"Tells Perl to \f(CW\*(C`require\*(C'\fR the file named by the string argument.  It isanalogous to the Perl code \f(CW\*(C`eval "require \*(Aq$file\*(Aq"\*(C'\fR.  It's evenimplemented that way; consider using load_module instead..Sp\&\s-1NOTE:\s0 the perl_ form of this function is deprecated..Sp.Vb 1\&        void    require_pv(const char* pv).Ve.SH "Functions in file dump.c".IX Header "Functions in file dump.c".IP "pv_display" 8.IX Xref "pv_display".IX Item "pv_display".Vb 2\&  char *pv_display(SV *dsv, const char *pv, STRLEN cur, STRLEN len,\&                   STRLEN pvlim, U32 flags).Ve.SpSimilar to.Sp.Vb 1\&  pv_escape(dsv,pv,cur,pvlim,PERL_PV_ESCAPE_QUOTE);.Ve.Spexcept that an additional \*(L"\e0\*(R" will be appended to the string whenlen > cur and pv[cur] is \*(L"\e0\*(R"..SpNote that the final string may be up to 7 chars longer than pvlim..Sp.Vb 1\&        char*   pv_display(SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim).Ve.IP "pv_escape" 8.IX Xref "pv_escape".IX Item "pv_escape".Vb 2\&               |const STRLEN count|const STRLEN max\&               |STRLEN const *escaped, const U32 flags

⌨️ 快捷键说明

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