=encoding euc-jp -*- buffer-read-only: t -*- !!!!!!! DO NOT EDIT THIS FILE !!!!!!! This file is built by autodoc.pl extracting documentation from the C source files. =head1 NAME =begin original perlapi - autogenerated documentation for the perl public API =end original perlapi - perl public API の自動生成ドキュメント =head1 DESCRIPTION X X X =begin original 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. L is a list of functions which have yet to be documented. The interfaces of those are subject to change without notice. Any functions not listed here are not part of the public API, and should not be used by extension writers at all. For these reasons, blindly using functions listed in proto.h is to be avoided when writing extensions. =end original このファイルは embed.pl で生成された perl の公式な API のドキュメントです; 特にエクステンションの作者が使うかもしれない関数、マクロ、フラグ、変数の 一覧です。 L<末尾|/Undocumented functions> はまだ文書化されていない関数の一覧です。 これらのインターフェースも予告なしに 変更されることがあります。 ここに挙げられていない関数は公式 API の一部ではなく、 エクステンションの作者は一切使うべきではありません。 これらの理由により、エクステンションを書くときに proto.h に挙げられている 関数を盲目的に使うことは避けるべきです。 =begin original Note that all Perl API global variables must be referenced with the C prefix. Some macros are provided for compatibility with the older, unadorned names, but this support may be disabled in a future release. =end original 全ての Perl API グローバル変数は C という接頭辞をつけて 参照しなければならないということに注意してください。 一部のマクロは以前のものとの互換性を確保していてはいますが、それは将来の リリースにおいては無効になるかもしれません。 =begin original Perl was originally written to handle US-ASCII only (that is characters whose ordinal numbers are in the range 0 - 127). And documentation and comments may still use the term ASCII, when sometimes in fact the entire range from 0 - 255 is meant. =end original Perl はもともとも US-ASCII (つまり番号が 0 - 127 の範囲の文字)のみを 扱うように書かれていました。 そして文書とコメントは、実際には 0 - 255 の範囲全体を意味しているときに、 未だに ASCII という用語を使っているかもしれません。 =begin original Note that Perl can be compiled and run under EBCDIC (See L) or ASCII. Most of the documentation (and even comments in the code) ignore the EBCDIC possibility. For almost all purposes the differences are transparent. As an example, under EBCDIC, instead of UTF-8, UTF-EBCDIC is used to encode Unicode strings, and so whenever this documentation refers to C (and variants of that name, including in function names), it also (essentially transparently) means C. But the ordinals of characters differ between ASCII, EBCDIC, and the UTF- encodings, and a string encoded in UTF-EBCDIC may occupy more bytes than in UTF-8. =end original Perl は EBCDIC (L 参照) または ASCII でコンパイルおよび 実行できます。 ほとんどの文書は(およびコードのコメントさえも) EBCDIC の可能性を 無視しています。 ほとんどあらゆる用途で違いは透過的です。 例えば、EBCDIC では、Unicode 文字列をエンコードするのに UTF-8 ではなく UTF-EBCDIC が使われ、この文書で C (および関数名を含むこの名前の 変形) を参照している場所ではどこでも C を意味します。 しかし文字の番号は ASCII, EBCDIC, UTF- エンコーディングで異なり、 UTF-EBCDIC でエンコードされた文字列は UTF-8 よりも多くのバイト数を 使うことがあります。 =begin original Also, on some EBCDIC machines, functions that are documented as operating on US-ASCII (or Basic Latin in Unicode terminology) may in fact operate on all 256 characters in the EBCDIC range, not just the subset corresponding to US-ASCII. =end original また、一部の EBCDIC マシンでは、US-ASCII (または Unicode の用語では Basic Latin) を操作すると文書化されている関数は実際には対応する US-ASCII の サブセットではなく、EBCDIC の範囲の 256 文字全てを操作することがあります。 =begin original The listing below is alphabetical, case insensitive. =end original 以下のリストは大文字小文字を無視したアルファベット順です。 =head1 "Gimme" Values (値を「ちょうだい」) =over 8 =item GIMME X =begin original A backward-compatible version of C which can only return C or C; in a void context, it returns C. Deprecated. Use C instead. =end original C か C しか返さないような C の、過去互換性の ためのものです; 無効コンテキストでは、これは C を返します。 廃止予定です。 代わりに C を使ってください。 U32 GIMME =for hackers Found in file op.h =item GIMME_V X =begin original The XSUB-writer's equivalent to Perl's C. Returns C, C or C for void, scalar or list context, respectively. See L for a usage example. =end original XSUB 作成者のための、Perl の C に透過なものです。 C、C、C をそれぞれ、無効コンテキスト、スカラ コンテキスト、リストコンテキストのときに返します。 使用例については L を参照してください。 U32 GIMME_V =for hackers Found in file op.h =item G_ARRAY X =begin original Used to indicate list context. See C, C and L. =end original リストコンテキストを示すために使われます。 C、C、L を参照してください。 =for hackers Found in file cop.h =item G_DISCARD X =begin original Indicates that arguments returned from a callback should be discarded. See L. =end original コールバックから返される引数が破棄されるべきものであることを示します。 L を参照してください。 =for hackers Found in file cop.h =item G_EVAL X =begin original Used to force a Perl C wrapper around a callback. See L. =end original コールバックを Perl の C で囲むのを強制するために使われます。 L を参照してください。 =for hackers Found in file cop.h =item G_NOARGS X =begin original Indicates that no arguments are being sent to a callback. See L. =end original コールバックに渡す引数がないことを示します。 L を参照してください。 =for hackers Found in file cop.h =item G_SCALAR X =begin original Used to indicate scalar context. See C, C, and L. =end original スカラコンテキストを示すのに使われます。 C, C, L を参照してください。 =for hackers Found in file cop.h =item G_VOID X =begin original Used to indicate void context. See C and L. =end original 無効コンテキストを示すために使われます。 C と L を参照してください。 =for hackers Found in file cop.h =back =head1 Array Manipulation Functions (配列操作関数) =over 8 =item AvFILL X =begin original Same as C. Deprecated, use C instead. =end original C と同様です。 廃止予定なので、代わりに C を使ってください。 int AvFILL(AV* av) =for hackers Found in file av.h =item av_clear X =begin original Clears an array, making it empty. Does not free the memory used by the array itself. Perl equivalent: C<@myarray = ();>. =end original 配列をクリアし、空にします。 配列自身が使っているメモリの解放はしません。 Perl での等価物: C<@myarray = ();>。 void av_clear(AV *av) =for hackers Found in file av.c =item av_create_and_push X =begin original Push an SV onto the end of the array, creating the array if necessary. A small internal helper function to remove a commonly duplicated idiom. =end original SV を配列の最後にプッシュします; もし必要なら配列を作ります。 一般的に複製された慣用句を削除するための小さい内部ヘルパーです。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 void av_create_and_push(AV **const avp, SV *const val) =for hackers Found in file av.c =item av_create_and_unshift_one X =begin original Unshifts an SV onto the beginning of the array, creating the array if necessary. A small internal helper function to remove a commonly duplicated idiom. =end original SV を配列の最初に unshift します; もし必要なら配列を作ります。 一般的に複製された慣用句を削除するための小さい内部ヘルパーです。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 SV** av_create_and_unshift_one(AV **const avp, SV *const val) =for hackers Found in file av.c =item av_delete X =begin original Deletes the element indexed by C from the array, makes the element mortal, and returns it. If C equals C, the element is freed and null is returned. Perl equivalent: C for the non-C version and a void-context C for the C version. =end original 配列から、添え字が C の要素を削除し、その要素を揮発性にして、返します。 もし C が C なら、要素は解放されて NULL が返されます。 Perl の等価物: C 版では C、 C 版では無効コンテキストでの C。 SV* av_delete(AV *av, I32 key, I32 flags) =for hackers Found in file av.c =item av_exists X =begin original Returns true if the element indexed by C has been initialized. =end original 添え字が C の要素が既に初期化されているなら真を返します。 =begin original This relies on the fact that uninitialized array elements are set to C<&PL_sv_undef>. =end original これは、初期化されていない配列要素は C<&PL_sv_undef> が セットされているという事実に依存しています。 bool av_exists(AV *av, I32 key) =for hackers Found in file av.c =item av_extend X =begin original Pre-extend an array. The C is the index to which the array should be extended. =end original 配列を事前拡張します。 C は、拡張された後の配列の添え字です。 void av_extend(AV *av, I32 key) =for hackers Found in file av.c =item av_fetch X =begin original Returns the SV at the specified index in the array. The C is the index. If lval is true, you are guaranteed to get a real SV back (in case it wasn't real before), which you can then modify. Check that the return value is non-null before dereferencing it to a C. =end original 配列中の指定された添え字にある SV を返します。 C は添え字です。 lval が真の場合、(以前は実物でなかった場合) 実物の SV が返されることが 保証されるので、後で変更できます。 戻り値の C に対して参照外しをする場合にそれがヌルでないかを チェックしてください。 =begin original See L for more information on how to use this function on tied arrays. =end original この関数をどのように tie されたハッシュに使うかに関するさらなる情報は L を 参照してください。 =begin original The rough perl equivalent is C<$myarray[$idx]>. =end original おおまかな perl の等価物は C<$myarray[$idx]> です。 SV** av_fetch(AV *av, I32 key, I32 lval) =for hackers Found in file av.c =item av_fill X =begin original Set the highest index in the array to the given number, equivalent to Perl's C<$#array = $fill;>. =end original 配列の最大の添え字を与えられた数値にセットします; Perl の C<$#array = $fill;> と等価です。 =begin original The number of elements in the an array will be C after av_fill() returns. If the array was previously shorter, then the additional elements appended are set to C. If the array was longer, then the excess elements are freed. C is the same as C. =end original av_fill() から返った後、配列の要素数は C になります。 配列が以前より短くなった場合は、追加された要素は C が セットされます。 配列がより長くなった場合は、超過した要素は解放されます。 C は C と同じです。 void av_fill(AV *av, I32 fill) =for hackers Found in file av.c =item av_len X =begin original Returns the highest index in the array. The number of elements in the array is C. Returns -1 if the array is empty. =end original 配列中で最大の添え字を返します。 配列の要素数は C です。 配列が空である場合には -1 を返します。 I32 av_len(AV *av) =for hackers Found in file av.c =item av_make X =begin original 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. =end original 新しい AV を生成して、SV のリストで埋めます。 その SV は配列へとコピーされるので、av_make を呼び出した後で 解放することもできます。 新たな AV はその参照カウントとして 1 を持ちます。 AV* av_make(I32 size, SV **strp) =for hackers Found in file av.c =item av_pop X =begin original Pops an SV off the end of the array. Returns C<&PL_sv_undef> if the array is empty. =end original 配列の最後にある SV をポップします。 配列が空の場合は C<&PL_sv_undef> を返します。 SV* av_pop(AV *av) =for hackers Found in file av.c =item av_push X =begin original Pushes an SV onto the end of the array. The array will grow automatically to accommodate the addition. This takes ownership of one reference count. =end original 配列の末尾に SV をプッシュします。 追加されたものにあわせて、配列は自動的に大きくなります。 一つの参照カウントの所有権を持ちます。 void av_push(AV *av, SV *val) =for hackers Found in file av.c =item av_shift X =begin original Shifts an SV off the beginning of the array. Returns C<&PL_sv_undef> if the array is empty. =end original 配列の先頭にある SV をシフトして取り出します。 配列が空の場合は C<&PL_sv_undef> を返します。 SV* av_shift(AV *av) =for hackers Found in file av.c =item av_store X =begin original Stores an SV in an array. The array index is specified as C. 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 C. Note that the caller is responsible for suitably incrementing the reference count of C before the call, and decrementing it if the function returned NULL. =end original SV を配列に格納します。 配列の添え字は C で指定します。 戻り値は操作が失敗したり、(tie されている配列の場合のように)値を実際に 配列に格納する必要がないような場合には NULL になります。 さもなければ、取得したオリジナルの C の参照外しをすることができます。 呼び出し側は、呼び出しの前に C の参照カウントを適切にインクリメントし、 関数が NULL を返した場合には参照カウントをデクリメントする責任が あるということに注意してください。 =begin original See L for more information on how to use this function on tied arrays. =end original この関数をどのように tie されたハッシュに使うかに関するさらなる情報は L を 参照してください。 SV** av_store(AV *av, I32 key, SV *val) =for hackers Found in file av.c =item av_undef X =begin original Undefines the array. Frees the memory used by the array itself. =end original 配列を undefine します。 配列自身が使っていたメモリーを解放します。 void av_undef(AV *av) =for hackers Found in file av.c =item av_unshift X =begin original Unshift the given number of C values onto the beginning of the array. The array will grow automatically to accommodate the addition. You must then use C to assign values to these new elements. =end original 配列の先頭に、与えられた数だけの C 値を unsfhit します。 追加されたものにあわせて、配列は自動的に大きくなります。 追加された新しい要素に対して値を代入するには、この後で C を 使わなければなりません。 void av_unshift(AV *av, I32 num) =for hackers Found in file av.c =item get_av X =begin original Returns the AV of the specified Perl array. C are passed to C. If C is set and the Perl variable does not exist then it will be created. If C is zero and the variable does not exist then NULL is returned. =end original 指定された Perl 配列の AV を返します。 C は C に渡されます。 C がセットされていて、指定された変数が存在していなければ、新たに 生成されます。 C がゼロで、かつ、指定された変数がなかった場合には NULL が返されます。 =begin original NOTE: the perl_ form of this function is deprecated. =end original 注意: この関数の perl_ の形は廃止予定です。 AV* get_av(const char *name, I32 flags) =for hackers Found in file perl.c =item newAV X =begin original Creates a new AV. The reference count is set to 1. =end original 新たな AV を生成します。 参照カウントは 1 に設定されます。 AV* newAV() =for hackers Found in file av.h =item sortsv X =begin original Sort an array. Here is an example: =end original 配列をソートします。 以下は例です: sortsv(AvARRAY(av), av_len(av)+1, Perl_sv_cmp_locale); =begin original Currently this always uses mergesort. See sortsv_flags for a more flexible routine. =end original 現在のところ、これは常にマージソートを使います。 さらに柔軟なルーチンのためには sortsv_flags を参照してください。 void sortsv(SV** array, size_t num_elts, SVCOMPARE_t cmp) =for hackers Found in file pp_sort.c =item sortsv_flags X =begin original Sort an array, with various options. =end original 様々なオプション付きで配列をソートします。 void sortsv_flags(SV** array, size_t num_elts, SVCOMPARE_t cmp, U32 flags) =for hackers Found in file pp_sort.c =back =head1 Callback Functions (コールバック関数) =over 8 =item call_argv X =begin original Performs a callback to the specified Perl sub. See L. =end original 指定された Perl サブルーチンに対するコールバックを呼び出します。 L を参照してください。 =begin original NOTE: the perl_ form of this function is deprecated. =end original 注意: この関数の perl_ の形は廃止予定です。 I32 call_argv(const char* sub_name, I32 flags, char** argv) =for hackers Found in file perl.c =item call_method X =begin original Performs a callback to the specified Perl method. The blessed object must be on the stack. See L. =end original 指定された Perl サブルーチンに対するコールバックを呼び出します。 bless されたオブジェクトがスタック上になければなりません。 L を参照してください。 =begin original NOTE: the perl_ form of this function is deprecated. =end original 注意: この関数の perl_ の形は廃止予定です。 I32 call_method(const char* methname, I32 flags) =for hackers Found in file perl.c =item call_pv X =begin original Performs a callback to the specified Perl sub. See L. =end original 指定された Perl サブルーチンに対するコールバックを呼び出します。 L を参照してください。 =begin original NOTE: the perl_ form of this function is deprecated. =end original 注意: この関数の perl_ の形は廃止予定です。 I32 call_pv(const char* sub_name, I32 flags) =for hackers Found in file perl.c =item call_sv X =begin original Performs a callback to the Perl sub whose name is in the SV. See L. =end original SV にある名前を持った Perl サブルーチンに対するコールバックを呼び出します。 L を参照してください。 =begin original NOTE: the perl_ form of this function is deprecated. =end original 注意: この関数の perl_ の形は廃止予定です。 I32 call_sv(SV* sv, VOL I32 flags) =for hackers Found in file perl.c =item ENTER X =begin original Opening bracket on a callback. See C and L. =end original コールバックにあるブラケットを開きます。 C と L を参照してください。 ENTER; =for hackers Found in file scope.h =item eval_pv X =begin original Tells Perl to C the given string and return an SV* result. =end original Perl に対して、与えられた文字列を C してその結果をSV* に返すように 指示します。 =begin original NOTE: the perl_ form of this function is deprecated. =end original 注意: この関数の perl_ の形は廃止予定です。 SV* eval_pv(const char* p, I32 croak_on_error) =for hackers Found in file perl.c =item eval_sv X =begin original Tells Perl to C the string in the SV. It supports the same flags as C, with the obvious exception of G_EVAL. See L. =end original Perl に対し、SV にある文字列を C するように指示します。 明らかな例外である G_EVAL を除いて、C と同じフラグに対応します。 L を参照してください。 =begin original NOTE: the perl_ form of this function is deprecated. =end original 注意: この関数の perl_ の形は廃止予定です。 I32 eval_sv(SV* sv, I32 flags) =for hackers Found in file perl.c =item FREETMPS X =begin original Closing bracket for temporaries on a callback. See C and L. =end original コールバックにある一時変数のためのブラケットを閉じます。 C と L を参照してください。 FREETMPS; =for hackers Found in file scope.h =item LEAVE X =begin original Closing bracket on a callback. See C and L. =end original コールバック上のブラケットを閉じます。 C と L を参照してください。 LEAVE; =for hackers Found in file scope.h =item SAVETMPS X =begin original Opening bracket for temporaries on a callback. See C and L. =end original コールバックにある一時変数のためにブラケットを開けます。 C と L を参照してください。 SAVETMPS; =for hackers Found in file scope.h =back =head1 Character case changing (大文字小文字変換) =item toLOWER X =begin original Converts the specified character to lowercase in the platform's native character set, if possible; otherwise returns the input character itself. =end original 可能なら、指定された文字をプラットフォームのネイティブな文字集合の 小文字に変換します; さもなければ、入力文字自身を返します。 char toLOWER(char ch) =for hackers Found in file handy.h =item toUPPER X =begin original Converts the specified character to uppercase in the platform's native character set, if possible; otherwise returns the input character itself. =end original 可能なら、指定された文字をプラットフォームのネイティブな文字集合の 大文字に変換します; さもなければ、入力文字自身を返します。 char toUPPER(char ch) =for hackers Found in file handy.h =head1 Character classes (文字クラス) =over 8 =item isALPHA X =begin original Returns a boolean indicating whether the specified character is an alphabetic character in the platform's native character set. See the L for an explanation of variants C and C. =end original 指定された文字がプラットフォームのネイティブな文字集合で 英文字であるかどうかを表わす真偽値を返します。 亜種の C と C に関する説明は L<この節の先頭|/Character classes> を参照してください。 bool isALPHA(char ch) =for hackers Found in file handy.h =item isDIGIT X =begin original Returns a boolean indicating whether the specified character is a digit in the platform's native character set. Variants C and C are identical to C. =end original 指定された文字がプラットフォームのネイティブな文字集合で 数字であるかどうかを表わす真偽値を返します。 亜種の C と C は C と同じです。 bool isDIGIT(char ch) =for hackers Found in file handy.h =item isLOWER X =begin original Returns a boolean indicating whether the specified character is a lowercase character in the platform's native character set. See the L for an explanation of variants C and C. =end original 指定された文字がプラットフォームのネイティブな文字集合で 小文字であるかどうかを表わす真偽値を返します。 亜種の C と C に関する説明は L<この節の先頭|/Character classes> を参照してください。 bool isLOWER(char ch) =for hackers Found in file handy.h =item isSPACE X =begin original Returns a boolean indicating whether the specified character is a whitespace character in the platform's native character set. This is the same as what C<\s> matches in a regular expression. See the L for an explanation of variants C and C. =end original 指定された文字がプラットフォームのネイティブな文字集合で 空白文字であるかどうかを表わす真偽値を返します。 亜種の C と C に関する説明は L<この節の先頭|/Character classes> を参照してください。 bool isSPACE(char ch) =for hackers Found in file handy.h =item isUPPER X =begin original Returns a boolean indicating whether the specified character is an uppercase character in the platform's native character set. See the L for an explanation of variants C and C. =end original 指定された文字がプラットフォームのネイティブな文字集合で 小文字であるかどうかを表わす真偽値を返します。 亜種の C と C に関する説明は L<この節の先頭|/Character classes> を参照してください。 bool isUPPER(char ch) =for hackers Found in file handy.h =back =head1 Cloning an interpreter (インタプリタのクローン化) =over 8 =item perl_clone X =begin original Create and return a new interpreter by cloning the current one. =end original 現在のものをクローン化することによって新しいインタプリタを作成し、 それを返します。 =begin original perl_clone takes these flags as parameters: =end original perl_clone は以下のフラグを引数として受け取ります: =begin original 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 is ready to run at the exact same point as the previous one. The pseudo-fork code uses COPY_STACKS while the threads->create doesn't. =end original CLONEf_COPY_STACKS - これは、つまり、スタックもコピーするために使います; これがない場合、データのみをクローンし、スタックはしません; これがある場合、スタックをコピーして、新しいインタプリタは以前のものと まったく同じ位置から実行する準備が出来ています。 疑似 fork コードは COPY_STACKS を使いますが、threads->create は使いません。 =begin original CLONEf_KEEP_PTR_TABLE perl_clone keeps a ptr_table with the pointer of the old variable as a key and the new variable as a value, this allows it to check if something has been cloned and not clone it again but rather just use the value and increase the refcount. If KEEP_PTR_TABLE is not set then perl_clone will kill the ptr_table using the function C, reason to keep it around is if you want to dup some of your own variable who are outside the graph perl scans, example of this code is in threads.xs create =end original CLONEf_KEEP_PTR_TABLE perl_clone は、古い変数へのポインタをキーとして、新しい変数を値として ptr_table を保持します; これにより、何かがクローンされて、再び クローンされないけれども単に値を使って参照カウントを増やしているかを チェックできるようにします。 KEEP_PTR_TABLE がセットされていないと、perl_clone は C を使って ptr_table を削除します; これを保持し続ける理由は、図示する perl が スキャンする外側の変数の一部を複製したい場合; このコードの例は threads.xs create にあります。 =begin original CLONEf_CLONE_HOST This is a win32 thing, it is ignored on unix, it tells perls win32host code (which is c++) to clone itself, this is needed on win32 if you want to run two threads at the same time, if you just want to do some stuff in a separate perl interpreter and then throw it away and return to the original one, you don't need to do anything. =end original CLONEf_CLONE_HOST これは win32 のもので、unix では無視されます; perl に、自身を クローンするのに(c++ である)win32host コードを知らせます; これは、 二つのスレッドを同時に実行したいなら、win32 で必要です; 単に何かを別々の perl インタプリタで実行したいなら、これは捨てて元のものを返します; 何もする 必要はありません。 PerlInterpreter* perl_clone(PerlInterpreter *proto_perl, UV flags) =for hackers Found in file sv.c =back =head1 CV Manipulation Functions (CV 操作関数) =over 8 =item CvSTASH X =begin original Returns the stash of the CV. =end original CV のスタッシュを返します。 HV* CvSTASH(CV* cv) =for hackers Found in file cv.h =item get_cv X =begin original Uses C to get the length of C, then calls C. =end original C の長さを得るために C を使い、それから C を 呼び出します。 =begin original NOTE: the perl_ form of this function is deprecated. =end original 注意: この関数の perl_ の形は廃止予定です。 CV* get_cv(const char* name, I32 flags) =for hackers Found in file perl.c =item get_cvn_flags X =begin original Returns the CV of the specified Perl subroutine. C are passed to C. If C is set and the Perl subroutine does not exist then it will be declared (which has the same effect as saying C). If C is not set and the subroutine does not exist then NULL is returned. =end original 指定された Perl サブルーチンの CV を返します。 C は C に渡されます。 C がセットされ、Perl サブルーチンが存在しない場合は、これが 宣言されます(これは C と同じ効果です)。 C がセットされず、Perl サブルーチンが存在しない場合は、NULL が 返されます。 =begin original NOTE: the perl_ form of this function is deprecated. =end original 注意: この関数の perl_ の形は廃止予定です。 CV* get_cvn_flags(const char* name, STRLEN len, I32 flags) =for hackers Found in file perl.c =back =head1 Embedding Functions (組み込み関数) =over 8 =item cv_undef X =begin original Clear out all the active components of a CV. This can happen either by an explicit C, or by the reference count going to zero. In the former case, we keep the CvOUTSIDE pointer, so that any anonymous children can still follow the full lexical scope chain. =end original CV の全ての有効な要素を片付けます。 これは明示的な C によってか、参照カウントが 0 になることによって 起こります。 前者の場合、CvOUTSIDE ポインタは維持するので、全ての無名の子は完全な レキシカルスコープチェーンに従ったままです。 void cv_undef(CV* cv) =for hackers Found in file pad.c =item load_module X =begin original 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 of PERL_LOADMOD_DENY, PERL_LOADMOD_NOIMPORT, or PERL_LOADMOD_IMPORT_OPS (or 0 for no flags). ver, if specified, provides version semantics similar to C. The optional trailing SV* arguments can be used to specify arguments to the module's import() method, similar to C. They must be terminated with a final NULL pointer. Note that this list can only be omitted when the PERL_LOADMOD_NOIMPORT flag has been used. Otherwise at least a single NULL pointer to designate the default import list is required. =end original name の文字列部で示された名前のモジュールを読み込みます。 ファイル名ではなく実際のモジュール名を指定することに注意してください。 つまり、"Foo/Bar.pm" ではなく "Foo::Bar" です。 flags は PERL_LOADMOD_DENY, PERL_LOADMOD_NOIMPORT, PERL_LOADMOD_IMPORT_OPS の いずれか(あるいはフラグなしなら 0)です。 ver が指定されると、C と同様のバージョン意味論を 提供します。 オプションで引き続く SV* 引数は、C と同様に、 モジュールの import() メソッドへの引数を指定するために使われます。 これらは最後の NULL ポインタで終端されていなければなりません。 このリストは PERL_LOADMOD_NOIMPORT フラグが使われている場合にのみ 省略できます。 さもなければ少なくともデフォルトインポートリストを指定するための単一の NULL ポインタが必要です。 void load_module(U32 flags, SV* name, SV* ver, ...) =for hackers Found in file op.c =item nothreadhook X =begin original Stub that provides thread hook for perl_destruct when there are no threads. =end original スレッドがないときの perl_destruct のためのスレッドフックを提供する スタブです。 int nothreadhook() =for hackers Found in file perl.c =item pad_findmy X =begin original Given a lexical name, try to find its offset, first in the current pad, or failing that, in the pads of any lexically enclosing subs (including the complications introduced by eval). If the name is found in an outer pad, then a fake entry is added to the current pad. Returns the offset in the current pad, or NOT_IN_PAD on failure. =end original レキシカル名が与えられたら、まず現在のパッドでオフセットを見つけようとします; それに失敗すると、レキシカルに囲まれたサブルーチン(eval によって導入された 複雑なものを含む)のパッドで見つけようとします。 外側のパッドで名前が見つかった場合、にせのエントリが現在のパッドに 追加されます。 現在のパッドのオフセットを返します; 失敗した場合は NOT_IN_PAD を返します。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 PADOFFSET pad_findmy(const char* name, STRLEN len, U32 flags) =for hackers Found in file pad.c =item pad_sv X =begin original Get the value at offset po in the current pad. Use macro PAD_SV instead of calling this function directly. =end original 現在のパッドのオフセット po の値を返します。 この関数を直接呼び出さずにマクロ PAD_SV を使ってください。 SV* pad_sv(PADOFFSET po) =for hackers Found in file pad.c =item perl_alloc X =begin original Allocates a new Perl interpreter. See L. =end original 新たなPerl インタプリタを割り付けます。 L を参照してください。 PerlInterpreter* perl_alloc() =for hackers Found in file perl.c =item perl_construct X =begin original Initializes a new Perl interpreter. See L. =end original 新しいPerl インタプリタの初期化を行います。 L を参照してください。 void perl_construct(PerlInterpreter *my_perl) =for hackers Found in file perl.c =item perl_destruct X =begin original Shuts down a Perl interpreter. See L. =end original Perl インタプリタをシャットダウンします。 L を参照してください。 int perl_destruct(PerlInterpreter *my_perl) =for hackers Found in file perl.c =item perl_free X =begin original Releases a Perl interpreter. See L. =end original Perl インタプリタを解放します。 L を参照してください。 void perl_free(PerlInterpreter *my_perl) =for hackers Found in file perl.c =item perl_parse X =begin original Tells a Perl interpreter to parse a Perl script. See L. =end original Perl インタプリタに Perl スクリプトを解析するよう指示します。 L を参照してください。 int perl_parse(PerlInterpreter *my_perl, XSINIT_t xsinit, int argc, char** argv, char** env) =for hackers Found in file perl.c =item perl_run X =begin original Tells a Perl interpreter to run. See L. =end original Perl インタプリタに実行するよう指示します。 L を参照してください。 int perl_run(PerlInterpreter *my_perl) =for hackers Found in file perl.c =item require_pv X =begin original Tells Perl to C the file named by the string argument. It is analogous to the Perl code C. It's even implemented that way; consider using load_module instead. =end original 文字列引数の名前のファイルを C するように Perl に伝えます。 Perl コード C に類似しています。 実際このように実装されています; 代わりに load_module を使うことを 考慮してください。 =begin original NOTE: the perl_ form of this function is deprecated. =end original 注意: この関数の perl_ の形は廃止予定です。 void require_pv(const char* pv) =for hackers Found in file perl.c =back =head1 Functions in file dump.c (ファイル dump.c の関数) =over 8 =item pv_display X =begin original Similar to =end original 以下と似ています: pv_escape(dsv,pv,cur,pvlim,PERL_PV_ESCAPE_QUOTE); =begin original except that an additional "\0" will be appended to the string when len > cur and pv[cur] is "\0". =end original は、len > cur で pv[cur] が "\0" なら、文字列に追加の "\0" が 追加されることを想定します。 =begin original Note that the final string may be up to 7 chars longer than pvlim. =end original 最終的な文字列は pvlim より最大 7 文字長くなる可能性があることに 注意してください。 char* pv_display(SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim) =for hackers Found in file dump.c =item pv_escape X =begin original Escapes at most the first "count" chars of pv and puts the results into dsv such that the size of the escaped string will not exceed "max" chars and will not contain any incomplete escape sequences. =end original 多くても pv の最初の "count" 文字をエスケープして、エスケープされた文字列の サイズは "max" は "max" 文字を超えず、不完全なエスケープシーケンスが 含まれないような結果を dsv に入れます。 =begin original If flags contains PERL_PV_ESCAPE_QUOTE then any double quotes in the string will also be escaped. =end original flags に PERL_PV_ESCAPE_QUOTE が含まれているなら、文字列中のダブルクォートも エスケープされます。 =begin original Normally the SV will be cleared before the escaped string is prepared, but when PERL_PV_ESCAPE_NOCLEAR is set this will not occur. =end original 通常は SV はエスケープされた文字列が準備される前にクリアされますが、 PERL_PV_ESCAPE_NOCLEAR がセットされているとこれは起こりません。 =begin original 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 scanned using C to determine if it is Unicode. =end original PERL_PV_ESCAPE_UNI がセットされているなら入力文字列は Unicode として 扱われます; PERL_PV_ESCAPE_UNI_DETECT がセットされているなら入力文字列は Unicode かどうか 決定するために C を使ってスキャンされます。 =begin original If PERL_PV_ESCAPE_ALL is set then all input chars will be output using C<\x01F1> style escapes, otherwise if PERL_PV_ESCAPE_NONASCII is set, only chars above 127 will be escaped using this style; otherwise, only chars above 255 will be so escaped; other non printable chars will use octal or common escaped patterns like C<\n>. Otherwise, if PERL_PV_ESCAPE_NOBACKSLASH then all chars below 255 will be treated as printable and will be output as literals. =end original PERL_PV_ESCAPE_ALL がセットされていると、全ての入力文字は C<\x01F1> 形式の エスケープを使って出力され、 PERL_PV_ESCAPE_NONASCII が設定されていれば、 127 を超える文字のみがこの形式でエスケープされます; さもなければ 255 を超える文字のみがこの形式でエスケープされます; その他の表示できない文字は 8 進数か C<\n> のような一般的な エスケープパターンを使います。 さもなければ、PERL_PV_ESCAPE_NOBACKSLASH なら、255 以下の全ての文字は 表示可能として扱われてリテラルとして出力されます。 =begin original If PERL_PV_ESCAPE_FIRSTCHAR is set then only the first char of the string will be escaped, regardless of max. If the output is to be in hex, 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 hex value. =end original PERL_PV_ESCAPE_FIRSTCHAR がセットされると、max に関わらず文字列の最初の 文字だけがエスケープされます。 文字列が 16 進であるなら、普通の 16 進シーケンスとして 返されます。 従って出力は単一の文字、8 進エスケープシーケンス、C<\n> のような 特殊エスケープ、16 進数のいずれかです。 =begin original If PERL_PV_ESCAPE_RE is set then the escape char used will be a '%' and not a '\\'. This is because regexes very often contain backslashed sequences, whereas '%' is not a particularly common character in patterns. =end original PERL_PV_ESCAPE_RE が設定されると、使われるエスケープ文字は '\\' ではなく '%' になります。 これは正規表現がとてもしばしばバックスラッシュ並びを含んでいて、一方 '%' は パターン中で特に一般的な文字というわけではないからです。 =begin original Returns a pointer to the escaped text as held by dsv. =end original dsv によって保持されている、エスケープされたテキストへのポインタを返します。 char* pv_escape(SV *dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags) =for hackers Found in file dump.c =item pv_pretty X =begin original Converts a string into something presentable, handling escaping via pv_escape() and supporting quoting and ellipses. =end original 文字列を何か表現可能なものに変換します; pv_escape() によるエスケープを扱い、 クォートと省略に対応しています。 =begin original If the PERL_PV_PRETTY_QUOTE flag is set then the result will be double quoted with any double quotes in the string escaped. Otherwise if the PERL_PV_PRETTY_LTGT flag is set then the result be wrapped in angle brackets. =end original PERL_PV_PRETTY_QUOTE フラグがセットされると、文字列中のダブルクォートが エスケープされて、全体がダブルクォートで囲まれます。 さもなければ、PERL_PV_PRETTY_LTGT がセットされていれば結果は山かっこで 囲まれます。 =begin original If the PERL_PV_PRETTY_ELLIPSES flag is set and not all characters in string were output then an ellipsis C<...> will be appended to the string. Note that this happens AFTER it has been quoted. =end original PERL_PV_PRETTY_ELLIPSES がセットされて、文字列中の全ての文字が 出力されないときは、省略記号 C<...> が文字列に追加されます。 これはクォートされた「後」に起きることに注意してください。 =begin original If start_color is non-null then it will be inserted after the opening quote (if there is one) but before the escaped text. If end_color is non-null then it will be inserted after the escaped text but before any quotes or ellipses. =end original start_color が非 NULL なら、(もしあれば) 開きクォートの後、エスケープされた テキストの前に挿入されます。 end_color が非 NULL なら、エスケープされたテキストの後、クォートや 省略記号の前に挿入されます。 =begin original Returns a pointer to the prettified text as held by dsv. =end original dsv によって保持されている、飾り付けられたテキストへのポインタを返します。 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 hackers Found in file dump.c =back =head1 Functions in file mathoms.c (ファイル mathoms.c の関数) =over 8 =item gv_fetchmethod X =begin original See L. =end original L を参照してください。 GV* gv_fetchmethod(HV* stash, const char* name) =for hackers Found in file mathoms.c =item pack_cat X =begin original The engine implementing pack() Perl function. Note: parameters next_in_list and flags are not used. This call should not be used; use packlist instead. =end original Perl 関数 pack() を実装しているエンジンです。 注意: 引数 next_in_list と flags は使われません。 この呼び出しは使うべきではなりません; 代わりに packlist を使ってください。 void pack_cat(SV *cat, const char *pat, const char *patend, SV **beglist, SV **endlist, SV ***next_in_list, U32 flags) =for hackers Found in file mathoms.c =item sv_2pvbyte_nolen X =begin original 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. =end original SV のバイトエンコードされた表現へのポインタを返します。 副作用として、SV が UTF-8 から降格するかもしれません。 =begin original Usually accessed via the C macro. =end original 通常は C マクロ経由でアクセスします。 char* sv_2pvbyte_nolen(SV* sv) =for hackers Found in file mathoms.c =item sv_2pvutf8_nolen X =begin original 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. =end original SV の UTF-8 エンコードされた表現へのポインタを返します。 副作用として、SV が UTF-8 へ昇格するかもしれません。 =begin original Usually accessed via the C macro. =end original 通常は C マクロ経由でアクセスします。 char* sv_2pvutf8_nolen(SV* sv) =for hackers Found in file mathoms.c =item sv_2pv_nolen X =begin original Like C, but doesn't return the length too. You should usually use the macro wrapper C instead. char* sv_2pv_nolen(SV* sv) =end original C と同様ですが、長さも返しません。 普通は代わりにマクロラッパー C を使うべきです。 char* sv_2pv_nolen(SV* sv) =for hackers Found in file mathoms.c =item sv_catpvn_mg X =begin original Like C, but also handles 'set' magic. =end original C に似ていますが、'set' magic もハンドルします。 void sv_catpvn_mg(SV *sv, const char *ptr, STRLEN len) =for hackers Found in file mathoms.c =item sv_catsv_mg X =begin original Like C, but also handles 'set' magic. =end original C に似ていますが、'set' magic もハンドルします。 void sv_catsv_mg(SV *dsv, SV *ssv) =for hackers Found in file mathoms.c =item sv_force_normal X =begin original Undo various types of fakery on an SV: if the PV is a shared string, make a private copy; if we're a ref, stop refing; if we're a glob, downgrade to an xpvmg. See also C. =end original SV への様々な種類のごまかしを巻き戻します; PV が共有文字列なら、 プライベートなコピーを作ります; リファレンスなら、リファレンスを止めます; グロブなら、xpvmg に降格します。 C も参照してください。 void sv_force_normal(SV *sv) =for hackers Found in file mathoms.c =item sv_iv X =begin original A private implementation of the C macro for compilers which can't cope with complex macro expressions. Always use the macro instead. =end original 複雑なマクロ式を扱えないコンパイラのための、C マクロの プライベート実装です。 代わりに、常にマクロを使ってください。 IV sv_iv(SV* sv) =for hackers Found in file mathoms.c =item sv_nolocking X =begin original 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 could potentially warn under some level of strict-ness. =end original ロックモジュールがないときに SV を「ロックする」ダミールーチンです。 NULL 関数をテストして、あるレベルでの strict での潜在的な警告を 回避するために存在します。 =begin original "Superseded" by sv_nosharing(). =end original sv_nosharing() で「置き換え」られました。 void sv_nolocking(SV *sv) =for hackers Found in file mathoms.c =item sv_nounlocking X =begin original 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 could potentially warn under some level of strict-ness. =end original ロックモジュールがないときに SV を「アンロックする」ダミールーチンです。 NULL 関数をテストして、あるレベルでの strict での潜在的な警告を 回避するために存在します。 =begin original "Superseded" by sv_nosharing(). =end original sv_nosharing() で「置き換え」られました。 void sv_nounlocking(SV *sv) =for hackers Found in file mathoms.c =item sv_nv X =begin original A private implementation of the C macro for compilers which can't cope with complex macro expressions. Always use the macro instead. =end original 複雑なマクロ式を扱えないコンパイラのための、C マクロの プライベート実装です。 代わりに、常にマクロを使ってください。 NV sv_nv(SV* sv) =for hackers Found in file mathoms.c =item sv_pv X =begin original Use the C macro instead =end original 代わりに C マクロを使ってください。 char* sv_pv(SV *sv) =for hackers Found in file mathoms.c =item sv_pvbyte X =begin original Use C instead. =end original 代わりに C マクロを使ってください。 char* sv_pvbyte(SV *sv) =for hackers Found in file mathoms.c =item sv_pvbyten X =begin original A private implementation of the C macro for compilers which can't cope with complex macro expressions. Always use the macro instead. =end original 複雑なマクロ式を扱えないコンパイラのための、C マクロの プライベート実装です。 代わりに、常にマクロを使ってください。 char* sv_pvbyten(SV *sv, STRLEN *lp) =for hackers Found in file mathoms.c =item sv_pvn X =begin original A private implementation of the C macro for compilers which can't cope with complex macro expressions. Always use the macro instead. =end original 複雑なマクロ式を扱えないコンパイラのための、C マクロの プライベート実装です。 代わりに、常にマクロを使ってください。 char* sv_pvn(SV *sv, STRLEN *lp) =for hackers Found in file mathoms.c =item sv_pvutf8 X =begin original Use the C macro instead =end original 代わりに C マクロを使ってください。 char* sv_pvutf8(SV *sv) =for hackers Found in file mathoms.c =item sv_pvutf8n X =begin original A private implementation of the C macro for compilers which can't cope with complex macro expressions. Always use the macro instead. =end original 複雑なマクロ式を扱えないコンパイラのための、C マクロの プライベート実装です。 代わりに、常にマクロを使ってください。 char* sv_pvutf8n(SV *sv, STRLEN *lp) =for hackers Found in file mathoms.c =item sv_taint X =begin original Taint an SV. Use C instead. void sv_taint(SV* sv) =end original SV を汚染します。 代わりに C を使ってください。 void sv_taint(SV* sv) =for hackers Found in file mathoms.c =item sv_unref X =begin original 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 C. This is C with the C being zero. See C. =end original SV の RV ステータスをアンセットし、RV によって参照されているものの 参照カウントを減じます。 これは C の反転したものであると考えられます。 これは、C がゼロのときの C です。 C を参照してください。 void sv_unref(SV* sv) =for hackers Found in file mathoms.c =item sv_usepvn X =begin original Tells an SV to use C to find its string value. Implemented by calling C with C of 0, hence does not handle 'set' magic. See C. =end original 自身の文字列値を得るのに C を使うように SV に指示します。 C を 0 にして C を呼び出すことで実装されているので、 'set' magic をハンドルしません。 C を参照してください。 void sv_usepvn(SV* sv, char* ptr, STRLEN len) =for hackers Found in file mathoms.c =item sv_usepvn_mg X =begin original Like C, but also handles 'set' magic. =end original C に似ていますが、'set' magic をハンドルします。 void sv_usepvn_mg(SV *sv, char *ptr, STRLEN len) =for hackers Found in file mathoms.c =item sv_uv X =begin original A private implementation of the C macro for compilers which can't cope with complex macro expressions. Always use the macro instead. =end original 複雑なマクロ式を扱えないコンパイラのための、C マクロの プライベート実装です。 代わりに、常にマクロを使ってください。 UV sv_uv(SV* sv) =for hackers Found in file mathoms.c =item unpack_str X =begin original The engine implementing unpack() Perl function. Note: parameters strbeg, new_s and ocnt are not used. This call should not be used, use unpackstring instead. =end original Perl 関数 unpack() を実装しているエンジンです。 注意: 引数 strbeg, new_s, ocnt は使われません。 この呼び出しは使うべきではなりません; 代わりに unpackstring を 使ってください。 I32 unpack_str(const char *pat, const char *patend, const char *s, const char *strbeg, const char *strend, char **new_s, I32 ocnt, U32 flags) =for hackers Found in file mathoms.c =back =head1 Functions in file perl.h (ファイル perl.h の関数) =over 8 =item PERL_SYS_INIT X =begin original Provides system-specific tune up of the C runtime environment necessary to run Perl interpreters. This should be called only once, before creating any Perl interpreters. =end original Perl インタプリタを実行するのに必要な C ランタイム環境のシステム固有の 調整を提供します。 これは一度だけ、Perl インタプリタが作成される前に呼び出されるべきです。 void PERL_SYS_INIT(int argc, char** argv) =for hackers Found in file perl.h =item PERL_SYS_INIT3 X =begin original Provides system-specific tune up of the C runtime environment necessary to run Perl interpreters. This should be called only once, before creating any Perl interpreters. =end original Perl インタプリタを実行するのに必要な C ランタイム環境のシステム固有の 調整を提供します。 これは一度だけ、Perl インタプリタが作成される前に呼び出されるべきです。 void PERL_SYS_INIT3(int argc, char** argv, char** env) =for hackers Found in file perl.h =item PERL_SYS_TERM X =begin original Provides system-specific clean up of the C runtime environment after running Perl interpreters. This should be called only once, after freeing any remaining Perl interpreters. =end original Perl インタプリタを実行するのに必要な C ランタイム環境のシステム固有の 調整を提供します。 これは一度だけ、Perl インタプリタが作成される前に呼び出されるべきです。 void PERL_SYS_TERM() =for hackers Found in file perl.h =back =head1 Functions in file pp_ctl.c (ファイル pp_ctl.c の関数) =over 8 =item find_runcv X =begin original Locate the CV corresponding to the currently executing sub or eval. If db_seqp is non_null, skip CVs that are in the DB package and populate *db_seqp with the cop sequence number at the point that the DB:: code was entered. (allows debuggers to eval in the scope of the breakpoint rather than in the scope of the debugger itself). =end original 現在実行しているサブルーチンや eval に対応する CV の場所を調べます。 db_seqp が非 null なら、DB パッケージの CV は飛ばして、 *db_seqp を、DB:: コードが入った時点での cop シーケンス番号にします。 (デバッガが、デバッガ自身のスコープではなく、ブレークポイントのスコープで eval できるようにします)。 CV* find_runcv(U32 *db_seqp) =for hackers Found in file pp_ctl.c =back =head1 Functions in file pp_pack.c (ファイル pp_pack.c の関数) =over 8 =item packlist X =begin original The engine implementing pack() Perl function. =end original Perl 関数 pack() を実装しているエンジンです。 void packlist(SV *cat, const char *pat, const char *patend, SV **beglist, SV **endlist) =for hackers Found in file pp_pack.c =item unpackstring X =begin original The engine implementing unpack() Perl function. C puts the extracted list items on the stack and returns the number of elements. Issue C before and C after the call to this function. =end original Perl 関数 unpack() を実装しているエンジンです。 C は展開されたリスト要素をスタックに設定して、要素数を 返します。 この関数を呼ぶ前には C を、呼んだ後には C を 使ってください。 I32 unpackstring(const char *pat, const char *patend, const char *s, const char *strend, U32 flags) =for hackers Found in file pp_pack.c =back =head1 Functions in file pp_sys.c (ファイル pp_sys.c の関数) =over 8 =item setdefout X =begin original Sets PL_defoutgv, the default file handle for output, to the passed in typeglob. As PL_defoutgv "owns" a reference on its typeglob, the reference count of the passed in typeglob is increased by one, and the reference count of the typeglob that PL_defoutgv points to is decreased by one. =end original 出力用のデフォルトファイルハンドルである PL_defoutgv を typeglob で 渡されたものに設定します。 PL_defoutgv は typeglob に関する参照を「所有」しているため、typeglob で 渡されたものの参照カウントは 1 増加し、PL_defoutgv が指す typeglob の 参照カウントは 1 減少します。 void setdefout(GV* gv) =for hackers Found in file pp_sys.c =back =item ibcmp_utf8 X This is a synonym for (! foldEQ_utf8()) I32 ibcmp_utf8(const char *s1, char **pe1, UV l1, bool u1, const char *s2, char **pe2, UV l2, bool u2) =head1 Global Variables (グローバル変数) =over 8 =item PL_keyword_plugin X =begin original Function pointer, pointing at a function used to handle extended keywords. The function should be declared as =end original 拡張キーワードを扱うのに使われる関数を指す関数ポインタ。 関数は以下のように宣言されている必要があります int keyword_plugin_function(pTHX_ char *keyword_ptr, STRLEN keyword_len, OP **op_ptr) =begin original The function is called from the tokeniser, whenever a possible keyword is seen. C points at the word in the parser's input buffer, and C gives its length; it is not null-terminated. The function is expected to examine the word, and possibly other state such as L<%^H|perlvar/%^H>, to decide whether it wants to handle it as an extended keyword. If it does not, the function should return C, and the normal parser process will continue. =end original この関数は、キーワードの可能性があるものが検出されるたびに、 トークナイザから呼び出されます。 C はパーサの入力バッファ内の単語をポイントし、C は その長さを指定します; これは null 終端されていません。 この関数は、単語と、場合によっては L<%^H|perlvar/%^H> などの他の状態を調べて、 拡張キーワードとして処理するかどうかを決定することが想定されています。 処理しない場合、この関数は C を返し、通常の パーサ処理が続行されます。 =begin original If the function wants to handle the keyword, it first must parse anything following the keyword that is part of the syntax introduced by the keyword. See L for details. =end original 関数がキーワードを処理する場合、最初に、キーワードによって導入された構文の 一部であるキーワードに続くものを解析する必要があります。 詳しくは L を参照してください。 =begin original When a keyword is being handled, the plugin function must build a tree of C structures, representing the code that was parsed. The root of the tree must be stored in C<*op_ptr>. The function then returns a constant indicating the syntactic role of the construct that it has parsed: C if it is a complete statement, or C if it is an expression. Note that a statement construct cannot be used inside an expression (except via C and similar), and an expression is not a complete statement (it requires at least a terminating semicolon). =end original キーワードを処理する場合、プラグイン関数は、解析されたコードを表す C 構造体のツリーを構築する必要があります。 ツリーのルートは、C<*op_ptr> に格納されている必要があります。 次に、この関数は、パースした構造体の構文上の役割を示す文字列を返します: これは、完全な文の場合は C、式の場合は C です。 文構造体は(C などを使用した場合を除き)式の中で使用できません; また、式は完全な文ではありません(少なくとも末尾のセミコロンが必要です)。 =begin original When a keyword is handled, the plugin function may also have (compile-time) side effects. It may modify C<%^H>, define functions, and so on. Typically, if side effects are the main purpose of a handler, it does not wish to generate any ops to be included in the normal compilation. In this case it is still required to supply an op tree, but it suffices to generate a single null op. =end original キーワードが処理されるとき、プラグイン関数には(コンパイル時の)副作用も あります。 プラグイン関数は C<%^H> を変更したり、関数を定義したりすることがあります。 通常、副作用がハンドラの主な目的である場合、通常のコンパイルに 含まれる op が生成されることを望みません。 この場合、op 木を提供する必要はありますが、単一の null op を 生成するだけで十分です。 =begin original That's how the C<*PL_keyword_plugin> function needs to behave overall. Conventionally, however, one does not completely replace the existing handler function. Instead, take a copy of C before assigning your own function pointer to it. Your handler function should look for keywords that it is interested in and handle those. Where it is not interested, it should call the saved plugin function, passing on the arguments it received. Thus C actually points at a chain of handler functions, all of which have an opportunity to handle keywords, and only the last function in the chain (built into the Perl core) will normally return C. =end original これが、C<*PL_keyword_plugin> 関数が全体的に動作するために必要な方法です。 しかし、慣習的に、既存のハンドラ関数を完全に置き換えることはありません。 代わりに、C のコピーを取得してから、独自の 関数ポインタをこの関数に割り当てます。 ハンドラ関数は、関心のあるキーワードを検索して処理する必要があります。 関心のない場合は、保存されたプラグイン関数を呼び出して、受け取った引数を 渡します。 このように、C は実際にはハンドラ関数のチェーンを 指しており、そのすべてにキーワードを処理する機会があり、チェーンの最後の 関数(Perl コアに組み込まれている)だけが通常 C を 返します。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 =for hackers Found in file perlvars.h =back =head1 GV Functions (GV 関数) =over 8 =item GvSV X =begin original Return the SV from the GV. =end original GV から SV を返します。 SV* GvSV(GV* gv) =for hackers Found in file gv.h =item gv_const_sv X =begin original If C is a typeglob whose subroutine entry is a constant sub eligible for inlining, or C is a placeholder reference that would be promoted to such a typeglob, then returns the value returned by the sub. Otherwise, returns NULL. =end original C がサブルーチンエントリがインライン化可能な定数サブルーチンである 型グロブであるか、C がそのような型グロブに昇格するリファレンスの プレースホルダの場合、そのサブルーチンから返される値を返します。 さもなければ NULL を返します。 SV* gv_const_sv(GV* gv) =for hackers Found in file gv.c =item gv_fetchmeth X =begin original Returns the glob with the given C and a defined subroutine or C. The glob lives in the given C, or in the stashes accessible via @ISA and UNIVERSAL::. =end original 与えられた C と、定義されたサブルーチンか C を使ったグロブを 返します。 このグロブは、与えられた C か、@ISA や UNIVERSAL:: を通じて アクセスできるスタッシュにあります。 =begin original The argument C should be either 0 or -1. If C, as a side-effect creates a glob with the given C in the given C which in the case of success contains an alias for the subroutine, and sets up caching info for this glob. =end original 引数 C は 0 か -1 であるべきです。 C の場合、副作用として(サブルーチンに対するエイリアスを 含むことに成功した場合に)与えられた C にある C に対する glob を生成し、さらにこの glob に対するキャッシュ情報のセットアップを 行います。 =begin original This function grants C<"SUPER"> token as a postfix of the stash name. The GV returned from C may be a method cache entry, which is not visible to Perl code. So when calling C, you should not use the GV directly; instead, you should use the method's CV, which can be obtained from the GV with the C macro. =end original この関数はスタッシュ名のポストフィックスとして、トークン C<"SUPER"> を 受け付けます。 C から返された GV は、Perl プログラムからは参照することの できないような、メソッドキャッシュのエントリである可能性があります。 このため、C を呼び出したとき、GV を直接 使うべきではありません; その代わりに、GV に対して C マクロを使って 得ることのできる、メソッドの CV を使うべきです。 GV* gv_fetchmeth(HV* stash, const char* name, STRLEN len, I32 level) =for hackers Found in file gv.c =item gv_fetchmethod_autoload X =begin original Returns the glob which contains the subroutine to call to invoke the method on the C. In fact in the presence of autoloading this may be the glob for "AUTOLOAD". In this case the corresponding variable $AUTOLOAD is already setup. =end original C にあるメソッドを起動するために呼び出すサブルーチンを含むグロブを 返します。 事実、オートローディングの直前でこれは "AUTOLOAD" に対するグロブとなる 可能性があります。 その場合、$AUTOLOAD に対応する変数が既にセットアップされています。 =begin original The third parameter of C 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 C is equivalent to calling C with a non-zero C parameter. =end original C の第三引数は、与えられたメソッドが 存在していなかった場合に AUTLOAD のルックアップをするかしないかを決定します; ゼロでないときは AUTOLOAD の検索を行い、ゼロのときには行いません。 C の呼び出しは C に ゼロでない C パラメーターを渡したときと等価です。 =begin original These functions grant C<"SUPER"> 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. =end original これらの関数は、トークン C<"SUPER"> をメソッド名の接頭辞として許します。 返された glob を長い間保存しておきたいのなら、"AUTOLOAD" の存在を チェックする必要があるということに注意してください。 これは、後での呼び出しが $AUTOALOD の値が変化したことによって、異なる サブルーチンをロードしてしまうかもしれないからです。 =begin original These functions have the same side-effects and as C with C. C should be writable if contains C<':'> or C<' ''>. The warning against passing the GV returned by C to C apply equally to these functions. =end original これらの関数は、C に C を渡したときと同じ副作用を 持っています。 C は、その内容に C<':'> か C<'\''> が含まれている場合には書き込み 可能であるべきです。 C から返された GV を C に渡したことに対する警告は、 これらの関数についても同じく適用されます。 GV* gv_fetchmethod_autoload(HV* stash, const char* name, I32 autoload) =for hackers Found in file gv.c =item gv_fetchmeth_autoload X =begin original Same as gv_fetchmeth(), but looks for autoloaded subroutines too. Returns a glob for the subroutine. =end original gv_fetchmeth() と同じですが、オートロードされたサブルーチンも探します。 サブルーチンのグロブを返します。 =begin original For an autoloaded subroutine without a GV, will create a GV even if C. For an autoloaded subroutine without a stub, GvCV() of the result may be zero. =end original GV なしのオートロードされたサブルーチンのために、C でも GV を 作成します。 スタブのないオートロードされたサブルーチンのために、結果の GvCV() は ゼロかもしれません。 GV* gv_fetchmeth_autoload(HV* stash, const char* name, STRLEN len, I32 level) =for hackers Found in file gv.c =item gv_stashpv X =begin original Returns a pointer to the stash for a specified package. Uses C to determine the length of C, then calls C. =end original 指定されたパッケージに対するスタッシュへのポインタを返します。 C の長さを決定するために C を使い、それから C を呼び出します。 HV* gv_stashpv(const char* name, I32 flags) =for hackers Found in file gv.c =item gv_stashpvn X =begin original Returns a pointer to the stash for a specified package. The C parameter indicates the length of the C, in bytes. C is passed to C, so if set to C then the package will be created if it does not already exist. If the package does not exist and C is 0 (or any other setting that does not create packages) then NULL is returned. =end original 指定されたパッケージに対するスタッシュへのポインタを返します。 C 引数は C の長さをバイトで示します。 C は C に渡されるので、C を設定すると パッケージが既に存在していない場合は作成されます。 パッケージが存在しておらず、 C が 0 (またはパッケージを作成しない その他の値)の場合は NULL が返されます。 HV* gv_stashpvn(const char* name, U32 namelen, I32 flags) =for hackers Found in file gv.c =item gv_stashpvs X =begin original Like C, but takes a literal string instead of a string/length pair. =end original C と同様ですが、文字列/長さの組ではなく、リテラルな文字列を 取ります。 HV* gv_stashpvs(const char* name, I32 create) =for hackers Found in file handy.h =item gv_stashsv X =begin original Returns a pointer to the stash for a specified package. See C. =end original 指定されたパッケージに対するスタッシュへのポインタを返します。 C を参照してください。 HV* gv_stashsv(SV* sv, I32 flags) =for hackers Found in file gv.c =back =head1 Handy Values (便利な値) =over 8 =item Nullav X =begin original Null AV pointer. =end original AVのヌルポインタ。 =begin original (deprecated - use C<(AV *)NULL> instead) =end original (廃止予定 - 代わりに C<(AV *)NULL> を使ってください) =for hackers Found in file av.h =item Nullch X =begin original Null character pointer. (No longer available when C is defined.) =end original ヌル文字ポインタ。 (C が定義されているときはもはや利用できません。) =for hackers Found in file handy.h =item Nullcv X =begin original Null CV pointer. =end original CVのヌルポインタ。 =begin original (deprecated - use C<(CV *)NULL> instead) =end original (廃止予定 - 代わりに C<(CV *)NULL> を使ってください) =for hackers Found in file cv.h =item Nullhv X =begin original Null HV pointer. =end original HVのヌルポインタ。 =begin original (deprecated - use C<(HV *)NULL> instead) =end original (廃止予定 - 代わりに C<(HV *)NULL> を使ってください) =for hackers Found in file hv.h =item Nullsv X =begin original Null SV pointer. (No longer available when C is defined.) =end original ヌル SV ポインタ。 (C が定義されているときはもはや利用できません。) =for hackers Found in file handy.h =back =head1 Hash Manipulation Functions (ハッシュ操作関数) =over 8 =item get_hv X =begin original Returns the HV of the specified Perl hash. C are passed to C. If C is set and the Perl variable does not exist then it will be created. If C is zero and the variable does not exist then NULL is returned. =end original 指定された Perl ハッシュの HV を返します。 C は C に渡されます。 C がセットされていて、指定された変数が存在していなければ、新たに 生成されます。 C がゼロで、かつ、指定された変数がなかった場合には NULL が返されます。 =begin original NOTE: the perl_ form of this function is deprecated. =end original 注意: この関数の perl_ の形は廃止予定です。 HV* get_hv(const char *name, I32 flags) =for hackers Found in file perl.c =item HEf_SVKEY X =begin original This flag, used in the length slot of hash entries and magic structures, specifies the structure contains an C pointer where a C pointer is to be expected. (For information only--not to be used). =end original このフラグは、ハッシュエントリの length slot や magic structures で使われ、 C ポインタであることを期待されている C ポインタを含む構造体を 指定します。 (情報のみ -- 使われません)。 =for hackers Found in file hv.h =item HeHASH X =begin original Returns the computed hash stored in the hash entry. =end original ハッシュエントリに格納されている計算済みハッシュを返します。 U32 HeHASH(HE* he) =for hackers Found in file hv.h =item HeKEY X =begin original Returns the actual pointer stored in the key slot of the hash entry. The pointer may be either C or C, depending on the value of C. Can be assigned to. The C or C macros are usually preferable for finding the value of a key. =end original ハッシュエントリのキー スロットにあるポインタを返します。 このポインタは C か C のいずれかで、これは C の 値に依存します。 これは代入することができます。 C や C といったマクロはキーの値を検索するために、 通常望ましいものです。 void* HeKEY(HE* he) =for hackers Found in file hv.h =item HeKLEN X =begin original If this is negative, and amounts to C, it indicates the entry holds an C key. Otherwise, holds the actual length of the key. Can be assigned to. The C macro is usually preferable for finding key lengths. =end original これが負であり、かつ C に等しければ、エントリが C キーを 保持していることを示します。 そうでなければ、これはキーの実際の長さを保持しています。 これは代入することができます。 マクロ C はキーの長さを検出するのに、通常望ましいものです。 STRLEN HeKLEN(HE* he) =for hackers Found in file hv.h =item HePV X =begin original Returns the key slot of the hash entry as a C value, doing any necessary dereferencing of possibly C keys. The length of the string is placed in C (this is a macro, so do I use C<&len>). If you do not care about what the length of the key is, you may use the global variable C, 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 C or similar is not a good way to find the length of hash keys. This is very similar to the C macro described elsewhere in this document. See also C. =end original C としてのハッシュエントリのキースロットを返し、C キーで 必要となるような参照外しなどを行います。 文字列の長さは C に置かれます(これはマクロなので、C<&len> を 使ってはいけません)。 キーの長さがどうなのかを気にしないのであれば、グローバル変数 C を 使うことができますが、これはローカル変数を使うよりも非効率的です。 しかし忘れないで欲しいのは、そういった perl におけるハッシュのキーは 埋め込まれているヌル文字に対して自由であり、そのため C などを使って ハッシュキーの長さを調べるのは良い方法ではないということです。 これは他の場所で説明している C マクロについても同様です。 C も参照してください。 =begin original If you are using C to get values to pass to C to create a new SV, you should consider using C as it is more efficient. =end original 新しい SV を作るために C に渡すための値を得るのに C を 使っている場合、より効率的な C を使うことを 考慮するべきです。 char* HePV(HE* he, STRLEN len) =for hackers Found in file hv.h =item HeSVKEY X =begin original Returns the key as an C, or C if the hash entry does not contain an C key. =end original C としてのキー、もしくはハッシュエントリに C キーがない場合には C を返します。 SV* HeSVKEY(HE* he) =for hackers Found in file hv.h =item HeSVKEY_force X =begin original Returns the key as an C. Will create and return a temporary mortal C if the hash entry contains only a C key. =end original C としてのキーを返します。 ハッシュエントリに C キーしかない場合には、一時的な揮発性 C が 生成されて返されます。 SV* HeSVKEY_force(HE* he) =for hackers Found in file hv.h =item HeSVKEY_set X =begin original Sets the key to a given C, taking care to set the appropriate flags to indicate the presence of an C key, and returns the same C. =end original 与えられた C にキーをセットし、C キーの存在を表わす適切な フラグを注意深くセットし、同じ C を返します。 SV* HeSVKEY_set(HE* he, SV* sv) =for hackers Found in file hv.h =item HeUTF8 X =begin original Returns whether the C value returned by C is encoded in UTF-8, doing any necessary dereferencing of possibly C keys. The value returned will be 0 or non-0, not necessarily 1 (or even a value with any low bits set), so B blindly assign this to a C variable, as C may be a typedef for C. =end original Returns whether the C value returned by C is encoded in UTF-8, doing any necessary dereferencing of possibly C keys. 返される値は 0 または非 0 で、1 である必要(あるいは最下位ビットが設定されている 必要すら)はないので、これを盲目的に C 変数に代入 B<しないでください>; C は C への typedef かもしれないからです。 char* HeUTF8(HE* he) =for hackers Found in file hv.h =item HeVAL X =begin original Returns the value slot (type C) stored in the hash entry. =end original ハッシュエントリに格納されている(型 C の)値スロットを返します。 SV* HeVAL(HE* he) =for hackers Found in file hv.h =item HvNAME X =begin original Returns the package name of a stash, or NULL if C isn't a stash. See C, C. =end original スタッシュのパッケージ名を返します; C がスタッシュでない場合は NULL を返します。 C, C を参照してください。 char* HvNAME(HV* stash) =for hackers Found in file hv.h =item hv_assert X =begin original Check that a hash is in an internally consistent state. =end original ハッシュが内部的に一貫した状態であるかを調べます。 void hv_assert(HV *hv) =for hackers Found in file hv.c =item hv_clear X =begin original Clears a hash, making it empty. =end original ハッシュをクリアし、空にします。 void hv_clear(HV *hv) =for hackers Found in file hv.c =item hv_clear_placeholders X =begin original Clears any placeholders from a hash. If a restricted hash has any of its keys marked as readonly and the key is subsequently deleted, the key is not actually deleted but is marked by assigning it a value of &PL_sv_placeholder. This tags it so it will be ignored by future operations such as iterating over the hash, but will still allow the hash to have a value reassigned to the key at some future point. This function clears any such placeholder keys from the hash. See Hash::Util::lock_keys() for an example of its use. =end original ハッシュからのプレースホルダをクリアします。 制限ハッシュに読み込み専用とマークされたキーがあって、その後キーが 削除されると、キーは実際には削除されず、&PL_sv_placeholder の値を 代入することでマークされます。 これはハッシュの反復のようなその後の操作では無視されるようになりますが、 将来の時点でキーに再代入されることで値を持てるようになっています。 この関数はこのようなハッシュからのプレースホルダキーをクリアします。 この使用例は Hash::Util::lock_keys() を参照してください。 void hv_clear_placeholders(HV *hv) =for hackers Found in file hv.c =item hv_delete X =begin original Deletes a key/value pair in the hash. The value's SV is removed from the hash, made mortal, and returned to the caller. The C is the length of the key. The C value will normally be zero; if set to G_DISCARD then NULL will be returned. NULL will also be returned if the key is not found. =end original ハッシュにあるキー/値のペアを削除します。 値 SV はハッシュから取り除かれて、揮発性にして、呼び出し元に返されます。 C はキーの長さです。 C の値は通常はゼロとなります; これに G_DISCARD をセットした場合には NULL が返されます。 キーが見つからない場合も NULL が返されます。 SV* hv_delete(HV *hv, const char *key, I32 klen, I32 flags) =for hackers Found in file hv.c =item hv_delete_ent X =begin original Deletes a key/value pair in the hash. The value SV is removed from the hash, made mortal, and returned to the caller. The C value will normally be zero; if set to G_DISCARD then NULL will be returned. NULL will also be returned if the key is not found. C can be a valid precomputed hash value, or 0 to ask for it to be computed. =end original ハッシュにあるキー/値のペアを削除します。 値 SV はハッシュから取り除かれて、揮発性にして、呼び出し元に返されます。 C の値は通常はゼロとなります; これに G_DISCARD をセットした場合には NULL が返されます。 キーが見つからない場合も NULL が返されます。 C はあらかじめ計算されたハッシュ値を置きますが、計算結果を 問い合わせるには 0 とします。 SV* hv_delete_ent(HV *hv, SV *keysv, I32 flags, U32 hash) =for hackers Found in file hv.c =item hv_exists X =begin original Returns a boolean indicating whether the specified hash key exists. The C is the length of the key. =end original 指定されたハッシュキーが存在するかどうかを表わす真偽値を返します。 C はキーの長さです。 bool hv_exists(HV *hv, const char *key, I32 klen) =for hackers Found in file hv.c =item hv_exists_ent X =begin original Returns a boolean indicating whether the specified hash key exists. C can be a valid precomputed hash value, or 0 to ask for it to be computed. =end original 指定されたハッシュキーが存在するかどうかを表わす真偽値を返します。 C はあらかじめ計算されたハッシュ値を置きますが、計算結果を 問い合わせるには 0 とします。 bool hv_exists_ent(HV *hv, SV *keysv, U32 hash) =for hackers Found in file hv.c =item hv_fetch X =begin original Returns the SV which corresponds to the specified key in the hash. The C is the length of the key. If C is set then the fetch will be part of a store. Check that the return value is non-null before dereferencing it to an C. =end original 指定されたキーに対応する、ハッシュ中の SV を返します。 C はキーの長さです。 C がセットされている場合、フェッチはストアの一部となります。 戻り値 C の参照外しをする前に、それがヌルでないことを チェックしてください。 =begin original See L for more information on how to use this function on tied hashes. =end original この関数をどのように tie されたハッシュに使うかに関するさらなる情報は L を 参照してください。 SV** hv_fetch(HV *hv, const char *key, I32 klen, I32 lval) =for hackers Found in file hv.c =item hv_fetchs X =begin original Like C, but takes a literal string instead of a string/length pair. =end original C と同様ですが、文字列/長さの組ではなく、リテラルな文字列を 取ります。 SV** hv_fetchs(HV* tb, const char* key, I32 lval) =for hackers Found in file handy.h =item hv_fetch_ent X =begin original Returns the hash entry which corresponds to the specified key in the hash. C must be a valid precomputed hash number for the given C, or 0 if you want the function to compute it. IF C 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 C 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. =end original 指定されたキーに対応する、ハッシュ中のハッシュエントリを返します。 C は、C に対する正当な計算済みハッシュ値でなければなりません; もしくは、この関数にハッシュ値を計算させたいのであればここに 0 を置きます。 C がセットされていると、フェッチはストアの一部分となります。 C が tie されているハッシュの場合の戻り値は静的な位置 (static location)へのポインタです。 したがって、何かを格納する必要があるのなら、その構造体のコピーを 取るようにしてください。 =begin original See L for more information on how to use this function on tied hashes. =end original この関数をどのように tie されたハッシュに使うかに関するさらなる情報は L を 参照してください。 HE* hv_fetch_ent(HV *hv, SV *keysv, I32 lval, U32 hash) =for hackers Found in file hv.c =item hv_iterinit X =begin original Prepares a starting point to traverse a hash table. Returns the number of keys in the hash (i.e. the same as C). The return value is currently only meaningful for hashes without tie magic. =end original ハッシュテーブルをたどるための開始点を準備します。 ハッシュの中に存在しているキーの数を返します(C と同じです)。 この戻り値は現状では tie magic なしのハッシュに対してのみ意味があります。 =begin original NOTE: Before version 5.004_65, C 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 C. =end original 注意: 5.004_65 より前のバージョンでは、C は使用中の ハッシュバケツの数を返すのに使われていました。 もしあなたがそのような値を必要としているのなら、C という マクロを使って得ることができます。 I32 hv_iterinit(HV *hv) =for hackers Found in file hv.c =item hv_iterkey X =begin original Returns the key from the current position of the hash iterator. See C. =end original ハッシュイテレーターの現在位置からキーを返します。 C を参照してください。 char* hv_iterkey(HE* entry, I32* retlen) =for hackers Found in file hv.c =item hv_iterkeysv X =begin original Returns the key as an C from the current position of the hash iterator. The return value will always be a mortal copy of the key. Also see C. =end original ハッシュイテレーターの現在位置から、C としてキーを返します。 この戻り値は常にキーの揮発性コピーとなります。 C を参照してください。 SV* hv_iterkeysv(HE* entry) =for hackers Found in file hv.c =item hv_iternext X =begin original Returns entries from a hash iterator. See C. =end original ハッシュ反復子からエントリを返します。 C を参照してください。 =begin original You may call C or C on the hash entry that the iterator currently points to, without losing your place or invalidating your iterator. Note that in this case the current entry is deleted from the hash with your iterator holding the last reference to it. Your iterator is flagged to free the entry on the next call to C, so you must not discard your iterator immediately else the entry will leak - call C to trigger the resource deallocation. =end original 反復子が位置を失ったり無効になったりすることなく、反復子が現在指している ハッシュエントリに対して C または C を 呼び出すことができます。 この場合現在のエントリは、これへの最後の参照を保持している反復子の ハッシュから削除されることに注意してください。 反復子は次の C の呼び出しでエントリが解放されるようにマークが 付けられるので、すぐに反復子を捨ててはいけません; さもなければエントリは リークします; リソースの割り当て解除を引き起こすには C を 呼び出してください。 HE* hv_iternext(HV *hv) =for hackers Found in file hv.c =item hv_iternextsv X =begin original Performs an C, C, and C in one operation. =end original 一つの操作で C、C、C を 呼び出します。 SV* hv_iternextsv(HV *hv, char **key, I32 *retlen) =for hackers Found in file hv.c =item hv_iternext_flags X =begin original Returns entries from a hash iterator. See C and C. The C value will normally be zero; if HV_ITERNEXT_WANTPLACEHOLDERS is set the placeholders keys (for restricted hashes) will be returned in addition to normal keys. By default placeholders are automatically skipped over. Currently a placeholder is implemented with a value that is C<&Perl_sv_placeholder>. Note that the implementation of placeholders and restricted hashes may change, and the implementation currently is insufficiently abstracted for any change to be tidy. =end original ハッシュ反復子からエントリを返します。 C と C を参照してください。 C の値は普通はゼロです; HV_ITERNEXT_WANTPLACEHOLDERS が セットされていると、(制限ハッシュのための) プレースホルダキーは通常のキーに 追加して返されます。 デフォルトではプレースホルダは自動的に飛ばされます。 現在のところプレースホルダは C<&Perl_sv_placeholder> の値として 実装されています。 プレースホルダと制限ハッシュの実装は変更されるかも知れず、現在の実装は 整理するための変更には抽象化が不十分であることに注意してください。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 HE* hv_iternext_flags(HV *hv, I32 flags) =for hackers Found in file hv.c =item hv_iterval X =begin original Returns the value from the current position of the hash iterator. See C. =end original ハッシュ反復子の現在位置から値を返します。 C を参照してください。 SV* hv_iterval(HV *hv, HE *entry) =for hackers Found in file hv.c =item hv_magic X =begin original Adds magic to a hash. See C. =end original ハッシュに magic を付加します。 C を参照してください。 void hv_magic(HV *hv, GV *gv, int how) =for hackers Found in file hv.c =item hv_scalar X =begin original Evaluates the hash in scalar context and returns the result. Handles magic when the hash is tied. =end original ハッシュをスカラコンテキストで評価して、結果を返します。 ハッシュが tie された場合は magic を扱います。 SV* hv_scalar(HV *hv) =for hackers Found in file hv.c =item hv_store X =begin original Stores an SV in a hash. The hash key is specified as C and C is the length of the key. The C 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 C. Note that the caller is responsible for suitably incrementing the reference count of C before the call, and decrementing it if the function returned NULL. Effectively a successful hv_store takes ownership of one reference to C. This is usually what you want; a newly created SV has a reference count of one, so if all your code does is create SVs then store them in a hash, hv_store will own the only reference to the new SV, and your code doesn't need to do anything further to tidy up. hv_store is not implemented as a call to hv_store_ent, and does not create a temporary SV for the key, so if your key data is not already in SV form then use hv_store in preference to hv_store_ent. =end original ハッシュに SV を格納します。 そのハッシュキーは C で指定され、C はキーの長さです。 C パラメーターはあらかじめ計算したハッシュ値です; 0 にすると Perl がこれを計算します。 戻り値は、操作が失敗したり(tie されているハッシュのように)ハッシュに 実際に値を格納する必要のない場合には NULL になります。 さもなければ、取得したオリジナルの C の参照外しをすることができます。 呼び出し側は、呼び出しの前に C の参照カウントを適切にインクリメントし、 関数が NULL を返した場合には参照カウントをデクリメントする責任が あるということに注意してください。 事実上成功した hv_store は C へのリファレンスを取得します。 これは通常あなたの求めているものです; 新しく作られた SV は参照カウント 1 を 持つので、あなたのコードがすることが SV を作成してハッシュを 保管することだけなら、hv_store は新しい SV へのリファレンスだけを所有し、 あなたのコードは整理のためにさらなる何かをする必要はありません。 hv_store は hv_store_ent の呼び出しとして実装されておらず、キーのための 一時的な SV を作成しないので、キーデータがすでに SV 形式に なっているのでなければ、hv_store_ent よりも hv_store を使ってください。 =begin original See L for more information on how to use this function on tied hashes. =end original この関数をどのように tie されたハッシュに使うかに関するさらなる情報は L を 参照してください。 SV** hv_store(HV *hv, const char *key, I32 klen, SV *val, U32 hash) =for hackers Found in file hv.c =item hv_stores X =begin original Like C, but takes a literal string instead of a string/length pair and omits the hash parameter. =end original C と同様ですが、文字列/長さの組ではなく、リテラルな文字列を 取り、ハッシュパラメータを除外します。 SV** hv_stores(HV* tb, const char* key, NULLOK SV* val) =for hackers Found in file handy.h =item hv_store_ent X =begin original Stores C in a hash. The hash key is specified as C. The C 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 C macros described here. Note that the caller is responsible for suitably incrementing the reference count of C before the call, and decrementing it if the function returned NULL. Effectively a successful hv_store_ent takes ownership of one reference to C. This is usually what you want; a newly created SV has a reference count of one, so if all your code does is create SVs then store them in a hash, hv_store will own the only reference to the new SV, and your code doesn't need to do anything further to tidy up. Note that hv_store_ent only reads the C; unlike C it does not take ownership of it, so maintaining the correct reference count on C is entirely the caller's responsibility. hv_store is not implemented as a call to hv_store_ent, and does not create a temporary SV for the key, so if your key data is not already in SV form then use hv_store in preference to hv_store_ent. =end original C をハッシュに格納します。 ハッシュキーは C で指定します。 C パラメーターはあらかじめ計算したハッシュ値です; 0 にすると Perl がこれを計算します。 戻り値は生成された新しいハッシュエントリです。 操作が失敗したり、(tie されているハッシュのように)ハッシュに実際に値を 格納する必要のない場合には NULL になります。 そうでない場合には、戻り値の内容に C マクロを使ってアクセスすることが 可能です。 呼び出し側は、呼び出しの前に C の参照カウントを適切にインクリメントし、 関数が NULL を返した場合には参照カウントをデクリメントする責任が あるということに注意してください。 事実上成功した hv_store_ent は C へのリファレンスを取得します。 これは通常あなたの求めているものです; 新しく作られた SV は参照カウント 1 を 持つので、あなたのコードがすることが SV を作成してハッシュを 保管することだけなら、hv_store は新しい SV へのリファレンスだけを所有し、 あなたのコードは整理のためにさらなる何かをする必要はありません。 hv_store_ent は C だけを読み込むことに注意してください; C と違って 所有権を取らないので、C の参照カウントを正しく保守するのは全て 呼び出し側に責任があります。 hv_store は hv_store_ent の呼び出しとして実装されておらず、キーのための 一時的な SV を作成しないので、キーデータがすでに SV 形式に なっているのでなければ、hv_store_ent よりも hv_store を使ってください。 =begin original See L for more information on how to use this function on tied hashes. =end original この関数をどのように tie されたハッシュに使うかに関するさらなる情報は L を 参照してください。 HE* hv_store_ent(HV *hv, SV *key, SV *val, U32 hash) =for hackers Found in file hv.c =item hv_undef X =begin original Undefines the hash. =end original ハッシュを undefine します。 void hv_undef(HV *hv) =for hackers Found in file hv.c =item newHV X =begin original Creates a new HV. The reference count is set to 1. =end original 新たな HV を生成します。 参照カウントは 1 に設定されます。 HV* newHV() =for hackers Found in file hv.h =back =head1 Lexer interface (字句解析器インターフェース) =over 8 =item lex_bufutf8 X =begin original Indicates whether the octets in the lexer buffer (Llinestr>) should be interpreted as the UTF-8 encoding of Unicode characters. If not, they should be interpreted as Latin-1 characters. This is analogous to the C flag for scalars. =end original 字句解析バッファ (Llinestr>) のオクテットを UTF-8 エンコーディングの Unicode 文字として解釈するかどうかを示します。 そうでなければ Latin-1 文字として解釈します。 これはスカラの C フラグに似ています。 =begin original In UTF-8 mode, it is not guaranteed that the lexer buffer actually contains valid UTF-8. Lexing code must be robust in the face of invalid encoding. =end original UTF-8 モードでは、字句解析器バッファが実際に有効な UTF-8 を含んでいることは 保証されません。 字句解析コードは、不正なエンコーディングに対して堅牢でなければなりません。 =begin original The actual C flag of the Llinestr> scalar is significant, but not the whole story regarding the input character encoding. Normally, when a file is being read, the scalar contains octets and its C flag is off, but the octets should be interpreted as UTF-8 if the C pragma is in effect. During a string eval, however, the scalar may have the C flag on, and in this case its octets should be interpreted as UTF-8 unless the C pragma is in effect. This logic may change in the future; use this function instead of implementing the logic yourself. =end original Llinestr> スカラの実際の C フラグは重要ですが、 入力文字エンコーディングに関する話全体は重要ではありません。 通常、ファイルが読み込まれるとき、スカラはオクテットを含み、C フラグは オフですが、C プラグマが有効な場合、オクテットは UTF-8 として 解釈される必要があります。 しかし、文字列 eval の間、スカラは C フラグを オンにすることができます; この場合、C プラグマが有効な場合を除き、オクテットは UTF-8として解釈される必要があります。 このロジックは将来変更される可能性があります; 自分でロジックを実装する代わりにこの関数を使用してください。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 bool lex_bufutf8() =for hackers Found in file toke.c =item lex_discard_to X =begin original Discards the first part of the Llinestr> buffer, up to I. The remaining content of the buffer will be moved, and all pointers into the buffer updated appropriately. I must not be later in the buffer than the position of Lbufptr>: it is not permitted to discard text that has yet to be lexed. =end original Llinestr> バッファの最初の部分を I まで破棄します。 バッファの残りの内容が移動され、バッファ内のすべてのポインタが適切に 更新されます。 I はバッファ内で Lbufptr> の位置より 後にあってはなりません: まだ字句解析されていないテキストを破棄することは許可されていません。 =begin original Normally it is not necessarily to do this directly, because it suffices to use the implicit discarding behaviour of L and things based on it. However, if a token stretches across multiple lines, and the lexing code has kept multiple lines of text in the buffer for that purpose, then after completion of the token it would be wise to explicitly discard the now-unneeded earlier lines, to avoid future multi-line tokens growing the buffer without bound. =end original 通常、L の暗黙的な破棄動作とそれに基づくものを使用すれば 十分なので、必ずしも直接これを行う必要はありません。 しかし、トークンが複数行にまたがっており、字句解析コードがその目的のために バッファに複数行のテキストを保持している場合、トークンの完了後に、 不要になった前の行を明示的に破棄することが賢明です; これは、将来の複数行のトークンが無制限にバッファを拡大することを 避けるためです。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 void lex_discard_to(char *ptr) =for hackers Found in file toke.c =item lex_grow_linestr X =begin original Reallocates the lexer buffer (Llinestr>) to accommodate at least I octets (including terminating NUL). Returns a pointer to the reallocated buffer. This is necessary before making any direct modification of the buffer that would increase its length. L provides a more convenient way to insert text into the buffer. =end original 字句解析器バッファ (Llinestr>) を、少なくとも I オクテット(終端の NUL を含む)を収容するように再割り当てします。 再割り当てされたバッファへのポインタを返します。 これは、バッファの長さを増加させるようなバッファの直接変更を行う前に必要です。 L は、バッファにテキストを挿入するより便利な方法を提供します。 =begin original Do not use C or C directly on Clinestr>; this function updates all of the lexer's variables that point directly into the buffer. =end original C または C を Clinestr> に 直接使用しないでください; この関数は、バッファ内を直接指す字句解析器の変数をすべて更新します。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 char * lex_grow_linestr(STRLEN len) =for hackers Found in file toke.c =item lex_next_chunk X =begin original Reads in the next chunk of text to be lexed, appending it to Llinestr>. This should be called when lexing code has looked to the end of the current chunk and wants to know more. It is usual, but not necessary, for lexing to have consumed the entirety of the current chunk at this time. =end original 字句解析される次のテキストのチャンクを読み込み、 Llinestr> に追加します。 これは、字句解析コードが現在のチャンクの末尾を見て、さらに知りたい場合に 呼び出されます。 字句解析では、この時点で現在のチャンク全体が消費されていることが よくありますが、必要ではありません。 =begin original If Lbufptr> is pointing to the very end of the current chunk (i.e., the current chunk has been entirely consumed), normally the current chunk will be discarded at the same time that the new chunk is read in. If I includes C, the current chunk will not be discarded. If the current chunk has not been entirely consumed, then it will not be discarded regardless of the flag. =end original Lbufptr> が現在のチャンクの最後を指している場合(つまり 現在のチャンクが完全に消費されている場合)、通常現在のチャンクは新しい チャンクが読み込まれると同時に破棄されます。 I に C が含まれている場合、現在のチャンクは 破棄されません。 現在のチャンクが完全に消費されていない場合、フラグに関係なく 破棄されることはありません。 =begin original Returns true if some new text was added to the buffer, or false if the buffer has reached the end of the input text. =end original バッファに新しいテキストが追加された場合は真を返し、バッファが入力テキストの 最後に達した場合は偽を返します。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 bool lex_next_chunk(U32 flags) =for hackers Found in file toke.c =item lex_peek_unichar X =begin original Looks ahead one (Unicode) character in the text currently being lexed. Returns the codepoint (unsigned integer value) of the next character, or -1 if lexing has reached the end of the input text. To consume the peeked character, use L. =end original 現在字句解析されているテキストの (Unicode での) 1 文字前を検索します。 次の文字の符号位置(符号なし整数値)を返します; 字句解析が入力テキストの終わりに達した場合は -1 を返します。 読み取られた文字を使うには、L を使います。 =begin original If the next character is in (or extends into) the next chunk of input text, the next chunk will be read in. Normally the current chunk will be discarded at the same time, but if I includes C then the current chunk will not be discarded. =end original 次の文字が入力テキストの次のチャンク内にある(または続く)場合、次のチャンクが 読み込まれます。 通常、現在のチャンクは同時に破棄されますが、I に C が含まれている場合、現在のチャンクは破棄されません。 =begin original If the input is being interpreted as UTF-8 and a UTF-8 encoding error is encountered, an exception is generated. =end original 入力が UTF-8 として解釈され、UTF-8 エンコードエラーが発生した場合は、 例外が生成されます。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 I32 lex_peek_unichar(U32 flags) =for hackers Found in file toke.c =item lex_read_space X =begin original Reads optional spaces, in Perl style, in the text currently being lexed. The spaces may include ordinary whitespace characters and Perl-style comments. C<#line> directives are processed if encountered. Lbufptr> is moved past the spaces, so that it points at a non-space character (or the end of the input text). =end original 現在字句解析されているテキスト内のオプションの Perl 形式のスペースを 読み取ります。 スペースには、通常の空白文字と Perl 形式のコメントを含めることができます。 C<#line> 指示子が検出されると処理されます。 Lbufptr> は、スペース以外の文字(または入力テキストの終わり)を 指すように、スペースを越えて移動されます。 =begin original If spaces extend into the next chunk of input text, the next chunk will be read in. Normally the current chunk will be discarded at the same time, but if I includes C then the current chunk will not be discarded. =end original スペースが入力テキストの次のチャンクに拡張された場合、次のチャンクが 読み込まれます。 通常、現在のチャンクは同時に破棄されますが、I に C が含まれている場合、現在のチャンクは破棄されません。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 void lex_read_space(U32 flags) =for hackers Found in file toke.c =item lex_read_to X =begin original Consume text in the lexer buffer, from Lbufptr> up to I. This advances Lbufptr> to match I, performing the correct bookkeeping whenever a newline character is passed. This is the normal way to consume lexed text. =end original Lbufptr> から I までの字句解析バッファ内のテキストを 消費します。 これにより、Lbufptr> が I に一致するように進み、 改行文字が渡されるたびに正しい記録が実行されます。 これは、字句解析されたテキストを消費する通常の方法です。 =begin original Interpretation of the buffer's octets can be abstracted out by using the slightly higher-level functions L and L. =end original バッファのオクテットの解釈は、少し高レベルの関数 L と L を使うことによって 抽象化できます。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 void lex_read_to(char *ptr) =for hackers Found in file toke.c =item lex_read_unichar X =begin original Reads the next (Unicode) character in the text currently being lexed. Returns the codepoint (unsigned integer value) of the character read, and moves Lbufptr> past the character, or returns -1 if lexing has reached the end of the input text. To non-destructively examine the next character, use L instead. =end original 現在字句解析中のテキストの (Unicode での) 次の文字を読み込みます。 読み込まれた文字の符号位置(符号なし整数値)を返し、 Lbufptr> をその文字を超えて移動します; 字句解析が入力テキストの終わりに達した場合は -1 を返します。 次の文字を非破壊的に調べるには、代わりに L を使用します。 =begin original If the next character is in (or extends into) the next chunk of input text, the next chunk will be read in. Normally the current chunk will be discarded at the same time, but if I includes C then the current chunk will not be discarded. =end original 次の文字が入力テキストの次のチャンク内にある(または続く)場合、次のチャンクが 読み込まれます。 通常、現在のチャンクは同時に破棄されますが、I に C が含まれている場合、現在のチャンクは破棄されません。 =begin original If the input is being interpreted as UTF-8 and a UTF-8 encoding error is encountered, an exception is generated. =end original 入力が UTF-8 として解釈され、UTF-8 エンコードエラーが発生した場合は、 例外が生成されます。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 I32 lex_read_unichar(U32 flags) =for hackers Found in file toke.c =item lex_stuff_pvn X =begin original Insert characters into the lexer buffer (Llinestr>), immediately after the current lexing point (Lbufptr>), reallocating the buffer if necessary. This means that lexing code that runs later will see the characters as if they had appeared in the input. It is not recommended to do this as part of normal parsing, and most uses of this facility run the risk of the inserted characters being interpreted in an unintended manner. =end original 現在の字句解析ポイント (Lbufptr>) の直後に字句解析バッファ (Llinestr>) に文字を挿入し、必要に応じてバッファを 再割り当てします。 これは、後で実行される字句解析コードでは、文字が入力に現れたかのように 見えることを意味します。 通常の解析の一部としてこれを行うことは推奨されません; また、この機能を使うとほとんどの場合、挿入された文字が意図しない形で 解釈される危険性があります。 =begin original The string to be inserted is represented by I octets starting at I. These octets are interpreted as either UTF-8 or Latin-1, according to whether the C flag is set in I. The characters are recoded for the lexer buffer, according to how the buffer is currently being interpreted (L). If a string to be inserted is available as a Perl scalar, the L function is more convenient. =end original 挿入される文字列は、I から始まる I オクテットで表されます。 これらのオクテットは、C フラグが I に 設定されているかどうかに応じて、UTF-8 または Latin-1 として解釈されます。 文字は、バッファが現在どのように解釈されているか (L) に応じて、 字句解析器バッファ用に再コード化されます。 挿入される文字列が Perl スカラとして利用できる場合は、 L 関数の方がより便利です。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 void lex_stuff_pvn(const char *pv, STRLEN len, U32 flags) =for hackers Found in file toke.c =item lex_stuff_sv X =begin original Insert characters into the lexer buffer (Llinestr>), immediately after the current lexing point (Lbufptr>), reallocating the buffer if necessary. This means that lexing code that runs later will see the characters as if they had appeared in the input. It is not recommended to do this as part of normal parsing, and most uses of this facility run the risk of the inserted characters being interpreted in an unintended manner. =end original 現在の字句解析ポイント (Lbufptr>) の直後に字句解析バッファ (Llinestr>) に文字を挿入し、必要に応じてバッファを 再割り当てします。 これは、後で実行される字句解析コードでは、文字が入力に現れたかのように 見えることを意味します。 通常の解析の一部としてこれを行うことは推奨されません; また、この機能を使うとほとんどの場合、挿入された文字が意図しない形で 解釈される危険性があります。 =begin original The string to be inserted is the string value of I. The characters are recoded for the lexer buffer, according to how the buffer is currently being interpreted (L). If a string to be inserted is not already a Perl scalar, the L function avoids the need to construct a scalar. =end original 挿入される文字列は I の文字列値です。 文字は、バッファが現在どのように解釈されているか (L) に応じて、 字句解析器バッファ用に再コード化されます。 挿入される文字列がまだ Perl スカラでない場合、L 関数は スカラを構築する必要を回避します。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 void lex_stuff_sv(SV *sv, U32 flags) =for hackers Found in file toke.c =item lex_unstuff X =begin original Discards text about to be lexed, from Lbufptr> up to I. Text following I will be moved, and the buffer shortened. This hides the discarded text from any lexing code that runs later, as if the text had never appeared. =end original Lbufptr> から I までの字句解析されようとしている テキストを破棄します。 I に続くテキストは移動され、バッファは短縮されます。 これにより、後で実行される字句解析コードから破棄されたテキストが隠され、 あたかもそのテキストが現れなかったかのように見えなくなります。 =begin original This is not the normal way to consume lexed text. For that, use L. =end original これは構文解析されたテキストを消費する通常の方法ではありません。 そのためには、L を使ってください。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 void lex_unstuff(char *ptr) =for hackers Found in file toke.c =item PL_parser X =begin original Pointer to a structure encapsulating the state of the parsing operation currently in progress. The pointer can be locally changed to perform a nested parse without interfering with the state of an outer parse. Individual members of C have their own documentation. =end original 現在進行中のパース操作の状態をカプセル化する構造体へのポインタ。 外側のパースの状態を妨げることなくネストされたパースを実行するために、 ポインタをローカルで変更できます。 C の個々のメンバは、独自の文書を持っています。 =for hackers Found in file toke.c =item PL_parser-Ebufend Xbufend> =begin original Direct pointer to the end of the chunk of text currently being lexed, the end of the lexer buffer. This is equal to Clinestr) + SvCUR(PL_parser-Elinestr)>. A NUL character (zero octet) is always located at the end of the buffer, and does not count as part of the buffer's contents. =end original 現在字句解析されているテキストチャンクの末尾、字句解析器バッファの末尾への 直接ポインタ。 これは Clinestr) + SvCUR(PL_parser-Elinestr)> と 同じです。 NUL 文字 (オクテット 0) は常にバッファの末尾にあり、バッファの内容の 一部としてカウントされません。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 =for hackers Found in file toke.c =item PL_parser-Ebufptr Xbufptr> =begin original Points to the current position of lexing inside the lexer buffer. Characters around this point may be freely examined, within the range delimited by Clinestr>)> and Lbufend>. The octets of the buffer may be intended to be interpreted as either UTF-8 or Latin-1, as indicated by L. =end original 字句解析バッファ内の字句解析の現在の位置を指します。 この点周辺の文字は、Clinestr>)> および Lbufend> で区切られた範囲内で自由に調べることができます。 バッファのオクテットは、L で示されるように、UTF-8 または Latin-1 として解釈されることが意図されています。 =begin original Lexing code (whether in the Perl core or not) moves this pointer past the characters that it consumes. It is also expected to perform some bookkeeping whenever a newline character is consumed. This movement can be more conveniently performed by the function L, which handles newlines appropriately. =end original 字句解析コード(Perl のコア内にあるかどうかに関係なく)は、このポインタを 消費する文字を越えて移動します。 また、改行文字が消費されるたびに何らかの保守作業を実行することも 期待されています。 この移動は、改行を適切に処理する関数 L によってより便利に 実行できます。 =begin original Interpretation of the buffer's octets can be abstracted out by using the slightly higher-level functions L and L. =end original バッファのオクテットの解釈は、少し高レベルの関数 L と L を使うことによって 抽象化できます。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 =for hackers Found in file toke.c =item PL_parser-Elinestart Xlinestart> =begin original Points to the start of the current line inside the lexer buffer. This is useful for indicating at which column an error occurred, and not much else. This must be updated by any lexing code that consumes a newline; the function L handles this detail. =end original 字句解析バッファ内の現在の行の先頭を指します。 これはどの列でエラーが発生したかを示すのに便利で、他にはあまりありません。 これは改行を使用する字句解析コードによって更新されなければなりません; 関数 L はこの詳細を処理します。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 =for hackers Found in file toke.c =item PL_parser-Elinestr Xlinestr> =begin original Buffer scalar containing the chunk currently under consideration of the text currently being lexed. This is always a plain string scalar (for which C is true). It is not intended to be used as a scalar by normal scalar means; instead refer to the buffer directly by the pointer variables described below. =end original 現在字句解析されているテキストを現在考慮しているチャンクを含む バッファスカラ。 これは常にプレーン文字列スカラ (C は真) です。 通常のスカラの手段でスカラとして使用することを意図していません; 代わりに下記のポインタ変数で直接バッファを参照してください。 =begin original The lexer maintains various C pointers to things in the Clinestr> buffer. If Clinestr> is ever reallocated, all of these pointers must be updated. Don't attempt to do this manually, but rather use L if you need to reallocate the buffer. =end original 字句解析器は、Clinestr> バッファ内のものへのさまざまな C ポインタを保持しています。 Clinestr> が再割り当てされた場合、これらすべてのポインタを 更新する必要があります。 これを手動で行うのではなく、バッファを再割り当てする必要がある場合は L を使用してください。 =begin original The content of the text chunk in the buffer is commonly exactly one complete line of input, up to and including a newline terminator, but there are situations where it is otherwise. The octets of the buffer may be intended to be interpreted as either UTF-8 or Latin-1. The function L tells you which. Do not use the C flag on this scalar, which may disagree with it. =end original バッファ内のテキストチャンクの内容は、通常、改行終端子までを含む 完全な 1 行の入力ですが、それ以外の場合もあります。 バッファのオクテットは、UTF-8 または bufutf-1 のいずれかとして 解釈されることが意図されています。 関数 L はどちらを解釈するかを示します。 このスカラーには C フラグを使用しないでください; このフラグは一致しない可能性があります。 =begin original For direct examination of the buffer, the variable Lbufend> points to the end of the buffer. The current lexing position is pointed to by Lbufptr>. Direct use of these pointers is usually preferable to examination of the scalar through normal scalar means. =end original バッファを直接検査するために、変数 Lbufend> はバッファの 終わりを指します。 現在の字句解析位置は Lbufptr> によって指します。 通常、これらのポインタを直接使用する方が、通常のスカラ手段によるスカラの 検査よりも望ましいです。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 =for hackers Found in file toke.c =back =head1 Magical Functions (マジカル関数) =over 8 =item mg_clear X =begin original Clear something magical that the SV represents. See C. =end original SV が表わしている magical をクリアします。 C を参照してください。 int mg_clear(SV* sv) =for hackers Found in file mg.c =item mg_copy X =begin original Copies the magic from one SV to another. See C. =end original ある SV から別の SV へ magic をコピーします。 C を参照してください。 int mg_copy(SV *sv, SV *nsv, const char *key, I32 klen) =for hackers Found in file mg.c =item mg_find X =begin original Finds the magic pointer for type matching the SV. See C. =end original type にマッチする SV への magic ポインタを検索します。 C を参照してください。 MAGIC* mg_find(const SV* sv, int type) =for hackers Found in file mg.c =item mg_free X =begin original Free any magic storage used by the SV. See C. =end original SV が使用しているすべての magic storage を解放します。 C を参照してください。 int mg_free(SV* sv) =for hackers Found in file mg.c =item mg_get X =begin original Do magic after a value is retrieved from the SV. See C. =end original SV から値を取得した後で magic を行います。 C を参照してください。 int mg_get(SV* sv) =for hackers Found in file mg.c =item mg_length X =begin original Report on the SV's length. See C. =end original SV の長さを報告します。 C を参照してください。 U32 mg_length(SV* sv) =for hackers Found in file mg.c =item mg_magical X =begin original Turns on the magical status of an SV. See C. =end original SV の magical status をオンにします。 C を参照してください。 void mg_magical(SV* sv) =for hackers Found in file mg.c =item mg_set X =begin original Do magic after a value is assigned to the SV. See C. =end original SV に値を代入した後で magic を行います。 C を参照してください。 int mg_set(SV* sv) =for hackers Found in file mg.c =item SvGETMAGIC X =begin original Invokes C on an SV if it has 'get' magic. This macro evaluates its argument more than once. =end original SV が 'get' magic を有している場合には C を起動します。 このマクロは二回以上引数を評価します。 void SvGETMAGIC(SV* sv) =for hackers Found in file sv.h =item SvLOCK X =begin original Arranges for a mutual exclusion lock to be obtained on sv if a suitable module has been loaded. =end original 適切なモジュールが読み込まれていれば、sv を得るための相互排他ロックを 準備します。 void SvLOCK(SV* sv) =for hackers Found in file sv.h =item SvSETMAGIC X =begin original Invokes C on an SV if it has 'set' magic. This macro evaluates its argument more than once. =end original SV が 'set' magic を持っている場合に、その SV に対して C を 起動します。 このマクロは二回以上引数を評価します。 void SvSETMAGIC(SV* sv) =for hackers Found in file sv.h =item SvSetMagicSV X =begin original Like C, but does any set magic required afterwards. =end original C と同様ですが、後で set magic が必要です。 void SvSetMagicSV(SV* dsb, SV* ssv) =for hackers Found in file sv.h =item SvSetMagicSV_nosteal X =begin original Like C, but does any set magic required afterwards. =end original C と同様ですが、後で set magic が必要です。 void SvSetMagicSV_nosteal(SV* dsv, SV* ssv) =for hackers Found in file sv.h =item SvSetSV X =begin original Calls C if dsv is not the same as ssv. May evaluate arguments more than once. =end original dsv が ssv と等しくなかったときに C を呼び出します。 引数は二回以上評価される可能性があります。 void SvSetSV(SV* dsb, SV* ssv) =for hackers Found in file sv.h =item SvSetSV_nosteal X =begin original Calls a non-destructive version of C if dsv is not the same as ssv. May evaluate arguments more than once. =end original dsv と ssv が等しくなかったときに呼び出される、非破壊的バージョンの C を呼び出します。 引数は二回以上評価される可能性があります。 void SvSetSV_nosteal(SV* dsv, SV* ssv) =for hackers Found in file sv.h =item SvSHARE X =begin original Arranges for sv to be shared between threads if a suitable module has been loaded. =end original 適切なモジュールが読み込まれていれば、sv をスレッド間で共有するための 準備をします。 void SvSHARE(SV* sv) =for hackers Found in file sv.h =item SvUNLOCK X =begin original Releases a mutual exclusion lock on sv if a suitable module has been loaded. =end original 適切なモジュールが読み込まれていれば、sv の相互排他ロックを解放します。 void SvUNLOCK(SV* sv) =for hackers Found in file sv.h =back =head1 Memory Management (メモリ管理) =over 8 =item Copy X =begin original The XSUB-writer's interface to the C C function. The C is the source, C is the destination, C is the number of items, and C is the type. May fail on overlapping copies. See also C. =end original C の C 関数に対する XSUB 作成者のためのインターフェースです。 C は転送元、C は転送先、C はアイテムの数、C は アイテムの型です。 領域がオーバーラップしているコピーの場合は失敗します。 C を参照してください。 void Copy(void* src, void* dest, int nitems, type) =for hackers Found in file handy.h =item CopyD X =begin original Like C but returns dest. Useful for encouraging compilers to tail-call optimise. =end original C と同様ですが、dest を返します。 末尾呼び出し最適化を行うコンパイラで便利です。 void * CopyD(void* src, void* dest, int nitems, type) =for hackers Found in file handy.h =item Move X =begin original The XSUB-writer's interface to the C C function. The C is the source, C is the destination, C is the number of items, and C is the type. Can do overlapping moves. See also C. =end original C の C 関数に対する XSUB 作成者のためのインターフェースです。 C は転送元、C は転送先、C はアイテムの数、C は アイテムの型です。 オーバーラップした移動も可能です。 C を参照してください。 void Move(void* src, void* dest, int nitems, type) =for hackers Found in file handy.h =item MoveD X =begin original Like C but returns dest. Useful for encouraging compilers to tail-call optimise. =end original C と同様ですが、dest を返します。 末尾呼び出し最適化を行うコンパイラで便利です。 void * MoveD(void* src, void* dest, int nitems, type) =for hackers Found in file handy.h =item Newx X =begin original The XSUB-writer's interface to the C C function. =end original XSUB 作成者のための C 関数のインターフェースです。 =begin original In 5.9.3, Newx() and friends replace the older New() API, and drops the first parameter, I, a debug aid which allowed callers to identify themselves. This aid has been superseded by a new build option, PERL_MEM_LOG (see L). The older API is still there for use in XS modules supporting older perls. =end original 5.9.3 から、Newx() とその同類は古い New() API を置き換え、呼び出し側が 自分自身を識別できるようにデバッグの助けをするための最初の引数 I が なくなりました。 この助けは新しいビルドオプション PERL_MEM_LOG (L 参照) で置き換えられました。 古い API は、古い perl に対応している XS モジュールが使えるように まだ存在しています。 void Newx(void* ptr, int nitems, type) =for hackers Found in file handy.h =item Newxc X =begin original The XSUB-writer's interface to the C C function, with cast. See also C. =end original C の C 関数に対する XSUB 作成者のためのキャスト付き インターフェースです。 C も参照してください。 void Newxc(void* ptr, int nitems, type, cast) =for hackers Found in file handy.h =item Newxz X =begin original The XSUB-writer's interface to the C C function. The allocated memory is zeroed with C. See also C. =end original XSUB 作成者のための C 関数のインターフェースです。 割り付けられた領域は C によってゼロで埋められます。 C も参照してください。 void Newxz(void* ptr, int nitems, type) =for hackers Found in file handy.h =item Poison X =begin original PoisonWith(0xEF) for catching access to freed memory. =end original 解放されたメモリへのアクセスを捕捉するための PoisonWith(0xEF) です。 void Poison(void* dest, int nitems, type) =for hackers Found in file handy.h =item PoisonFree X =begin original PoisonWith(0xEF) for catching access to freed memory. =end original 解放されたメモリへのアクセスを捕捉するための PoisonWith(0xEF) です。 void PoisonFree(void* dest, int nitems, type) =for hackers Found in file handy.h =item PoisonNew X =begin original PoisonWith(0xAB) for catching access to allocated but uninitialized memory. =end original 割り当てられたけれども未初期化のメモリへのアクセスを捕捉するための PoisonWith(0xAB)。 void PoisonNew(void* dest, int nitems, type) =for hackers Found in file handy.h =item PoisonWith X =begin original Fill up memory with a byte pattern (a byte repeated over and over again) that hopefully catches attempts to access uninitialized memory. =end original うまくいけば未初期化メモリへのアクセスを捕捉するためにメモリを (あるバイトが繰り返される)バイトパターンで埋めます。 void PoisonWith(void* dest, int nitems, type, U8 byte) =for hackers Found in file handy.h =item Renew X =begin original The XSUB-writer's interface to the C C function. =end original C の C 関数に対する XSUB 作成者のためのインターフェースです。 void Renew(void* ptr, int nitems, type) =for hackers Found in file handy.h =item Renewc X =begin original The XSUB-writer's interface to the C C function, with cast. =end original キャスト付きの、C の C 関数に対する XSUB 作成者のための インターフェースです。 void Renewc(void* ptr, int nitems, type, cast) =for hackers Found in file handy.h =item Safefree X =begin original The XSUB-writer's interface to the C C function. =end original C の C 関数に対する XSUB 作成者のためのインターフェースです。 void Safefree(void* ptr) =for hackers Found in file handy.h =item savepv X =begin original Perl's version of C. Returns a pointer to a newly allocated string which is a duplicate of C. The size of the string is determined by C. The memory allocated for the new string can be freed with the C function. =end original Perl 版の C。 C の複製である、新しく割り当てられた文字列へのポインタを返します。 文字列のサイズは C によって決定されます。 新しい文字列のために割り当てられたメモリは C 関数で解放できます。 char* savepv(const char* pv) =for hackers Found in file util.c =item savepvn X =begin original Perl's version of what C would be if it existed. Returns a pointer to a newly allocated string which is a duplicate of the first C bytes from C, plus a trailing NUL byte. The memory allocated for the new string can be freed with the C function. =end original もしあれば C が行うことの Perl 版。 C から C バイトの複製に加えて末尾の NUL バイトからなる、新しく 割り当てられた文字列へのポインタを返します。 新しい文字列のために割り当てられたメモリは C 関数で解放できます。 char* savepvn(const char* pv, I32 len) =for hackers Found in file util.c =item savepvs X =begin original Like C, but takes a literal string instead of a string/length pair. =end original C と同様ですが、文字列/長さの組ではなく、リテラルな文字列を 取ります。 char* savepvs(const char* s) =for hackers Found in file handy.h =item savesharedpv X =begin original A version of C which allocates the duplicate string in memory which is shared between threads. =end original スレッド間で共有しているメモリで複製された文字列を割り当てるバージョンの C。 char* savesharedpv(const char* pv) =for hackers Found in file util.c =item savesharedpvn X =begin original A version of C which allocates the duplicate string in memory which is shared between threads. (With the specific difference that a NULL pointer is not acceptable) =end original スレッド間で共有したメモリに複製した文字列を割り当てるバージョンの C です。 (NULL ポインタを受け付けないという違いもあります) char* savesharedpvn(const char *const pv, const STRLEN len) =for hackers Found in file util.c =item savesvpv X =begin original A version of C/C which gets the string to duplicate from the passed in SV using C =end original C を使った SV で渡されたものから複製した文字列を取得するバージョンの C/C です。 char* savesvpv(SV* sv) =for hackers Found in file util.c =item StructCopy X =begin original This is an architecture-independent macro to copy one structure to another. =end original これはある構造体をもう一つにコピーするためのアーキテクチャに依存しない マクロです。 void StructCopy(type src, type dest, type) =for hackers Found in file handy.h =item Zero X =begin original The XSUB-writer's interface to the C C function. The C is the destination, C is the number of items, and C is the type. =end original C の C 関数に対する XSUB 作成者のためのインターフェースです。 C は対象となる場所、C はアイテムの数、C は アイテムの型です。 void Zero(void* dest, int nitems, type) =for hackers Found in file handy.h =item ZeroD X =begin original Like C but returns dest. Useful for encouraging compilers to tail-call optimise. =end original C と同様ですが、dest を返します。 末尾呼び出し最適化を行うコンパイラで便利です。 void * ZeroD(void* dest, int nitems, type) =for hackers Found in file handy.h =back =head1 Miscellaneous Functions (その他の関数) =over 8 =item fbm_compile X =begin original Analyses the string in order to make fast searches on it using fbm_instr() -- the Boyer-Moore algorithm. =end original Boyer-Moore アルゴリズムを使った fbm_instr() による高速検索が できるようにするために文字列を解析します。 void fbm_compile(SV* sv, U32 flags) =for hackers Found in file util.c =item fbm_instr X =begin original Returns the location of the SV in the string delimited by C and C. It returns C if the string can't be found. The C does not have to be fbm_compiled, but the search will not be as fast then. =end original C と C によって区切られる文字列中にある SV の位置を返します。 文字列が見つからなかった場合には C を返します。 C は fbm_compile されている必要はありませんが、その場合にはある場合に 比べると検索速度は遅くなります。 char* fbm_instr(unsigned char* big, unsigned char* bigend, SV* littlestr, U32 flags) =for hackers Found in file util.c =item form X
=begin original Takes a sprintf-style format pattern and conventional (non-SV) arguments and returns the formatted string. =end original sprintf 形式のフォーマットパターンと形式的な (非 SV) 引数を取って、 フォーマットされた文字列を返します。 (char *) Perl_form(pTHX_ const char* pat, ...) =begin original can be used any place a string (char *) is required: =end original は文字列 (char *) が必要なあらゆる場所で使えます: char * s = Perl_form("%d.%d",major,minor); =begin original Uses a single private buffer so if you want to format several strings you must explicitly copy the earlier strings away (and free the copies when you are done). =end original 単一のプライベートなバッファを使うので、いくつかの文字列を フォーマットしたいなら、以前の文字列を明示的にコピーしなければなりません (そして使い終わったらコピーを解放しなければなりません)。 char* form(const char* pat, ...) =for hackers Found in file util.c =item getcwd_sv X =begin original Fill the sv with current working directory =end original sv をカレントワーキングディレクトリで埋めます int getcwd_sv(SV* sv) =for hackers Found in file util.c =item my_snprintf X =begin original The C library C functionality, if available and standards-compliant (uses C, actually). However, if the C is not available, will unfortunately use the unsafe C which can overrun the buffer (there is an overrun check, but that may be too late). Consider using C instead, or getting C. =end original 利用可能で標準に準拠していれば、C ライブラリの C の機能です (実際には C を使います)。 しかし、C が利用不可能なら、残念ながらバッファをオーバーランする 可能性のある安全でない C を使います (オーバーランチェックは ありますが、遅すぎるかもしれません)。 代わりに C を使うか、C を使うことを考慮してください。 int my_snprintf(char *buffer, const Size_t len, const char *format, ...) =for hackers Found in file util.c =item my_sprintf X =begin original The C library C, wrapped if necessary, to ensure that it will return the length of the string written to the buffer. Only rare pre-ANSI systems need the wrapper function - usually this is a direct call to C. =end original バッファに書き込んだ文字列の長さが確実に返されるように、もし必要なら ラップされた、C ライブラリの C です。 稀な ANSI 以前のシステムのみがラッパー関数を必要とします - 通常はこれは直接 C を呼び出します。 int my_sprintf(char *buffer, const char *pat, ...) =for hackers Found in file util.c =item my_vsnprintf X =begin original The C library C if available and standards-compliant. However, if if the C is not available, will unfortunately use the unsafe C which can overrun the buffer (there is an overrun check, but that may be too late). Consider using C instead, or getting C. =end original 利用可能で標準に準拠していれば、C ライブラリの C です。 しかし、C が利用不可能なら、残念ながらバッファをオーバーランする 可能性のある安全でない C を使います (オーバーランチェックは ありますが、遅すぎるかもしれません)。 代わりに C を使うか、C を使うことを考慮してください。 int my_vsnprintf(char *buffer, const Size_t len, const char *format, va_list ap) =for hackers Found in file util.c =item new_version X =begin original Returns a new version object based on the passed in SV: =end original SV で渡されたものを基として新しいバージョンオブジェクトを返します: SV *sv = new_version(SV *ver); =begin original Does not alter the passed in ver SV. See "upg_version" if you want to upgrade the SV. =end original 渡された ver SV は変更されません。 SV を昇格したいなら "upg_version" を参照してください。 SV* new_version(SV *ver) =for hackers Found in file util.c =item prescan_version X const char* prescan_version(const char *s, bool strict, const char** errstr, bool *sqv, int *ssaw_decimal, int *swidth, bool *salpha) =for hackers Found in file util.c =item scan_version X =begin original Returns a pointer to the next character after the parsed version string, as well as upgrading the passed in SV to an RV. =end original バージョン文字列をパースした後の次の文字へのポインタを返します; また、SV に 渡されたものを RV に昇格させます。 =begin original Function must be called with an already existing SV like =end original 関数は以下のように、既に存在する SV と共に呼び出されなければなりません sv = newSV(0); s = scan_version(s, SV *sv, bool qv); =begin original Performs some preprocessing to the string to ensure that it has the correct characteristics of a version. Flags the object if it contains an underscore (which denotes this is an alpha version). The boolean qv denotes that the version should be interpreted as if it had multiple decimals, even if it doesn't. =end original バージョンとして正しい特性を持つように文字列に前処理を行います。 下線が含まれている(これがαバージョンであることを示します)なら、 オブジェクトにマークを付けます。 真偽値 qv は、たとえそうではなくても、バージョンに複数の小数点が 含まれているかのように解釈するべきであることを示します。 const char* scan_version(const char *s, SV *rv, bool qv) =for hackers Found in file util.c =item strEQ X =begin original Test two strings to see if they are equal. Returns true or false. =end original 二つの文字列が等しいかどうかを検査します。 真か偽を返します。 bool strEQ(char* s1, char* s2) =for hackers Found in file handy.h =item strGE X =begin original Test two strings to see if the first, C, is greater than or equal to the second, C. Returns true or false. =end original 二つの文字列を、C が C よりも大きい、もしくは両者が等しいかどうかの 検査をします。 真か偽を返します。 bool strGE(char* s1, char* s2) =for hackers Found in file handy.h =item strGT X =begin original Test two strings to see if the first, C, is greater than the second, C. Returns true or false. =end original 二つの文字列を、C が C よりも大きいかどうかの検査をします。 真か偽を返します。 bool strGT(char* s1, char* s2) =for hackers Found in file handy.h =item strLE X =begin original Test two strings to see if the first, C, is less than or equal to the second, C. Returns true or false. =end original 二つの文字列を、C が C よりも小さい、もしくは両者が等しいか どうかの検査をします。 真か偽を返します。 bool strLE(char* s1, char* s2) =for hackers Found in file handy.h =item strLT X =begin original Test two strings to see if the first, C, is less than the second, C. Returns true or false. =end original 二つの文字列を、C が C よりも小さいかどうかの検査をします。 真か偽を返します。 bool strLT(char* s1, char* s2) =for hackers Found in file handy.h =item strNE X =begin original Test two strings to see if they are different. Returns true or false. =end original 二つの文字列が異なるかどうかを検査します。 真か偽を返します。 bool strNE(char* s1, char* s2) =for hackers Found in file handy.h =item strnEQ X =begin original Test two strings to see if they are equal. The C parameter indicates the number of bytes to compare. Returns true or false. (A wrapper for C). =end original 二つの文字列が等しいかどうかを検査します。 パラメーター C は、比較を行うバイト数を指定します。 真か偽を返します。 (C へのラッパーです) bool strnEQ(char* s1, char* s2, STRLEN len) =for hackers Found in file handy.h =item strnNE X =begin original Test two strings to see if they are different. The C parameter indicates the number of bytes to compare. Returns true or false. (A wrapper for C). =end original 二つの文字列が異なるかどうかを検査します。 パラメーター C は、比較を行うバイト数を指定します。 真か偽を返します。 (C へのラッパーです) bool strnNE(char* s1, char* s2, STRLEN len) =for hackers Found in file handy.h =item sv_destroyable X =begin original Dummy routine which reports that object can be destroyed when there is no sharing module present. It ignores its single SV argument, and returns 'true'. Exists to avoid test for a NULL function pointer and because it could potentially warn under some level of strict-ness. =end original 共有モジュールがないときにオブジェクトを破壊可能であると報告するダミー ルーチンです。 これは SV 引数を無視して、真を返します。 NULL 関数をテストして、あるレベルでの strict での潜在的な警告を 回避するために存在します。 bool sv_destroyable(SV *sv) =for hackers Found in file util.c =item sv_nosharing X =begin original Dummy routine which "shares" an SV when there is no sharing module present. Or "locks" it. Or "unlocks" it. In other words, ignores its single SV argument. Exists to avoid test for a NULL function pointer and because it could potentially warn under some level of strict-ness. =end original 共有モジュールがないときに SV を「共有する」ダミールーチンです。 あるいは「ロックします」。 あるいは「アンロックします」。 言い換えると、単一の SV 引数を無視します。 NULL 関数をテストして、あるレベルでの strict での潜在的な警告を 回避するために存在します。 void sv_nosharing(SV *sv) =for hackers Found in file util.c =item upg_version X =begin original In-place upgrade of the supplied SV to a version object. =end original SV をバージョンオブジェクトにその場で昇格します。 SV *sv = upg_version(SV *sv, bool qv); =begin original Returns a pointer to the upgraded SV. Set the boolean qv if you want to force this SV to be interpreted as an "extended" version. =end original 昇格された SV へのポインタを返します。 この SV が「拡張」版として解釈されることを強制したいなら、真偽値 qv を セットします。 SV* upg_version(SV *ver, bool qv) =for hackers Found in file util.c =item vcmp X =begin original Version object aware cmp. Both operands must already have been converted into version objects. =end original バージョンオブジェクトを認識する cmp。 両方のオペランドは既にバージョンオブジェクトに 変換されていなければなりません。 int vcmp(SV *lhv, SV *rhv) =for hackers Found in file util.c =item vnormal X =begin original Accepts a version object and returns the normalized string representation. Call like: =end original バージョンオブジェクトを受け付けて正規化された文字列表現を返します。 以下のように呼び出します: sv = vnormal(rv); =begin original NOTE: you can pass either the object directly or the SV contained within the RV. =end original 注意: オブジェクトを直接と、RV に含まれている SV のどちらでも渡せます。 SV* vnormal(SV *vs) =for hackers Found in file util.c =item vnumify X =begin original Accepts a version object and returns the normalized floating point representation. Call like: =end original バージョンオブジェクトを受け付けて正規化された浮動小数点表現を返します。 以下のように呼び出します: sv = vnumify(rv); =begin original NOTE: you can pass either the object directly or the SV contained within the RV. =end original 注意: オブジェクトを直接と、RV に含まれている SV のどちらでも渡せます。 SV* vnumify(SV *vs) =for hackers Found in file util.c =item vstringify X =begin original In order to maintain maximum compatibility with earlier versions of Perl, this function will return either the floating point notation or the multiple dotted notation, depending on whether the original version contained 1 or more dots, respectively. =end original 以前のバージョンの Perl との最大限の互換性を維持するために、この関数は 元のバージョンにドットが一つだけか複数あるかに依存して、浮動小数点表記か 複数ドット表記のどちらかを返します。 SV* vstringify(SV *vs) =for hackers Found in file util.c =item vverify X =begin original Validates that the SV contains valid internal structure for a version object. It may be passed either the version object (RV) or the hash itself (HV). If the structure is valid, it returns the HV. If the structure is invalid, it returns NULL. =end original SV がバージョンオブジェクトの正当な内部構造体を含んでいるかを検証します。 バージョンオブジェクト (RV) かハッシュ自身 (HV) のどちらかを渡せます。 構造体が正当なら、HV を返します。 構造体が不正なら、NULL を返します。 SV *hv = vverify(sv); =begin original Note that it only confirms the bare minimum structure (so as not to get confused by derived classes which may contain additional hash entries): =end original これは生の最小限の構造体だけを確認することに注意してください (従って 追加のハッシュエントリを含んでいるかもしれない派生クラスによって 混乱しません): SV* vverify(SV *vs) =for hackers Found in file util.c =back =head1 MRO Functions (MRO 関数) =over 8 =item mro_get_linear_isa X =begin original Returns either C or C for the given stash, dependant upon which MRO is in effect for that stash. The return value is a read-only AV*. =end original このスタッシュに対して MRO が有効かどうかに依存して、スタッシュに対する C か C のどちらかを 返します。 返り値は読み込み専用の AV* です。 =begin original You are responsible for C on the return value if you plan to store it anywhere semi-permanently (otherwise it might be deleted out from under you the next time the cache is invalidated). =end original 半永久的にどこかにこれを保管する計画がある場合、返り値に対する C に対して責任があります (さもなければ、次回キャッシュが無効化されるときに削除されるかもしれません)。 AV* mro_get_linear_isa(HV* stash) =for hackers Found in file mro.c =item mro_method_changed_in X =begin original Invalidates method caching on any child classes of the given stash, so that they might notice the changes in this one. =end original スタッシュの全ての子クラスのメソッドキャッシュを無効にして、これによる 変更が通知されます。 =begin original Ideally, all instances of C in perl source outside of C should be replaced by calls to this. =end original 理想的には、C の外側の perl ソースの C の全ての 実体はこれへの呼び出しで置き換えられるべきです。 =begin original Perl automatically handles most of the common ways a method might be redefined. However, there are a few ways you could change a method in a stash without the cache code noticing, in which case you need to call this method afterwards: =end original Perl はメソッドが再定義されるかもしれない一般的な方法のほとんどを自動的に 扱います。 しかしキャッシュコードが気付くことなくスタッシュのメソッドを変更する いくつかの方法があります; この場合後でこのメソッドを呼び出す必要があります: =begin original 1) Directly manipulating the stash HV entries from XS code. =end original 1) XS コードからスタッシュ HV エントリを直接操作する。 =begin original 2) Assigning a reference to a readonly scalar constant into a stash entry in order to create a constant subroutine (like constant.pm does). =end original 2) 読み込み専用スカラ定数へのリファレンスを、(constant.pm がしているように) 定数サブルーチンを作成するためにスタッシュエントリに代入する。 =begin original This same method is available from pure perl via, C. =end original 同じメソッドはピュア perl から C 経由で 利用可能です。 void mro_method_changed_in(HV* stash) =for hackers Found in file mro.c =back =head1 Multicall Functions (多重呼び出し関数) =over 8 =item dMULTICALL X =begin original Declare local variables for a multicall. See L. =end original 多重呼び出しのための局所変数を宣言します。 L を参照してください。 dMULTICALL; =for hackers Found in file cop.h =item MULTICALL X =begin original Make a lightweight callback. See L. =end original 軽量コールバックを作ります。 L を参照してください。 MULTICALL; =for hackers Found in file cop.h =item POP_MULTICALL X =begin original Closing bracket for a lightweight callback. See L. =end original 軽量コールバックのための大かっこを閉じます。 L を参照してください。 POP_MULTICALL; =for hackers Found in file cop.h =item PUSH_MULTICALL X =begin original Opening bracket for a lightweight callback. See L. =end original 軽量コールバックのための大かっこを開きます。 L を参照してください。 PUSH_MULTICALL; =for hackers Found in file cop.h =back =head1 Numeric functions (数値関数) =over 8 =item grok_bin X =begin original converts a string representing a binary number to numeric form. =end original 2 進数を表現した文字列を数値形式に変換します。 =begin original On entry I and I<*len> give the string to scan, I<*flags> gives conversion flags, and I should be NULL or a pointer to an NV. The scan stops at the end of the string, or the first invalid character. Unless C is set in I<*flags>, encountering an invalid character will also trigger a warning. On return I<*len> is set to the length of the scanned string, and I<*flags> gives output flags. =end original エントリ I と I<*len> はスキャンする文字列を指定し、I<*flags> は 変換フラグ、I は NULL か NV へのポインタです。 スキャンは文字列の末尾か、最初の不正な文字で停止します。 I<*flags> に C がセットされていなければ、不正な 文字に遭遇すると警告も引き起こされます。 返るときに、I<*len> はスキャンした文字列の長さにセットされ、 I<*flags> は出力フラグになります。 =begin original If the value is <= C it is returned as a UV, the output flags are clear, and nothing is written to I<*result>. If the value is > UV_MAX C returns UV_MAX, sets C in the output flags, and writes the value to I<*result> (or the value is discarded if I is NULL). =end original 値が <= C なら、出力フラグがクリアされ、I<*result> に何も書かない UV として返されます。 値が > UV_MAX なら、C は出力フラグに C をセットし、値を I<*result> に書き込んで、 UV_MAX を返します (あるいは I が NULL なら値は捨てられます)。 =begin original The binary number may optionally be prefixed with "0b" or "b" unless C is set in I<*flags> on entry. If C is set in I<*flags> then the binary number may use '_' characters to separate digits. =end original エントリの I<*flags> に C が セットされていなければ、2 進数にオプションとして "0b" または "b" を 前置できます。 I<*flags> で C がセットされていると、2 進数で 数値を区切るのに '_' 文字が使えます。 UV grok_bin(const char* start, STRLEN* len_p, I32* flags, NV *result) =for hackers Found in file numeric.c =item grok_hex X =begin original converts a string representing a hex number to numeric form. =end original 16 進数を表現した文字列を数値形式に変換します。 =begin original On entry I and I<*len> give the string to scan, I<*flags> gives conversion flags, and I should be NULL or a pointer to an NV. The scan stops at the end of the string, or the first invalid character. Unless C is set in I<*flags>, encountering an invalid character will also trigger a warning. On return I<*len> is set to the length of the scanned string, and I<*flags> gives output flags. =end original エントリ I と I<*len> はスキャンする文字列を指定し、I<*flags> は 変換フラグ、I は NULL か NV へのポインタです。 スキャンは文字列の末尾か、最初の不正な文字で停止します。 I<*flags> に C がセットされていなければ、不正な 文字に遭遇すると警告も引き起こされます。 返るときに、I<*len> はスキャンした文字列の長さにセットされ、 I<*flags> は出力フラグになります。 =begin original If the value is <= UV_MAX it is returned as a UV, the output flags are clear, and nothing is written to I<*result>. If the value is > UV_MAX C returns UV_MAX, sets C in the output flags, and writes the value to I<*result> (or the value is discarded if I is NULL). =end original 値が <= UV_MAX なら、出力フラグがクリアされ、I<*result> に何も書かない UV として返されます。 値が > UV_MAX なら、C は出力フラグに C をセットし、値を I<*result> に書き込んで、 UV_MAX を返します (あるいは I が NULL なら値は捨てられます)。 =begin original The hex number may optionally be prefixed with "0x" or "x" unless C is set in I<*flags> on entry. If C is set in I<*flags> then the hex number may use '_' characters to separate digits. =end original エントリの I<*flags> に C が セットされていなければ、16 進数にオプションとして "0x" または "x" を 前置できます。 I<*flags> で C がセットされていると、2 進数で 数値を区切るのに '_' 文字が使えます。 UV grok_hex(const char* start, STRLEN* len_p, I32* flags, NV *result) =for hackers Found in file numeric.c =item grok_number X =begin original Recognise (or not) a number. The type of the number is returned (0 if unrecognised), otherwise it is a bit-ORed combination of IS_NUMBER_IN_UV, IS_NUMBER_GREATER_THAN_UV_MAX, IS_NUMBER_NOT_INT, IS_NUMBER_NEG, IS_NUMBER_INFINITY, IS_NUMBER_NAN (defined in perl.h). =end original 数値を認識します(またはしません)。 数値の型(認識されなかった場合は 0)が返され、さもなければ (perl.h に定義されている) IS_NUMBER_IN_UV, IS_NUMBER_GREATER_THAN_UV_MAX, IS_NUMBER_NOT_INT, IS_NUMBER_NEG, IS_NUMBER_INFINITY, IS_NUMBER_NAN を ビット単位で OR したものです。 =begin original If the value of the number can fit an in UV, it is returned in the *valuep IS_NUMBER_IN_UV will be set to indicate that *valuep is valid, IS_NUMBER_IN_UV will never be set unless *valuep is valid, but *valuep may have been assigned to during processing even though IS_NUMBER_IN_UV is not set on return. If valuep is NULL, IS_NUMBER_IN_UV will be set for the same cases as when valuep is non-NULL, but no actual assignment (or SEGV) will occur. =end original 数値の値が UV に収まるなら、*valuep に返され、*valuep が有効であることを 示すために IS_NUMBER_IN_UV がセットされます; *valuep が有効でなければ IS_NUMBER_IN_UV がセットされることはありませんが、返る時点で IS_NUMBER_IN_UV がセットされていないとしても、処理中に *valuep に値が 代入されるかもしれません。 valuep が NULL なら、valuep が非 NULL の場合と同様に IS_NUMBER_IN_UV が セットされますが、実際の代入(または SEGV)は起こりません。 =begin original IS_NUMBER_NOT_INT will be set with IS_NUMBER_IN_UV if trailing decimals were seen (in which case *valuep gives the true value truncated to an integer), and IS_NUMBER_NEG if the number is negative (in which case *valuep holds the absolute value). IS_NUMBER_IN_UV is not set if e notation was used or the number is larger than a UV. =end original 引き続く数字がある(この場合 *valuep には整数に切り詰められた真の値が入ります) の場合、IS_NUMBER_NOT_INT が IS_NUMBER_IN_UV と共にセットされ、値が負数 (この場合 *value には絶対値が入ります)の場合、IS_NUMBER_NEG が セットされます。 e 記法が使われたり数値が UV よりも大きいなら、IS_NUMBER_IN_UV は セットされません。 int grok_number(const char *pv, STRLEN len, UV *valuep) =for hackers Found in file numeric.c =item grok_numeric_radix X =begin original Scan and skip for a numeric decimal separator (radix). =end original 小数点をスキャンして、読み飛ばします。 bool grok_numeric_radix(const char **sp, const char *send) =for hackers Found in file numeric.c =item grok_oct X =begin original converts a string representing an octal number to numeric form. =end original 8 進数を表現した文字列を数値形式に変換します。 =begin original On entry I and I<*len> give the string to scan, I<*flags> gives conversion flags, and I should be NULL or a pointer to an NV. The scan stops at the end of the string, or the first invalid character. Unless C is set in I<*flags>, encountering an 8 or 9 will also trigger a warning. On return I<*len> is set to the length of the scanned string, and I<*flags> gives output flags. =end original エントリ I と I<*len> はスキャンする文字列を指定し、I<*flags> は 変換フラグ、I は NULL か NV へのポインタです。 スキャンは文字列の末尾か、最初の不正な文字で停止します。 I<*flags> に C がセットされていなければ、 8 または 9 に遭遇すると警告も引き起こされます。 返るときに、I<*len> はスキャンした文字列の長さにセットされ、 I<*flags> は出力フラグになります。 =begin original If the value is <= UV_MAX it is returned as a UV, the output flags are clear, and nothing is written to I<*result>. If the value is > UV_MAX C returns UV_MAX, sets C in the output flags, and writes the value to I<*result> (or the value is discarded if I is NULL). =end original 値が <= UV_MAX なら、出力フラグがクリアされ、I<*result> に何も書かない UV として返されます。 値が > UV_MAX なら、C は出力フラグに C をセットし、値を I<*result> に書き込んで、 UV_MAX を返します (あるいは I が NULL なら値は捨てられます)。 =begin original If C is set in I<*flags> then the octal number may use '_' characters to separate digits. =end original I<*flags> で C が設定されると、8 進数は 数値を区切るのに '_' 文字を使えます。 UV grok_oct(const char* start, STRLEN* len_p, I32* flags, NV *result) =for hackers Found in file numeric.c =item Perl_signbit X =begin original Return a non-zero integer if the sign bit on an NV is set, and 0 if it is not. =end original もし NV の符号ビットがセットされていれば非 0 の整数を、そうでなければ 0 を返します。 =begin original If Configure detects this system has a signbit() that will work with our NVs, then we just use it via the #define in perl.h. Otherwise, fall back on this implementation. As a first pass, this gets everything right except -0.0. Alas, catching -0.0 is the main use for this function, so this is not too helpful yet. Still, at least we have the scaffolding in place to support other systems, should that prove useful. =end original Configure は、このシステムの NV に動作する signbit() が持っていることを 検出します; それから単にこれを perl.h の #define 経由で使います。 さもなければ、この実装にフォールバックします。 第 1 パスとして、これは -0.0 以外の全てを取ります。 悲しいかな、-0.0 の捕捉はこの関数の主な使用法なので、これはまだあまり 役には立ちません。 それでも、少なくとも便利であるとわかる他のシステムに対応する足場になります。 =begin original Configure notes: This function is called 'Perl_signbit' instead of a plain 'signbit' because it is easy to imagine a system having a signbit() function or macro that doesn't happen to work with our particular choice of NVs. We shouldn't just re-#define signbit as Perl_signbit and expect the standard system headers to be happy. Also, this is a no-context function (no pTHX_) because Perl_signbit() is usually re-#defined in perl.h as a simple macro call to the system's signbit(). Users should just always call Perl_signbit(). =end original Configure の注意: この関数は、単なる 'signbit' ではなく 'Perl_signbit' と 呼ばれます; なぜなら たまたま NV の特定の選択で動作しない signbit() 関数やマクロを持つシステムを 想像するのは容易だからです。 単に signbit を Perl_signbit と再 #define して、標準システムヘッダがうまく 動くことを想定するべきではありません。 また、これは(pTHX_ なしの)コンテキストなし関数はありません; なぜなら Perl_signbit() は通常 perl.h でシステムの signbit() への単純なマクロ 呼び出しに再 #defined されるからです。 ユーザーは単に常に Perl_signbit() を呼び出してください。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 int Perl_signbit(NV f) =for hackers Found in file numeric.c =item scan_bin X =begin original For backwards compatibility. Use C instead. =end original 後方互換性のためのものです。 代わりに C を使ってください。 NV scan_bin(const char* start, STRLEN len, STRLEN* retlen) =for hackers Found in file numeric.c =item scan_hex X =begin original For backwards compatibility. Use C instead. =end original 後方互換性のためのものです。 代わりに C を使ってください。 NV scan_hex(const char* start, STRLEN len, STRLEN* retlen) =for hackers Found in file numeric.c =item scan_oct X =begin original For backwards compatibility. Use C instead. =end original 後方互換性のためのものです。 代わりに C を使ってください。 NV scan_oct(const char* start, STRLEN len, STRLEN* retlen) =for hackers Found in file numeric.c =back =head1 Optree Manipulation Functions (演算木操作関数) =over 8 =item cv_const_sv X =begin original If C is a constant sub eligible for inlining. returns the constant value returned by the sub. Otherwise, returns NULL. =end original C がインライン化可能な定数サブルーチンなら、サブルーチンから返される 定数値を返します。 さもなければ NULL を返します。 =begin original Constant subs can be created with C or as described in L. =end original 定数サブルーチンは C か、L で 記述されている方法で作成されます。 SV* cv_const_sv(const CV *const cv) =for hackers Found in file op.c =item newCONSTSUB X =begin original Creates a constant sub equivalent to Perl C which is eligible for inlining at compile-time. =end original Perl での C と等価な定数サブルーチンを生成します。 =begin original Passing NULL for SV creates a constant sub equivalent to C, which won't be called if used as a destructor, but will suppress the overhead of a call to C. (This form, however, isn't eligible for inlining at compile time.) =end original SV に NULL を渡すと、C と等価な定数サブルーチンを作成します; これはデストラクタとして使われると呼び出されないませんが、 C の呼び出しによるオーバーヘッドを避けられます。 (しかし、この形式はコンパイル時のインライン化の対象ではありません。) CV* newCONSTSUB(HV* stash, const char* name, SV* sv) =for hackers Found in file op.c =item newXS X =begin original Used by C to hook up XSUBs as Perl subs. I needs to be static storage, as it is used directly as CvFILE(), without a copy being made. =end original Perl サブルーチンのように XSUB をフックするために C が使います。 I は静的なストレージである必要があります; なぜならこれはコピーされることなく直接 CvFILE() で使われるからです。 =for hackers Found in file op.c =back =head1 Per-Interpreter Variables (インタプリタ単位変数) =over 8 =item PL_modglobal X =begin original C 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. =end original C は、汎用の、インタプリタグローバルの HV で、 インタプリタ毎の情報を保持するような エクステンションによって使われるものです。 場合によっては、データの共有をおこなうために エクステンションのシンボルテーブルとして使うことも可能です。 エクステンションのパッケージ名を、エクステンション固有のデータの名前の 接頭辞として使うのは良い考えです。 HV* PL_modglobal =for hackers Found in file intrpvar.h =item PL_na X =begin original A convenience variable which is typically used with C 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 C macro. =end original 文字列の長さについて考慮しないような場合の C と共に使われるような 変数です。 通常はローカル変数を宣言してそれを使うか、 C マクロを使った方が効率が良いです。 STRLEN PL_na =for hackers Found in file intrpvar.h =item PL_opfreehook X =begin original When non-C, the function pointed by this variable will be called each time an OP is freed with the corresponding OP as the argument. This allows extensions to free any extra attribute they have locally attached to an OP. It is also assured to first fire for the parent OP and then for its kids. =end original 非 C の場合、この変数で指定された関数は、OP が解放されるたびに、 対応する OP を引数として呼び出されます。 これにより、エクステンションは OP にローカルに付加した余分な属性を 解放することができます。 最初に親 OP を起動し、次に子OPを起動することも保証されます。 =begin original When you replace this variable, it is considered a good practice to store the possibly previously installed hook and that you recall it inside your own. =end original この変数を置き換えるときは、以前に設定されていたフックを保管しておいて 自分自身の中でそれを呼び出すという良い習慣を考慮してください。 Perl_ophook_t PL_opfreehook =for hackers Found in file intrpvar.h =item PL_sv_no X =begin original This is the C SV. See C. Always refer to this as C<&PL_sv_no>. =end original これは C の SV です。 C を参照してください。 常に C<&PL_sv_no> として参照してください。 SV PL_sv_no =for hackers Found in file intrpvar.h =item PL_sv_undef X =begin original This is the C SV. Always refer to this as C<&PL_sv_undef>. =end original これは C SV です。 常に C<&PL_sv_undef> として参照してください。 SV PL_sv_undef =for hackers Found in file intrpvar.h =item PL_sv_yes X =begin original This is the C SV. See C. Always refer to this as C<&PL_sv_yes>. =end original これは C SV です。 C を参照してくさい。 これは常に C<&PL_sv_yes> として参照してください。 SV PL_sv_yes =for hackers Found in file intrpvar.h =back =head1 REGEXP Functions (正規表現関数) =over 8 =item SvRX X =begin original Convenience macro to get the REGEXP from a SV. This is approximately equivalent to the following snippet: =end original SV から REGEXP を得るための便利なマクロです。 これはほぼ以下のコード片と等価です: if (SvMAGICAL(sv)) mg_get(sv); if (SvROK(sv)) sv = MUTABLE_SV(SvRV(sv)); if (SvTYPE(sv) == SVt_REGEXP) return (REGEXP*) sv; =begin original NULL will be returned if a REGEXP* is not found. =end original もし REGEXP* が見つからなければ NULL を返します。 REGEXP * SvRX(SV *sv) =for hackers Found in file regexp.h =item SvRXOK X =begin original Returns a boolean indicating whether the SV (or the one it references) is a REGEXP. =end original SV が (またはそれが参照しているもの) が REGEXPかどうかを示す 真偽値を返します。 =begin original If you want to do something with the REGEXP* later use SvRX instead and check for NULL. =end original 後で REGEXP* で何かをしたいなら、代わりに SvRX を使って、NULL を チェックしてください。 bool SvRXOK(SV* sv) =for hackers Found in file regexp.h =back =head1 Simple Exception Handling Macros (単純な例外処理マクロ) =over 8 =item dXCPT X =begin original Set up necessary local variables for exception handling. See L. =end original 例外処理のために必要なローカル変数を設定します。 L を参照してください。 dXCPT; =for hackers Found in file XSUB.h =item XCPT_CATCH X =begin original Introduces a catch block. See L. =end original catch ブロックを導入します。 L を参照してください。 =for hackers Found in file XSUB.h =item XCPT_RETHROW X =begin original Rethrows a previously caught exception. See L. =end original 以前に捕捉した例外を再 throw します。 L を参照してください。 XCPT_RETHROW; =for hackers Found in file XSUB.h =item XCPT_TRY_END X =begin original Ends a try block. See L. =end original try ブロックを終了します。 L を参照してください。 =for hackers Found in file XSUB.h =item XCPT_TRY_START X =begin original Starts a try block. See L. =end original try ブロックを開始します。 L を参照してください。 =for hackers Found in file XSUB.h =back =head1 Stack Manipulation Macros (スタック操作マクロ) =over 8 =item dMARK X =begin original Declare a stack marker variable, C, for the XSUB. See C and C. =end original スタックマーカー変数 C を XSUB のために宣言します。 C と C を参照してください。 dMARK; =for hackers Found in file pp.h =item dORIGMARK X =begin original Saves the original stack mark for the XSUB. See C. =end original XSUB のためのオリジナルのスタックマークを保存します。 C を参照してください。 dORIGMARK; =for hackers Found in file pp.h =item dSP X =begin original Declares a local copy of perl's stack pointer for the XSUB, available via the C macro. See C. =end original マクロ C を使ってアクセス可能な XSUB のためのスタックポインタのローカルな コピーを宣言します。 C を参照してください。 dSP; =for hackers Found in file pp.h =item EXTEND X =begin original Used to extend the argument stack for an XSUB's return values. Once used, guarantees that there is room for at least C to be pushed onto the stack. =end original XSUB の戻り値のために引数スタックを拡張するのに使われます。 一度使うと、少なくとも C をスタックにプッシュするだけの空きが 出来ます。 void EXTEND(SP, int nitems) =for hackers Found in file pp.h =item MARK X =begin original Stack marker variable for the XSUB. See C. =end original XSUB に対するスタックマーカーの変数です。 C を参照してください。 =for hackers Found in file pp.h =item mPUSHi X =begin original Push an integer onto the stack. The stack must have room for this element. Does not use C. See also C, C and C. =end original 整数をスタックにプッシュします。 スタックにはこの要素を収めるだけの空きがなければなりません。 C を使いません。 C, C, C も参照してください。 void mPUSHi(IV iv) =for hackers Found in file pp.h =item mPUSHn X =begin original Push a double onto the stack. The stack must have room for this element. Does not use C. See also C, C and C. =end original 倍精度実数をスタックにプッシュします。 スタックにはこの要素を収めるだけの空きがなければなりません。 C を使いません。 C, C, C も参照してください。 void mPUSHn(NV nv) =for hackers Found in file pp.h =item mPUSHp X =begin original Push a string onto the stack. The stack must have room for this element. The C indicates the length of the string. Does not use C. See also C, C and C. =end original 文字列をスタックにプッシュします。 スタックにはこの要素を収めるだけの空きがなければなりません。 C は文字列の長さを示します。 C を使いません。 C, C, C も参照してください。 void mPUSHp(char* str, STRLEN len) =for hackers Found in file pp.h =item mPUSHs X =begin original Push an SV onto the stack and mortalizes the SV. The stack must have room for this element. Does not use C. See also C and C. =end original SV をスタックにプッシュして SV を揮発化します。 スタックにはこの要素を収めるだけの空きがなければなりません。 C を使いません。 C と C も参照してください。 void mPUSHs(SV* sv) =for hackers Found in file pp.h =item mPUSHu X =begin original Push an unsigned integer onto the stack. The stack must have room for this element. Does not use C. See also C, C and C. =end original 符号なし整数をスタックにプッシュします。 スタックにはこの要素を収めるだけの空きがなければなりません。 C を使いません。 C, C, C も参照してください。 void mPUSHu(UV uv) =for hackers Found in file pp.h =item mXPUSHi X =begin original Push an integer onto the stack, extending the stack if necessary. Does not use C. See also C, C and C. =end original 整数をスタックにプッシュし、必要があればスタックを拡張します。 C を使いません。 C, C, C も参照してください。 void mXPUSHi(IV iv) =for hackers Found in file pp.h =item mXPUSHn X =begin original Push a double onto the stack, extending the stack if necessary. Does not use C. See also C, C and C. =end original 倍精度数値をスタックにプッシュし、必要があればスタックを拡張します。 C を使いません。 C, C, C も参照してください。 void mXPUSHn(NV nv) =for hackers Found in file pp.h =item mXPUSHp X =begin original Push a string onto the stack, extending the stack if necessary. The C indicates the length of the string. Does not use C. See also C, C and C. =end original 文字列をスタックにプッシュし、必要があればスタックを拡張します。 C は文字列の長さを示します。 C を使いません。 C, C, C も参照してください。 void mXPUSHp(char* str, STRLEN len) =for hackers Found in file pp.h =item mXPUSHs X =begin original Push an SV onto the stack, extending the stack if necessary and mortalizes the SV. Does not use C. See also C and C. =end original 必要があればスタックを拡張し、SV をスタックにプッシュして、SV を 揮発化します。 C を使いません。 C と C も参照してください。 void mXPUSHs(SV* sv) =for hackers Found in file pp.h =item mXPUSHu X =begin original Push an unsigned integer onto the stack, extending the stack if necessary. Does not use C. See also C, C and C. =end original 符号なし整数をスタックにプッシュし、必要があればスタックを拡張します。 C を使いません。 C, C, C も参照してください。 void mXPUSHu(UV uv) =for hackers Found in file pp.h =item ORIGMARK X =begin original The original stack mark for the XSUB. See C. =end original XSUB のためのオリジナルスタックマークです。 C を参照してください。 =for hackers Found in file pp.h =item POPi X =begin original Pops an integer off the stack. =end original スタックから整数をポップします。 IV POPi =for hackers Found in file pp.h =item POPl X =begin original Pops a long off the stack. =end original スタックから long をポップします。 long POPl =for hackers Found in file pp.h =item POPn X =begin original Pops a double off the stack. =end original スタックから倍精度実数をポップします。 NV POPn =for hackers Found in file pp.h =item POPp X =begin original Pops a string off the stack. Deprecated. New code should use POPpx. =end original スタックから文字列をポップします。 廃止予定です。 新しいコードは POPpx を使うべきです。 char* POPp =for hackers Found in file pp.h =item POPpbytex X =begin original Pops a string off the stack which must consist of bytes i.e. characters < 256. =end original バイト列で構成されていなければならない(つまり文字 < 256 な)文字列を スタックからポップします。 char* POPpbytex =for hackers Found in file pp.h =item POPpx X =begin original Pops a string off the stack. =end original スタックから文字列をポップします。 char* POPpx =for hackers Found in file pp.h =item POPs X =begin original Pops an SV off the stack. =end original スタックから SV をポップします。 SV* POPs =for hackers Found in file pp.h =item PUSHi X =begin original Push an integer onto the stack. The stack must have room for this element. Handles 'set' magic. Uses C, so C or C should be called to declare it. Do not call multiple C-oriented macros to return lists from XSUB's - see C instead. See also C and C. =end original 整数をスタックにプッシュします。 スタックにはこの要素を収めるだけの空きがなければなりません。 'set' magic をハンドルします。 C を使うので、これを宣言するために C または C が 呼び出されるべきです。 XSUB からリストを返すために複数回 C 指向のマクロを 呼び出さないでください - 代わりに C を参照してください。 C と C も参照してください。 void PUSHi(IV iv) =for hackers Found in file pp.h =item PUSHMARK X =begin original Opening bracket for arguments on a callback. See C and L. =end original コールバックにある引数のためのブラケットを開きます。 C と L を参照してください。 void PUSHMARK(SP) =for hackers Found in file pp.h =item PUSHmortal X =begin original Push a new mortal SV onto the stack. The stack must have room for this element. Does not use C. See also C, C and C. =end original 新しい揮発性の SV をスタックにプッシュします。 スタックにはこの要素を収めるだけの空きがなければなりません。 C を使いません。 C, C, C も参照してください。 void PUSHmortal() =for hackers Found in file pp.h =item PUSHn X =begin original Push a double onto the stack. The stack must have room for this element. Handles 'set' magic. Uses C, so C or C should be called to declare it. Do not call multiple C-oriented macros to return lists from XSUB's - see C instead. See also C and C. =end original 倍精度実数をスタックにプッシュします。 スタックにはこの要素を収めるだけの空きがなければなりません。 'set' magic をハンドルします。 C を使うので、これを宣言するために C または C が 呼び出されるべきです。 XSUB からリストを返すために複数回 C 指向のマクロを 呼び出さないでください - 代わりに C を参照してください。 C と C も参照してください。 void PUSHn(NV nv) =for hackers Found in file pp.h =item PUSHp X =begin original Push a string onto the stack. The stack must have room for this element. The C indicates the length of the string. Handles 'set' magic. Uses C, so C or C should be called to declare it. Do not call multiple C-oriented macros to return lists from XSUB's - see C instead. See also C and C. =end original 文字列をスタックにプッシュします。 スタックにはこの要素を収めるだけの空きがなければなりません。 C は文字列の長さを示します。 'set' magic をハンドルします。 C を使うので、これを宣言するために C または C が 呼び出されるべきです。 XSUB からリストを返すために複数回 C 指向のマクロを 呼び出さないでください - 代わりに C を参照してください。 C と C も参照してください。 void PUSHp(char* str, STRLEN len) =for hackers Found in file pp.h =item PUSHs X =begin original Push an SV onto the stack. The stack must have room for this element. Does not handle 'set' magic. Does not use C. See also C, C and C. =end original SV をスタックへプッシュします。 スタックにはこの要素を収めるだけの空きがなければなりません。 'set' magic をハンドルしません。 C を使いません。 C, C, C も参照してください。 void PUSHs(SV* sv) =for hackers Found in file pp.h =item PUSHu X =begin original Push an unsigned integer onto the stack. The stack must have room for this element. Handles 'set' magic. Uses C, so C or C should be called to declare it. Do not call multiple C-oriented macros to return lists from XSUB's - see C instead. See also C and C. =end original 符号なし整数をスタックにプッシュします。 スタックにはこの要素を収めるだけの空きがなければなりません。 'set' magic をハンドルします。 C を使うので、これを宣言するために C または C が 呼び出されるべきです。 XSUB からリストを返すために複数回 C 指向のマクロを 呼び出さないでください - 代わりに C を参照してください。 C と C も参照してください。 void PUSHu(UV uv) =for hackers Found in file pp.h =item PUTBACK X =begin original Closing bracket for XSUB arguments. This is usually handled by C. See C and L for other uses. =end original XSUB 引数のためのブラケットを閉じます。 これは通常、C によって扱われます。 他の使い方については Cと L を参照してください。 PUTBACK; =for hackers Found in file pp.h =item SP X =begin original Stack pointer. This is usually handled by C. See C and C. =end original スタックポインタです。 これは通常、C によって扱われます。 C と C を参照してください。 =for hackers Found in file pp.h =item SPAGAIN X =begin original Refetch the stack pointer. Used after a callback. See L. =end original スタックポインタの再フェッチします。 コールバックの後で使われます。 L を参照してください。 SPAGAIN; =for hackers Found in file pp.h =item XPUSHi X =begin original Push an integer onto the stack, extending the stack if necessary. Handles 'set' magic. Uses C, so C or C should be called to declare it. Do not call multiple C-oriented macros to return lists from XSUB's - see C instead. See also C and C. =end original 整数をスタックにプッシュし、必要があればスタックを拡張します。 'set' magic をハンドルします。 C を使うので、これを宣言するために C または C が 呼び出されるべきです。 XSUB からリストを返すために複数回 C 指向のマクロを 呼び出さないでください - 代わりに C を参照してください。 C と C も参照してください。 void XPUSHi(IV iv) =for hackers Found in file pp.h =item XPUSHmortal X =begin original Push a new mortal SV onto the stack, extending the stack if necessary. Does not use C. See also C, C and C. =end original 必要ならスタックを拡張して、新しく揮発性の SV をスタックにプッシュします。 C を使いません。 C, C, C も参照してください。 void XPUSHmortal() =for hackers Found in file pp.h =item XPUSHn X =begin original Push a double onto the stack, extending the stack if necessary. Handles 'set' magic. Uses C, so C or C should be called to declare it. Do not call multiple C-oriented macros to return lists from XSUB's - see C instead. See also C and C. =end original 倍精度数値をスタックにプッシュし、必要があればスタックを拡張します。 'set' magic をハンドルします。 C を使うので、これを宣言するために C または C が 呼び出されるべきです。 XSUB からリストを返すために複数回 C 指向のマクロを 呼び出さないでください - 代わりに C を参照してください。 C と C も参照してください。 void XPUSHn(NV nv) =for hackers Found in file pp.h =item XPUSHp X =begin original Push a string onto the stack, extending the stack if necessary. The C indicates the length of the string. Handles 'set' magic. Uses C, so C or C should be called to declare it. Do not call multiple C-oriented macros to return lists from XSUB's - see C instead. See also C and C. =end original 文字列をスタックにプッシュし、必要があればスタックを拡張します。 C は文字列の長さを示します。 'set' magic をハンドルします。 C を使うので、これを宣言するために C または C が 呼び出されるべきです。 XSUB からリストを返すために複数回 C 指向のマクロを 呼び出さないでください - 代わりに C を参照してください。 C と C も参照してください。 void XPUSHp(char* str, STRLEN len) =for hackers Found in file pp.h =item XPUSHs X =begin original Push an SV onto the stack, extending the stack if necessary. Does not handle 'set' magic. Does not use C. See also C, C and C. =end original SV をスタックにプッシュし、必要があればスタックを拡張します。 'set' magic をハンドルしません。 C を使いません。 C, C, C も参照してください。 void XPUSHs(SV* sv) =for hackers Found in file pp.h =item XPUSHu X =begin original Push an unsigned integer onto the stack, extending the stack if necessary. Handles 'set' magic. Uses C, so C or C should be called to declare it. Do not call multiple C-oriented macros to return lists from XSUB's - see C instead. See also C and C. =end original 符号なし整数をスタックにプッシュし、必要があればスタックを拡張します。 'set' magic をハンドルします。 C を使うので、これを宣言するために C または C が 呼び出されるべきです。 XSUB からリストを返すために複数回 C 指向のマクロを 呼び出さないでください - 代わりに C を参照してください。 C と C も参照してください。 void XPUSHu(UV uv) =for hackers Found in file pp.h =item XSRETURN X =begin original Return from XSUB, indicating number of items on the stack. This is usually handled by C. =end original XSUB から戻され、スタックにあるアイテムの数を示します。 これは通常、C によって扱われます。 void XSRETURN(int nitems) =for hackers Found in file XSUB.h =item XSRETURN_EMPTY X =begin original Return an empty list from an XSUB immediately. =end original XSUB から即座に空リストを返します。 XSRETURN_EMPTY; =for hackers Found in file XSUB.h =item XSRETURN_IV X =begin original Return an integer from an XSUB immediately. Uses C. =end original XSUB から即座に整数を返します。 C を使います。 void XSRETURN_IV(IV iv) =for hackers Found in file XSUB.h =item XSRETURN_NO X =begin original Return C<&PL_sv_no> from an XSUB immediately. Uses C. =end original XSUB から即座に C<&PL_sv_no> を返します。 C を使います。 XSRETURN_NO; =for hackers Found in file XSUB.h =item XSRETURN_NV X =begin original Return a double from an XSUB immediately. Uses C. =end original XSUB から即座に倍精度数値を返します。 C を使います。 void XSRETURN_NV(NV nv) =for hackers Found in file XSUB.h =item XSRETURN_PV X =begin original Return a copy of a string from an XSUB immediately. Uses C. =end original XSUB から即座に文字列のコピーを返します。 C を使います。 void XSRETURN_PV(char* str) =for hackers Found in file XSUB.h =item XSRETURN_UNDEF X =begin original Return C<&PL_sv_undef> from an XSUB immediately. Uses C. =end original XSUB から即座に C<&PL_sv_undef> を返します。 C を使います。 XSRETURN_UNDEF; =for hackers Found in file XSUB.h =item XSRETURN_UV X =begin original Return an integer from an XSUB immediately. Uses C. =end original XSUB から即座に整数を返します。 C を使います。 void XSRETURN_UV(IV uv) =for hackers Found in file XSUB.h =item XSRETURN_YES X =begin original Return C<&PL_sv_yes> from an XSUB immediately. Uses C. =end original XSUB から即座に C<&PL_sv_yes> を返します。 C を使います。 XSRETURN_YES; =for hackers Found in file XSUB.h =item XST_mIV X =begin original Place an integer into the specified position C on the stack. The value is stored in a new mortal SV. =end original 整数値をスタックの C で指定される場所に置きます。 その値は新しい揮発性 SV (mortal SV) に格納されます。 void XST_mIV(int pos, IV iv) =for hackers Found in file XSUB.h =item XST_mNO X =begin original Place C<&PL_sv_no> into the specified position C on the stack. =end original C<&PL_sv_no> をスタックの C で指定される場所に置きます。 void XST_mNO(int pos) =for hackers Found in file XSUB.h =item XST_mNV X =begin original Place a double into the specified position C on the stack. The value is stored in a new mortal SV. =end original 倍精度数値をスタックの C で指定される場所に置きます。 その値は新しい揮発性 SV (mortal SV) に格納されます。 void XST_mNV(int pos, NV nv) =for hackers Found in file XSUB.h =item XST_mPV X =begin original Place a copy of a string into the specified position C on the stack. The value is stored in a new mortal SV. =end original 文字列のコピーをスタックの C で指定される場所に置きます。 その値は新しい揮発性 SV (mortal SV) に格納されます。 void XST_mPV(int pos, char* str) =for hackers Found in file XSUB.h =item XST_mUNDEF X =begin original Place C<&PL_sv_undef> into the specified position C on the stack. =end original C<&PL_sv_undef> をスタックの C で指定される場所に置きます。 void XST_mUNDEF(int pos) =for hackers Found in file XSUB.h =item XST_mYES X =begin original Place C<&PL_sv_yes> into the specified position C on the stack. =end original C<&PL_sv_yes> をスタックの C で指定される場所に置きます。 void XST_mYES(int pos) =for hackers Found in file XSUB.h =back =head1 SV Flags (SV フラグ) =over 8 =item svtype X =begin original An enum of flags for Perl types. These are found in the file B in the C enum. Test these flags with the C macro. =end original Perl の型のためのフラグの列挙です。 B というファイル中の C という列挙にあります。 これらのフラグは、C というマクロを使って検査を行います。 =for hackers Found in file sv.h =item SVt_IV X =begin original Integer type flag for scalars. See C. =end original スカラに対する整数型。 C を参照してください。 =for hackers Found in file sv.h =item SVt_NV X =begin original Double type flag for scalars. See C. =end original スカラに対する倍精度の型フラグ。 C を参照してください。 =for hackers Found in file sv.h =item SVt_PV X =begin original Pointer type flag for scalars. See C. =end original スカラに対するポインタ型。 C を参照してください。 =for hackers Found in file sv.h =item SVt_PVAV X =begin original Type flag for arrays. See C. =end original 配列に対する型フラグ。 C を参照してください。 =for hackers Found in file sv.h =item SVt_PVCV X =begin original Type flag for code refs. See C. =end original コードリファレンスのための型フラグ。 C を参照してください。 =for hackers Found in file sv.h =item SVt_PVHV X =begin original Type flag for hashes. See C. =end original ハッシュに対する型フラグ。 C を参照してください。 =for hackers Found in file sv.h =item SVt_PVMG X =begin original Type flag for blessed scalars. See C. =end original blessされたスカラに対する型フラグ。 C を参照してください。 =for hackers Found in file sv.h =back =head1 SV Manipulation Functions (SV 操作関数) =over 8 =item croak_xs_usage X =begin original A specialised variant of C for emitting the usage message for xsubs =end original xsubs のための使用法メッセージを出力するために専門化された C croak_xs_usage(cv, "eee_yow"); =begin original works out the package name and subroutine name from C, and then calls C. Hence if C is C<&ouch::awk>, it would call C as: =end original C からパッケージ名とサブルーチン名を取り出して、C を 呼び出します。 従って C が C<&ouch::awk> なら、C を以下のようにして呼び出します: Perl_croak(aTHX_ "Usage: %s::%s(%s)", "ouch" "awk", "eee_yow"); void croak_xs_usage(const CV *const cv, const char *const params) =for hackers Found in file universal.c =item get_sv X =begin original Returns the SV of the specified Perl scalar. C are passed to C. If C is set and the Perl variable does not exist then it will be created. If C is zero and the variable does not exist then NULL is returned. =end original 指定された Perl スカラの SV を返します。 C は C に渡されます。 C がセットされていて、指定された変数が存在していなければ、新たに 生成されます。 C がゼロで、かつ、指定された変数がなかった場合には NULL が返されます。 =begin original NOTE: the perl_ form of this function is deprecated. =end original 注意: この関数の perl_ の形は廃止予定です。 SV* get_sv(const char *name, I32 flags) =for hackers Found in file perl.c =item newRV_inc X =begin original Creates an RV wrapper for an SV. The reference count for the original SV is incremented. =end original SV に対する RV ラッパーを生成します。 元の SV の参照カウントはインクリメントされます。 SV* newRV_inc(SV* sv) =for hackers Found in file sv.h =item newSVpvn_utf8 X =begin original Creates a new SV and copies a string into it. If utf8 is true, calls C on the new SV. Implemented as a wrapper around C. =end original 新たな SV を生成し、文字列をそこにコピーします。 utf8 が真なら、新しい SV に対して C を呼び出します。 C へのラッパとして実装されています。 SV* newSVpvn_utf8(NULLOK const char* s, STRLEN len, U32 utf8) =for hackers Found in file sv.h =item SvCUR X =begin original Returns the length of the string which is in the SV. See C. =end original SV にある文字列の長さを返します。 C を参照してください。 STRLEN SvCUR(SV* sv) =for hackers Found in file sv.h =item SvCUR_set X =begin original Set the current length of the string which is in the SV. See C and C. =end original SV にある文字列の現在の長さを設定します。 C を参照してください。 void SvCUR_set(SV* sv, STRLEN len) =for hackers Found in file sv.h =item SvEND X =begin original Returns a pointer to the last character in the string which is in the SV. See C. Access the character as *(SvEND(sv)). =end original SV にある文字列の終端のキャラクタへのポインタを返します。 C を参照してください。 文字へは *(SvEND(sv)) としてアクセスします。 char* SvEND(SV* sv) =for hackers Found in file sv.h =item SvGAMAGIC X =begin original Returns true if the SV has get magic or overloading. If either is true then the scalar is active data, and has the potential to return a new value every time it is accessed. Hence you must be careful to only read it once per user logical operation and work with that returned value. If neither is true then the scalar's value cannot change unless written to. =end original SV が get magic かオーバーロードであれば真を返します。 どちらかが真なら、スカラはアクティブなデータで、アクセスされる度に新しい値を 返す可能性があります。 従って、ユーザーの論理的な操作につき一回だけ読み込んで、返された値に対して 作業をするように注意しなければなりません。 どちらも真でなければ、書き込まれるまでスカラの値は変更できません。 U32 SvGAMAGIC(SV* sv) =for hackers Found in file sv.h =item SvGROW X =begin original 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 C to perform the expansion if necessary. Returns a pointer to the character buffer. =end original 指定されたバイト数だけの空間があるように SV にある文字バッファを拡張します (予約分の空間は NUL 文字で埋められることを思い出してください)。 必要であれば、拡張のために C を呼び出します。 文字バッファへのポインタを返します。 char * SvGROW(SV* sv, STRLEN len) =for hackers Found in file sv.h =item SvIOK X =begin original Returns a U32 value indicating whether the SV contains an integer. =end original SV が整数を含んでいるかどうかを表わす U32 値を返します。 U32 SvIOK(SV* sv) =for hackers Found in file sv.h =item SvIOKp X =begin original Returns a U32 value indicating whether the SV contains an integer. Checks the B setting. Use C instead. =end original SV が整数を含んでいるかどうかを表わす U32 値を返します。 B な設定を検査します。 代わりに C を使ってください。 U32 SvIOKp(SV* sv) =for hackers Found in file sv.h =item SvIOK_notUV X =begin original Returns a boolean indicating whether the SV contains a signed integer. =end original SV が符号付き整数を含んでいるかどうかを示す真偽値を返します。 bool SvIOK_notUV(SV* sv) =for hackers Found in file sv.h =item SvIOK_off X =begin original Unsets the IV status of an SV. =end original SV の IV ステータスをアンセットします。 void SvIOK_off(SV* sv) =for hackers Found in file sv.h =item SvIOK_on X =begin original Tells an SV that it is an integer. =end original SV に対し、その SV が整数であるように指示します。 void SvIOK_on(SV* sv) =for hackers Found in file sv.h =item SvIOK_only X =begin original Tells an SV that it is an integer and disables all other OK bits. =end original SV に対し、その SV が整数であり、他の OK ビットをすべてディセーブルに するように指示します。 void SvIOK_only(SV* sv) =for hackers Found in file sv.h =item SvIOK_only_UV X =begin original Tells and SV that it is an unsigned integer and disables all other OK bits. =end original SV に対し、その SV が符号なし整数であり、他の OK ビットをすべてディセーブルに するように指示します。 void SvIOK_only_UV(SV* sv) =for hackers Found in file sv.h =item SvIOK_UV X =begin original Returns a boolean indicating whether the SV contains an unsigned integer. =end original SV が符号なし整数を含んでいるかどうかを示す真偽値を返します。 bool SvIOK_UV(SV* sv) =for hackers Found in file sv.h =item SvIsCOW X =begin original Returns a boolean indicating whether the SV is Copy-On-Write. (either shared hash key scalars, or full Copy On Write scalars if 5.9.0 is configured for COW) =end original SV がコピーオンライトかどうかを示す真偽値を返します。 (共有ハッシュキースカラか、5.9.0 がコピーオンライト用に設定されていれば 完全なコピーオンライトスカラのどちらかです) bool SvIsCOW(SV* sv) =for hackers Found in file sv.h =item SvIsCOW_shared_hash X =begin original Returns a boolean indicating whether the SV is Copy-On-Write shared hash key scalar. =end original SV が Copy-On-Write 共有ハッシュキースカラかどうかを示す真偽値を返します。 bool SvIsCOW_shared_hash(SV* sv) =for hackers Found in file sv.h =item SvIV X =begin original Coerces the given SV to an integer and returns it. See C for a version which guarantees to evaluate sv only once. =end original SV を強制的に整数に変換し、それを返します。 sv を一度だけ評価することが保証されているバージョンについては C を 参照してください。 IV SvIV(SV* sv) =for hackers Found in file sv.h =item SvIVX X =begin original Returns the raw value in the SV's IV slot, without checks or conversions. Only use when you are sure SvIOK is true. See also C. =end original SV の IV スロットの生の値を、チェックや変換なしに返します。 SvIOK が真であることを確認した後にのみ使えます。 C も参照してください。 IV SvIVX(SV* sv) =for hackers Found in file sv.h =item SvIVx X =begin original Coerces the given SV to an integer and returns it. Guarantees to evaluate C only once. Only use this if C is an expression with side effects, otherwise use the more efficient C. =end original SV を強制的に整数に変換し、それを返します。 C を一度だけ評価することを保証します。 C が副作用のある式の時にのみこれを使ってください; さもなければより 効率的な C を使ってください。 IV SvIVx(SV* sv) =for hackers Found in file sv.h =item SvIV_nomg X =begin original Like C but doesn't process magic. =end original C と同様ですが、magic を処理しません。 IV SvIV_nomg(SV* sv) =for hackers Found in file sv.h =item SvIV_set X =begin original Set the value of the IV pointer in sv to val. It is possible to perform the same function of this macro with an lvalue assignment to C. With future Perls, however, it will be more efficient to use C instead of the lvalue assignment to C. =end original sv の IV ポインタの値を val にセットします。 C への左辺値代入によってこのマクロと同じ機能を行うことが可能です。 しかし、将来の Perl では、C への左辺値代入の代わりに、C を 使う方がより効率的になります。 void SvIV_set(SV* sv, IV val) =for hackers Found in file sv.h =item SvLEN X =begin original Returns the size of the string buffer in the SV, not including any part attributable to C. See C. =end original (C に起因する部分を含まない)SV にある文字列バッファのサイズを返します。 C を参照してください。 STRLEN SvLEN(SV* sv) =for hackers Found in file sv.h =item SvLEN_set X =begin original Set the actual length of the string which is in the SV. See C. =end original SV に含まれている文字列の実際の長さを設定します。 C を参照してください。 void SvLEN_set(SV* sv, STRLEN len) =for hackers Found in file sv.h =item SvMAGIC_set X =begin original Set the value of the MAGIC pointer in sv to val. See C. =end original sv の MAGIC ポインタの値を val にセットします。 C を参照してください。 void SvMAGIC_set(SV* sv, MAGIC* val) =for hackers Found in file sv.h =item SvNIOK X =begin original Returns a U32 value indicating whether the SV contains a number, integer or double. =end original SV が数値、つまり整数値か倍精度実数値を含んでいるかどうかを表わす U32 値を返します。 U32 SvNIOK(SV* sv) =for hackers Found in file sv.h =item SvNIOKp X =begin original Returns a U32 value indicating whether the SV contains a number, integer or double. Checks the B setting. Use C instead. =end original SV が数値、つまり整数値か倍精度実数値を含んでいるかどうかを表わす U32 値を返します。 B な設定を検査します。 代わりに C を使ってください。 U32 SvNIOKp(SV* sv) =for hackers Found in file sv.h =item SvNIOK_off X =begin original Unsets the NV/IV status of an SV. =end original SV の NT/IV ステータスをアンセットします。 void SvNIOK_off(SV* sv) =for hackers Found in file sv.h =item SvNOK X =begin original Returns a U32 value indicating whether the SV contains a double. =end original SV が倍精度実数値を含んでいるかどうかを示す U32 値を返します。 U32 SvNOK(SV* sv) =for hackers Found in file sv.h =item SvNOKp X =begin original Returns a U32 value indicating whether the SV contains a double. Checks the B setting. Use C instead. =end original SV が倍精度実数値を含んでいるかどうかを示す U32 値を返します。 B な設定を検査します。 代わりに C を使ってください。 U32 SvNOKp(SV* sv) =for hackers Found in file sv.h =item SvNOK_off X =begin original Unsets the NV status of an SV. =end original SV にある NT ステータスをアンセットします。 void SvNOK_off(SV* sv) =for hackers Found in file sv.h =item SvNOK_on X =begin original Tells an SV that it is a double. =end original SV に対して、自分が倍精度実数であることを指示します。 void SvNOK_on(SV* sv) =for hackers Found in file sv.h =item SvNOK_only X =begin original Tells an SV that it is a double and disables all other OK bits. =end original SV に対し、その SV が倍精度実数であり、その他の OK フラグをディセーブルに するよう指示します。 void SvNOK_only(SV* sv) =for hackers Found in file sv.h =item SvNV X =begin original Coerce the given SV to a double and return it. See C for a version which guarantees to evaluate sv only once. =end original SV を強制的に倍精度数値に変換し、それを返します。 sv を一度しか評価されないことが保証されているバージョンについては C を参照してください。 NV SvNV(SV* sv) =for hackers Found in file sv.h =item SvNVX X =begin original Returns the raw value in the SV's NV slot, without checks or conversions. Only use when you are sure SvNOK is true. See also C. =end original SV の NV スロットの生の値を、チェックや変換なしに返します。 SvNOK が真であると分かっているときにだけ使ってください。 C も参照してください。 NV SvNVX(SV* sv) =for hackers Found in file sv.h =item SvNVx X =begin original Coerces the given SV to a double and returns it. Guarantees to evaluate C only once. Only use this if C is an expression with side effects, otherwise use the more efficient C. =end original SV を強制的に倍精度数値に変換し、それを返します。 C を一度だけ評価することを保証します。 C が副作用のある式の時にのみこれを使ってください; さもなければ より効率的な C を使ってください。 NV SvNVx(SV* sv) =for hackers Found in file sv.h =item SvNV_set X =begin original Set the value of the NV pointer in sv to val. See C. =end original sv の NV ポインタの値を val にセットします。 C を参照してください。 void SvNV_set(SV* sv, NV val) =for hackers Found in file sv.h =item SvOK X =begin original Returns a U32 value indicating whether the value is defined. This is only meaningful for scalars. =end original 値が定義されているかどうかを示す U32 値を返します。 これはスカラでのみ意味があります。 U32 SvOK(SV* sv) =for hackers Found in file sv.h =item SvOOK X =begin original Returns a U32 indicating whether the pointer to the string buffer is offset. 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 actually C bytes before SvPVX. This offset used to be stored in SvIVX, but is now stored within the spare part of the buffer. =end original 文字列バッファへのポインタがオフセットであるかどうかを示す U32 値を 返します。 この hack は SvPV の先頭から文字を取り除くスピードを向上するために内部的に 使われます。 SvOOK が真であるとき、割り当てられた文字列バッファの開始点は実際には SvPVX から C バイト前になります。 このオフセットは SvIVX に保管されていましたが、今ではバッファの予備部分に 保管されます。 U32 SvOOK(SV* sv) =for hackers Found in file sv.h =item SvOOK_offset X =begin original Reads into I the offset from SvPVX back to the true start of the allocated buffer, which will be non-zero if C has been used to efficiently remove characters from start of the buffer. Implemented as a macro, which takes the address of I, which must be of type C. Evaluates I more than once. Sets I to 0 if C is false. =end original SvPVX から割り当てられたバッファの真の先頭までのオフセットを I に 読み込みます; バッファの先頭から文字を効率的に削除するために C が使用されている場合、この値は 0 以外になります。 マクロとして実装され、I のアドレスを取得します; これは C 型でなければなりません。 I を複数回評価します。 C が偽の場合、I を 0 に設定します。 void SvOOK_offset(NN SV*sv, STRLEN len) =for hackers Found in file sv.h =item SvPOK X =begin original Returns a U32 value indicating whether the SV contains a character string. =end original SV が文字文字列を保持しているかどうかの U32 値を返します。 U32 SvPOK(SV* sv) =for hackers Found in file sv.h =item SvPOKp X =begin original Returns a U32 value indicating whether the SV contains a character string. Checks the B setting. Use C instead. =end original SV が文字文字列を保持しているかどうかの U32 値を返します。 B な設定を検査します。 代わりに C を使ってください。 U32 SvPOKp(SV* sv) =for hackers Found in file sv.h =item SvPOK_off X =begin original Unsets the PV status of an SV. =end original SV の PV ステータスをアンセットします。 void SvPOK_off(SV* sv) =for hackers Found in file sv.h =item SvPOK_on X =begin original Tells an SV that it is a string. =end original SV に対して、自分が文字列であることを指示します。 void SvPOK_on(SV* sv) =for hackers Found in file sv.h =item SvPOK_only X =begin original Tells an SV that it is a string and disables all other OK bits. Will also turn off the UTF-8 status. =end original SV に対し、その SV が文字列であり、他の OK ビットをすべてディセーブルに するように指示します。 また、UTF-8 ステータスをオフにします。 void SvPOK_only(SV* sv) =for hackers Found in file sv.h =item SvPOK_only_UTF8 X =begin original Tells an SV that it is a string and disables all other OK bits, and leaves the UTF-8 status as it was. =end original SV に対し、その SV が文字列であり、他の OK ビットをディセーブルに して、UTF-8 ステータスがそのままにするように指示します。 void SvPOK_only_UTF8(SV* sv) =for hackers Found in file sv.h =item SvPV X =begin original Returns a pointer to the string in the SV, or a stringified form of the SV if the SV does not contain a string. The SV may cache the stringified version becoming C. Handles 'get' magic. See also C for a version which guarantees to evaluate sv only once. =end original SV にある文字列へのポインタか、SVが文字列を保持していない場合には SV の文字列化形式を返します。 SV は C になった文字列化バージョンをキャッシュするかもしれません。 'get' magic をハンドルします。 sv が一度しか評価されないことが保証されているバージョンについては C も参照してください。 char* SvPV(SV* sv, STRLEN len) =for hackers Found in file sv.h =item SvPVbyte X =begin original Like C, but converts sv to byte representation first if necessary. =end original C と同様ですが、もし必要ならまず sv をバイト表現に変換します。 char* SvPVbyte(SV* sv, STRLEN len) =for hackers Found in file sv.h =item SvPVbytex X =begin original Like C, but converts sv to byte representation first if necessary. Guarantees to evaluate sv only once; use the more efficient C otherwise. =end original C と同様ですが、もし必要ならまず sv をバイト表現に変換します。 sv を 1 度だけ評価することを保証します; さもなければより効率のよい C を使ってください。 char* SvPVbytex(SV* sv, STRLEN len) =for hackers Found in file sv.h =item SvPVbytex_force X =begin original Like C, but converts sv to byte representation first if necessary. Guarantees to evaluate sv only once; use the more efficient C otherwise. =end original C と同様ですが、もし必要ならまず sv をバイト表現に変換します。 sv を 1 度だけ評価することを保証します; さもなければより効率のよい C を使ってください。 char* SvPVbytex_force(SV* sv, STRLEN len) =for hackers Found in file sv.h =item SvPVbyte_force X =begin original Like C, but converts sv to byte representation first if necessary. =end original C と同様ですが、もし必要ならまず sv をバイト表現に変換します。 char* SvPVbyte_force(SV* sv, STRLEN len) =for hackers Found in file sv.h =item SvPVbyte_nolen X =begin original Like C, but converts sv to byte representation first if necessary. =end original C と同様ですが、もし必要ならまず sv をバイト表現に変換します。 char* SvPVbyte_nolen(SV* sv) =for hackers Found in file sv.h =item SvPVutf8 X =begin original Like C, but converts sv to utf8 first if necessary. =end original C と同様ですが、もし必要ならまず sv を utf8 に変換します。 char* SvPVutf8(SV* sv, STRLEN len) =for hackers Found in file sv.h =item SvPVutf8x X =begin original Like C, but converts sv to utf8 first if necessary. Guarantees to evaluate sv only once; use the more efficient C otherwise. =end original C と同様ですが、もし必要ならまず sv を utf8 に変換します。 sv を 1 度だけ評価することを保証します; さもなければより効率のよい C を使ってください。 char* SvPVutf8x(SV* sv, STRLEN len) =for hackers Found in file sv.h =item SvPVutf8x_force X =begin original Like C, but converts sv to utf8 first if necessary. Guarantees to evaluate sv only once; use the more efficient C otherwise. =end original C と同様ですが、もし必要ならまず sv を utf8 に変換します。 sv を 1 度だけ評価することを保証します; さもなければより効率のよい C を使ってください。 char* SvPVutf8x_force(SV* sv, STRLEN len) =for hackers Found in file sv.h =item SvPVutf8_force X =begin original Like C, but converts sv to utf8 first if necessary. =end original C と同様ですが、もし必要ならまず sv を utf8 に変換します。 char* SvPVutf8_force(SV* sv, STRLEN len) =for hackers Found in file sv.h =item SvPVutf8_nolen X =begin original Like C, but converts sv to utf8 first if necessary. =end original C と同様ですが、もし必要ならまず sv を utf8 に変換します。 char* SvPVutf8_nolen(SV* sv) =for hackers Found in file sv.h =item SvPVX X =begin original Returns a pointer to the physical string in the SV. The SV must contain a string. =end original SV にある物理文字列へのポインタを返します。 SV は文字列を保持していなければなりません。 char* SvPVX(SV* sv) =for hackers Found in file sv.h =item SvPVx X =begin original A version of C which guarantees to evaluate C only once. Only use this if C is an expression with side effects, otherwise use the more efficient C. =end original C を一度だけ評価することを保証するバージョンの C です。 C が副作用のある式の時にのみこれを使ってください; さもなければ より効率的な C を使ってください。 char* SvPVx(SV* sv, STRLEN len) =for hackers Found in file sv.h =item SvPV_force X =begin original Like C but will force the SV into containing just a string (C). You want force if you are going to update the C directly. =end original C と同様ですが、SV が単に文字列(C)を含むことを強制します。 C を直接更新したい場合には強制したいでしょう。 char* SvPV_force(SV* sv, STRLEN len) =for hackers Found in file sv.h =item SvPV_force_nomg X =begin original Like C but will force the SV into containing just a string (C). You want force if you are going to update the C directly. Doesn't process magic. =end original C と同様ですが、SV が単に文字列(C)を含むことを強制します。 C を直接更新したい場合には強制したいでしょう。 magic を処理しません。 char* SvPV_force_nomg(SV* sv, STRLEN len) =for hackers Found in file sv.h =item SvPV_nolen X =begin original Returns a pointer to the string in the SV, or a stringified form of the SV if the SV does not contain a string. The SV may cache the stringified form becoming C. Handles 'get' magic. =end original SV にある文字列へのポインタか、SVが文字列を保持していない場合には SV の文字列化形式を返します。 SV は C になった文字列化形式をキャッシュするかもしれません。 'get' magic をハンドルします。 char* SvPV_nolen(SV* sv) =for hackers Found in file sv.h =item SvPV_nomg X =begin original Like C but doesn't process magic. =end original C と同様ですが、magic を処理しません。 char* SvPV_nomg(SV* sv, STRLEN len) =for hackers Found in file sv.h =item SvPV_set X =begin original Set the value of the PV pointer in sv to val. See C. =end original sv の PV ポインタの値を val にセットします。 C を参照してください。 void SvPV_set(SV* sv, char* val) =for hackers Found in file sv.h =item SvREFCNT X =begin original Returns the value of the object's reference count. =end original オブジェクトの参照カウントの値を返します。 U32 SvREFCNT(SV* sv) =for hackers Found in file sv.h =item SvREFCNT_dec X =begin original Decrements the reference count of the given SV. =end original SV で与えられたものの参照カウントを減じます。 void SvREFCNT_dec(SV* sv) =for hackers Found in file sv.h =item SvREFCNT_inc X =begin original Increments the reference count of the given SV. =end original SV で与えられたものの参照カウントを増やします。 =begin original All of the following SvREFCNT_inc* macros are optimized versions of SvREFCNT_inc, and can be replaced with SvREFCNT_inc. =end original 以下の SvREFCNT_inc* マクロ全ては SvREFCNT_inc の最適化バージョンで、 SvREFCNT_inc に置き換えられます。 SV* SvREFCNT_inc(SV* sv) =for hackers Found in file sv.h =item SvREFCNT_inc_NN X =begin original Same as SvREFCNT_inc, but can only be used if you know I is not NULL. Since we don't have to check the NULLness, it's faster and smaller. =end original SvREFCNT_inc と同じですが、I が NULL ではないと分かっている場合にのみ 使えます。 NULL かどうかをチェックする必要がないので、より速くより小さいです。 SV* SvREFCNT_inc_NN(SV* sv) =for hackers Found in file sv.h =item SvREFCNT_inc_simple X =begin original Same as SvREFCNT_inc, but can only be used with expressions without side effects. Since we don't have to store a temporary value, it's faster. =end original SvREFCNT_inc と同じですが、式に副作用がない場合にのみ使えます。 一時的な値を保管する必要がないので、より速いです。 SV* SvREFCNT_inc_simple(SV* sv) =for hackers Found in file sv.h =item SvREFCNT_inc_simple_NN X =begin original Same as SvREFCNT_inc_simple, but can only be used if you know I is not NULL. Since we don't have to check the NULLness, it's faster and smaller. =end original SvREFCNT_inc_simple と同じですが、I が NULL ではないと分かっている 場合にのみ使えます。 NULL かどうかをチェックする必要がないので、より速くより小さいです。 SV* SvREFCNT_inc_simple_NN(SV* sv) =for hackers Found in file sv.h =item SvREFCNT_inc_simple_void X =begin original Same as SvREFCNT_inc_simple, but can only be used if you don't need the return value. The macro doesn't need to return a meaningful value. =end original SvREFCNT_inc_simple と同じですが、返り値が不要な場合にのみ使えます。 このマクロは意味のある値を返す必要はありません。 void SvREFCNT_inc_simple_void(SV* sv) =for hackers Found in file sv.h =item SvREFCNT_inc_simple_void_NN X =begin original Same as SvREFCNT_inc, but can only be used if you don't need the return value, and you know that I is not NULL. The macro doesn't need to return a meaningful value, or check for NULLness, so it's smaller and faster. =end original SvREFCNT_inc と同じですが、返り値が不要で、I が NULL ではないと 分かっている場合にのみ使えます。 このマクロは意味のある値を返す必要が無く、NULL をチェックする必要もないので、 より速くより小さいです。 void SvREFCNT_inc_simple_void_NN(SV* sv) =for hackers Found in file sv.h =item SvREFCNT_inc_void X =begin original Same as SvREFCNT_inc, but can only be used if you don't need the return value. The macro doesn't need to return a meaningful value. =end original SvREFCNT_inc と同じですが、返り値が不要な場合にのみ使えます。 このマクロは意味のある値を返す必要はありません。 void SvREFCNT_inc_void(SV* sv) =for hackers Found in file sv.h =item SvREFCNT_inc_void_NN X =begin original Same as SvREFCNT_inc, but can only be used if you don't need the return value, and you know that I is not NULL. The macro doesn't need to return a meaningful value, or check for NULLness, so it's smaller and faster. =end original SvREFCNT_inc と同じですが、返り値が不要で、I が NULL ではないと 分かっている場合にのみ使えます。 このマクロは意味のある値を返す必要が無く、NULL をチェックする必要もないので、 より速くより小さいです。 void SvREFCNT_inc_void_NN(SV* sv) =for hackers Found in file sv.h =item SvROK X =begin original Tests if the SV is an RV. =end original SV が RV であるかを検査します。 U32 SvROK(SV* sv) =for hackers Found in file sv.h =item SvROK_off X =begin original Unsets the RV status of an SV. =end original SV の RV ステータスをリセットします。 void SvROK_off(SV* sv) =for hackers Found in file sv.h =item SvROK_on X =begin original Tells an SV that it is an RV. =end original SV に、自分が RV であると指示します。 void SvROK_on(SV* sv) =for hackers Found in file sv.h =item SvRV X =begin original Dereferences an RV to return the SV. =end original SV を返すために RV を参照はずしします。 SV* SvRV(SV* sv) =for hackers Found in file sv.h =item SvRV_set X =begin original Set the value of the RV pointer in sv to val. See C. =end original sv の RV ポインタの値を val にセットします。 C を参照してください。 void SvRV_set(SV* sv, SV* val) =for hackers Found in file sv.h =item SvSTASH X =begin original Returns the stash of the SV. =end original SV のスタッシュを返します。 HV* SvSTASH(SV* sv) =for hackers Found in file sv.h =item SvSTASH_set X =begin original Set the value of the STASH pointer in sv to val. See C. =end original sv の STASH ポインタの値を val にセットします。 C を参照してください。 void SvSTASH_set(SV* sv, HV* val) =for hackers Found in file sv.h =item SvTAINT X =begin original Taints an SV if tainting is enabled. =end original 汚染検査が有効なときに SV を汚染検査します。 void SvTAINT(SV* sv) =for hackers Found in file sv.h =item SvTAINTED X =begin original Checks to see if an SV is tainted. Returns TRUE if it is, FALSE if not. =end original SV が汚染されているかどうかをチェックします。 汚染されていれば TRUE を、そうでなければ FALSE を返します。 bool SvTAINTED(SV* sv) =for hackers Found in file sv.h =item SvTAINTED_off X =begin original Untaints an SV. Be I 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. =end original SV を汚染除去します。 Perl の基本的セキュリティ機構と同様 このルーチンを使うときは特に注意してください。 XS モジュールの作者は、汚染除去について良く理解しない限りは この関数を使うべきではありません。 perl 標準のやり方では直接変数の汚染除去するのではなく、 注意深く構築された正規表現を使って汚染除去が行われます。 void SvTAINTED_off(SV* sv) =for hackers Found in file sv.h =item SvTAINTED_on X =begin original Marks an SV as tainted if tainting is enabled. =end original 汚染チェックが有効な場合、汚染されているという印を SV につけます。 void SvTAINTED_on(SV* sv) =for hackers Found in file sv.h =item SvTRUE X =begin original Returns a boolean indicating whether Perl would evaluate the SV as true or false. See SvOK() for a defined/undefined test. Handles 'get' magic unless the scalar is already SvPOK, SvIOK or SvNOK (the public, not the private flags). =end original Perl が SV を真と評価するか偽と評価するかを示す真偽値を返します。 定義/未定義のテストには SvOK() を参照してください。 スカラがすでに SvPOK, SvIOK, SvNOK (プライベートフラグではなく公的なもの) の いずれかでない限り、'get' magic を扱います。 bool SvTRUE(SV* sv) =for hackers Found in file sv.h =item SvTRUE_nomg X =begin original Returns a boolean indicating whether Perl would evaluate the SV as true or false. See SvOK() for a defined/undefined test. Does not handle 'get' magic. =end original Perl が SV を真と評価するか偽と評価するかを示す真偽値を返します。 定義/未定義のテストには SvOK() を参照してください。 'set' magic をハンドルしません。 bool SvTRUE_nomg(SV* sv) =for hackers Found in file sv.h =item SvTYPE X =begin original Returns the type of the SV. See C. =end original SV の型を返します。 C を参照してください。 svtype SvTYPE(SV* sv) =for hackers Found in file sv.h =item SvUOK X =begin original Returns a boolean indicating whether the SV contains an unsigned integer. =end original SV が符号なし整数を含んでいるかどうかを示す真偽値を返します。 bool SvUOK(SV* sv) =for hackers Found in file sv.h =item SvUPGRADE X =begin original Used to upgrade an SV to a more complex form. Uses C to perform the upgrade if necessary. See C. =end original SV をより複雑なフォームにするために使われます。 必要であればアップグレードのために C を使用します。 C を参照してください。 void SvUPGRADE(SV* sv, svtype type) =for hackers Found in file sv.h =item SvUTF8 X =begin original Returns a U32 value indicating whether the SV contains UTF-8 encoded data. Call this after SvPV() in case any call to string overloading updates the internal flag. =end original SV が UTF-8 エンコードされたデータを含んでいるかどうかを示す U32 値を 返します。 オーバーロードが内部フラグを更新する文字列に対して呼び出すときは SvPV() の後にこれを呼び出してください。 U32 SvUTF8(SV* sv) =for hackers Found in file sv.h =item SvUTF8_off X =begin original Unsets the UTF-8 status of an SV. =end original SV の UTF-8 状態をリセットします。 void SvUTF8_off(SV *sv) =for hackers Found in file sv.h =item SvUTF8_on X =begin original Turn on the UTF-8 status of an SV (the data is not changed, just the flag). Do not use frivolously. =end original SV の UTF-8 状態をオンにします (データは変更されません; フラグだけです)。 軽率に使わないでください。 void SvUTF8_on(SV *sv) =for hackers Found in file sv.h =item SvUV X =begin original Coerces the given SV to an unsigned integer and returns it. See C for a version which guarantees to evaluate sv only once. =end original SV を強制的に符号なし整数に変換し、それを返します。 sv が 1 度だけ評価されることを保証しているバージョンについては C を参照してください。 UV SvUV(SV* sv) =for hackers Found in file sv.h =item SvUVX X =begin original Returns the raw value in the SV's UV slot, without checks or conversions. Only use when you are sure SvIOK is true. See also C. =end original SV の UV スロットの生の値を、チェックや変換なしに返します。 SvIOK が真であることを確認した後にのみ使えます。 C も参照してください。 UV SvUVX(SV* sv) =for hackers Found in file sv.h =item SvUVx X =begin original Coerces the given SV to an unsigned integer and returns it. Guarantees to C only once. Only use this if C is an expression with side effects, otherwise use the more efficient C. =end original SV を強制的に符号なし整数に変換し、それを返します。 C を一度だけ評価することを保証します。 C が副作用のある式の時にのみこれを使ってください; さもなければ より効率的な C を使ってください。 UV SvUVx(SV* sv) =for hackers Found in file sv.h =item SvUV_nomg X =begin original Like C but doesn't process magic. =end original C と同様ですが、magic を処理しません。 UV SvUV_nomg(SV* sv) =for hackers Found in file sv.h =item SvUV_set X =begin original Set the value of the UV pointer in sv to val. See C. =end original sv の UV ポインタの値を val にセットします。 C を参照してください。 void SvUV_set(SV* sv, UV val) =for hackers Found in file sv.h =item SvVOK X =begin original Returns a boolean indicating whether the SV contains a v-string. =end original SV がv-文字列を含んでいるかどうかを示す真偽値を返します。 bool SvVOK(SV* sv) =for hackers Found in file sv.h =item sv_catpvn_nomg X =begin original Like C but doesn't process magic. =end original C と同様ですが、magic を処理しません。 void sv_catpvn_nomg(SV* sv, const char* ptr, STRLEN len) =for hackers Found in file sv.h =item sv_catsv_nomg X =begin original Like C but doesn't process magic. =end original C と同様ですが、magic を処理しません。 void sv_catsv_nomg(SV* dsv, SV* ssv) =for hackers Found in file sv.h =item sv_derived_from X =begin original Returns a boolean indicating whether the SV is derived from the specified class I. To check derivation at the Perl level, call C as a normal Perl method. =end original I SV が指定したクラスから派生したものであるかどうかを示す 真偽値を返します。 Perl レベルの派生をチェックするには、通常の Perl メソッドとして C を 呼び出してください。 bool sv_derived_from(SV* sv, const char *const name) =for hackers Found in file universal.c =item sv_does X =begin original Returns a boolean indicating whether the SV performs a specific, named role. The SV can be a Perl object or the name of a Perl class. =end original SV が特定の名前付きのロールを行うかどうかを示す真偽値を返します。 SV は Perl オブジェクトか Perl クラスの名前です。 bool sv_does(SV* sv, const char *const name) =for hackers Found in file universal.c =item sv_report_used X =begin original Dump the contents of all SVs not yet freed. (Debugging aid). =end original 開放されていない全ての SV の内容をダンプします。 (デバッグの助けとなります)。 void sv_report_used() =for hackers Found in file sv.c =item sv_setsv_nomg X =begin original Like C but doesn't process magic. =end original C と同様ですが、magic を処理しません。 void sv_setsv_nomg(SV* dsv, SV* ssv) =for hackers Found in file sv.h =item sv_utf8_upgrade_nomg X =begin original Like sv_utf8_upgrade, but doesn't do magic on C =end original sv_utf8_upgrade と同様ですが C にマジックを適用しません。 STRLEN sv_utf8_upgrade_nomg(NN SV *sv) =for hackers Found in file sv.h =back =head1 SV-Body Allocation (SV ボディ割り当て) =over 8 =item looks_like_number X =begin original Test if the content of an SV looks like a number (or is a number). C and C are treated as numbers (so will not issue a non-numeric warning), even if your atof() doesn't grok them. =end original SV の内容が数値のようにみなせるか(あるいは数値であるか)を検査します。 たとえ atof() が認識しなくても、C と C は数値として 扱われます(従って非数値警告は発生しません)。 I32 looks_like_number(SV *const sv) =for hackers Found in file sv.c =item newRV_noinc X =begin original Creates an RV wrapper for an SV. The reference count for the original SV is B incremented. =end original SV に対する RV ラッパーを生成します。 元の SV の参照カウントはインクリメント B<されません>。 SV* newRV_noinc(SV *const sv) =for hackers Found in file sv.c =item newSV X =begin original Creates a new SV. A non-zero C parameter indicates the number of bytes of preallocated string space the SV should have. An extra byte for a trailing 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. =end original 新たな SV を生成します。 非ゼロの C パラメーターは SV が持つべき割り当てずみ文字列空間の大きさを 示します。 余分な空間には NUL が埋められ、予約されます。 (SvPOK は文字列が割り当てられていたとしても SV をセットしません。) 新しい SV の参照カウントは 1 に設定されます。 =begin original In 5.9.3, newSV() replaces the older NEWSV() API, and drops the first parameter, I, a debug aid which allowed callers to identify themselves. This aid has been superseded by a new build option, PERL_MEM_LOG (see L). The older API is still there for use in XS modules supporting older perls. =end original 5.9.3 で、newSV() は古い NEWSV() API を置き換え、呼び出し側が自分自身を 識別できるようにデバッグの助けをするための最初の引数 I がなくなりました。 この助けは新しいビルドオプション PERL_MEM_LOG (L 参照) で置き換えられました。 古い API は、古い perl に対応している XS モジュールが使えるように まだ存在しています。 SV* newSV(const STRLEN len) =for hackers Found in file sv.c =item newSVhek X =begin original Creates a new SV from the hash key structure. It will generate scalars that point to the shared string table where possible. Returns a new (undefined) SV if the hek is NULL. =end original ハッシュキー構造体から新しい SV を作成します。 可能なら共有文字列テーブルを指しているスカラを生成します。 hek が NULL なら、新しい(未定義値の) SV を返します。 SV* newSVhek(const HEK *const hek) =for hackers Found in file sv.c =item newSViv X =begin original Creates a new SV and copies an integer into it. The reference count for the SV is set to 1. =end original 新たな SV を生成し、整数値をそこにコピーします。 SV の参照カウントは 1 に設定されます。 SV* newSViv(const IV i) =for hackers Found in file sv.c =item newSVnv X =begin original Creates a new SV and copies a floating point value into it. The reference count for the SV is set to 1. =end original 新たな SV を生成し、不動小数点数値をそこにコピーします。 SV の参照カウントは 1 に設定されます。 SV* newSVnv(const NV n) =for hackers Found in file sv.c =item newSVpv X =begin original Creates a new SV and copies a string into it. The reference count for the SV is set to 1. If C is zero, Perl will compute the length using strlen(). For efficiency, consider using C instead. =end original 新たな SV を生成し、文字列をそこにコピーします。 SV の参照カウントは 1 に設定されます。 C がゼロの場合、Perl が strlen() を使って長さを計算します。 効率のために、代わりに C を使うことを考慮してください。 SV* newSVpv(const char *const s, const STRLEN len) =for hackers Found in file sv.c =item newSVpvf X =begin original Creates a new SV and initializes it with the string formatted like C. =end original 新たな SV を生成し、C のような文字列書式によって初期化します。 SV* newSVpvf(const char *const pat, ...) =for hackers Found in file sv.c =item newSVpvn X =begin original Creates a new SV and copies a string into it. The reference count for the SV is set to 1. Note that if C is zero, Perl will create a zero length string. You are responsible for ensuring that the source string is at least C bytes long. If the C argument is NULL the new SV will be undefined. =end original 新たな SV を生成し、文字列をそこにコピーします。 SV の参照カウントは 1 に設定されます。 C が 0 の場合、Perl は長さ 0 の文字列を作成することに注意してください。 ソース文字列が少なくとも C の長さがあることを保証する責任があります。 C 引数が NULL の場合、新しい SV は未定義です。 SV* newSVpvn(const char *const s, const STRLEN len) =for hackers Found in file sv.c =item newSVpvn_flags X =begin original Creates a new SV and copies a string into it. The reference count for the SV is set to 1. Note that if C is zero, Perl will create a zero length string. You are responsible for ensuring that the source string is at least C bytes long. If the C argument is NULL the new SV will be undefined. Currently the only flag bits accepted are C and C. If C is set, then C is called on the result before returning. If C is set, C is considered to be in UTF-8 and the C flag will be set on the new SV. C is a convenience wrapper for this function, defined as =end original 新たな SV を生成し、文字列をそこにコピーします。 SV の参照カウントは 1 に設定されます。 C が 0 の場合、Perl は長さ 0 の文字列を作成することに注意してください。 ソース文字列が少なくとも C の長さがあることを保証する責任があります。 C 引数が NULL の場合、新しい SV は未定義です。 現在のところ受け付けるフラグビットは C と C だけです。 C が設定されると、結果を返す前に C が呼び出されます。 C が設定されると、C は UTF-8 であるとして扱われ、 新しい SV に C フラグが設定されます。 C は、次のように定義されているこの関数の便利ラッパーです: #define newSVpvn_utf8(s, len, u) \ newSVpvn_flags((s), (len), (u) ? SVf_UTF8 : 0) SV* newSVpvn_flags(const char *const s, const STRLEN len, const U32 flags) =for hackers Found in file sv.c =item newSVpvn_share X =begin original Creates a new SV with its SvPVX_const pointing to a shared string in the string table. If the string does not already exist in the table, it is created first. Turns on READONLY and FAKE. If the C parameter is non-zero, that value is used; otherwise the hash is computed. The string's hash can be later be retrieved from the SV with the C macro. The idea here is that as the string table is used for shared hash keys these strings will have SvPVX_const == HeKEY and hash lookup will avoid string compare. =end original SvPVX_const が文字列テーブルの共有文字列を指している新しい SV を作成します。 文字列がまだテーブルに存在していないなら、まず作成されます。 READONLY と FAKE を有効にします。 C 引数が非ゼロなら、その値が使われます; さもなければハッシュは 計算されます。 文字列のハッシュは、後で C マクロで SV から取得できます。 ここでの考え方は、文字列テーブルは共有ハッシュキーのために使われるので、 これらの文字列は SvPVX_const == HeKEY であって、ハッシュの検索は 文字列比較を防ぐと言うことです。 SV* newSVpvn_share(const char* s, I32 len, U32 hash) =for hackers Found in file sv.c =item newSVpvs X =begin original Like C, but takes a literal string instead of a string/length pair. =end original C と同様ですが、文字列/長さの組ではなく、リテラルな文字列を 取ります。 SV* newSVpvs(const char* s) =for hackers Found in file handy.h =item newSVpvs_flags X =begin original Like C, but takes a literal string instead of a string/length pair. =end original C と同様ですが、文字列/長さの組ではなくリテラルな文字列を 取ります。 SV* newSVpvs_flags(const char* s, U32 flags) =for hackers Found in file handy.h =item newSVpvs_share X =begin original Like C, but takes a literal string instead of a string/length pair and omits the hash parameter. =end original C と同様ですが、文字列/長さの組ではなく、リテラルな文字列を 取り、ハッシュパラメータを除外します。 SV* newSVpvs_share(const char* s) =for hackers Found in file handy.h =item newSVrv X =begin original Creates a new SV for the RV, C, to point to. If C is not an RV then it will be upgraded to one. If C 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. =end original SV を指し示す RV の C に対する新たな SV を生成します。 C が RV でない場合には、それは RV に昇格します。 C がヌルでない場合には、生成された SV は指定されたパッケージに bless されます。 参照カウントが 1 に設定された SV が返されます。 SV* newSVrv(SV *const rv, const char *const classname) =for hackers Found in file sv.c =item newSVsv X =begin original Creates a new SV which is an exact duplicate of the original SV. (Uses C). =end original 元の SV を正確に複製した SV を生成します。 (C を使います)。 SV* newSVsv(SV *const old) =for hackers Found in file sv.c =item newSVuv X =begin original Creates a new SV and copies an unsigned integer into it. The reference count for the SV is set to 1. =end original 新しい SV を作成して、そこに符号なし整数をコピーします。 SV の参照カウントは 1 に設定されます。 SV* newSVuv(const UV u) =for hackers Found in file sv.c =item newSV_type X =begin original Creates a new SV, of the type specified. The reference count for the new SV is set to 1. =end original 指定された型の新しい SV を作成します。 新しい SV の参照カウントは 1 に設定されます。 SV* newSV_type(const svtype type) =for hackers Found in file sv.c =item sv_2bool X bool sv_2bool(SV *const sv) =for hackers Found in file sv.c =item sv_2cv X =begin original Using various gambits, try to get a CV from an SV; in addition, try if possible to set C<*st> and C<*gvp> to the stash and GV associated with it. The flags in C are passed to gv_fetchsv. =end original 様々な作戦を使って、SV から CV を得ようとします; さらに、もし可能なら、 C<*st> と C<*gvp> に、それと関連づけられているスタッシュと GV に セットしようとします。 C のフラグは gv_fetchsv に渡されます。 CV* sv_2cv(SV* sv, HV **const st, GV **const gvp, const I32 lref) =for hackers Found in file sv.c =item sv_2io X =begin original Using various gambits, try to get an IO from an SV: the IO slot if its a GV; or the recursive result if we're an RV; or the IO slot of the symbol named after the PV if we're a string. =end original 様々な作戦を使って、SV から CV を得ようとします; GV なら IO スロット; RV なら再帰した結果; 文字列なら PV の後のシンボル名の IO スロットです。 IO* sv_2io(SV *const sv) =for hackers Found in file sv.c =item sv_2iv_flags X =begin original Return the integer value of an SV, doing any necessary string conversion. If flags includes SV_GMAGIC, does an mg_get() first. Normally used via the C and C macros. =end original 必要な文字列変換を行って、SV の整数値を返します。 フラグに SV_GMAGIC が含まれていると、最初に mg_get() を行います。 通常は C と C マクロ経由で使われます。 IV sv_2iv_flags(SV *const sv, const I32 flags) =for hackers Found in file sv.c =item sv_2mortal X =begin original Marks an existing SV as mortal. The SV will be destroyed "soon", either by an explicit call to FREETMPS, or by an implicit call at places such as statement boundaries. SvTEMP() is turned on which means that the SV's string buffer can be "stolen" if this SV is copied. See also C and C. =end original SV を揮発性にします。 SV は FREETMPS の明示的な呼び出しか、文の境界のような場所での暗黙の 呼び出しによって「すぐに」破壊されます。 この SV がコピーされると、SvTEMP() は SV の文字列バッファが「盗まれた」ことを 示すために音になります。 C と C も参照してください。 SV* sv_2mortal(SV *const sv) =for hackers Found in file sv.c =item sv_2nv_flags X =begin original Return the num value of an SV, doing any necessary string or integer conversion. If flags includes SV_GMAGIC, does an mg_get() first. Normally used via the C and C macros. =end original 必要な文字列変換や整数変換を行って、SV の数値を返します。 フラグに SV_GMAGIC が含まれている場合、最初に mg_get() をします。 通常は C と C のマクロ経由で使います。 NV sv_2nv_flags(SV *const sv, const I32 flags) =for hackers Found in file sv.c =item sv_2pvbyte X =begin original Return a pointer to the byte-encoded representation of the SV, and set *lp to its length. May cause the SV to be downgraded from UTF-8 as a side-effect. =end original SV のバイトエンコードされた表現へのポインタを返し、その長さを *lp に セットします。 副作用として、SV が UTF-8 から降格するかもしれません。 =begin original Usually accessed via the C macro. =end original 普通は C マクロ経由でアクセスされます。 char* sv_2pvbyte(SV *const sv, STRLEN *const lp) =for hackers Found in file sv.c =item sv_2pvutf8 X =begin original Return a pointer to the UTF-8-encoded representation of the SV, and set *lp to its length. May cause the SV to be upgraded to UTF-8 as a side-effect. =end original SV の UTF-8 エンコードされた表現へのポインタを返し、その長さを *lp に セットします。 副作用として、SV が UTF-8 へ昇格するかもしれません。 =begin original Usually accessed via the C macro. =end original 普通は C マクロ経由でアクセスされます。 char* sv_2pvutf8(SV *const sv, STRLEN *const lp) =for hackers Found in file sv.c =item sv_2pv_flags X =begin original Returns a pointer to the string value of an SV, and sets *lp to its length. If flags includes SV_GMAGIC, does an mg_get() first. Coerces sv to a string if necessary. Normally invoked via the C macro. C and C usually end up here too. =end original SV の文字列値へのポインタを返し、*lp にその長さをセットします。 フラグに SV_GMAGIC が含まれていると、最初に mg_get() を行います。 必要なら sv を文字列に強制します。 通常は C マクロ経由で起動されます。 C と C も普通はここで終わります。 char* sv_2pv_flags(SV *const sv, STRLEN *const lp, const I32 flags) =for hackers Found in file sv.c =item sv_2uv_flags X =begin original Return the unsigned integer value of an SV, doing any necessary string conversion. If flags includes SV_GMAGIC, does an mg_get() first. Normally used via the C and C macros. =end original 必要な文字列変換を行って、SV の符号なし整数値を返します。 フラグに SV_GMAGIC が含まれていると、最初に mg_get() を行います。 通常は C と C マクロ経由で使われます。 UV sv_2uv_flags(SV *const sv, const I32 flags) =for hackers Found in file sv.c =item sv_backoff X =begin original Remove any string offset. You should normally use the C macro wrapper instead. =end original 文字列オフセットを取り除きます。 通常は代わりに C マクロラッパーを使うべきです。 int sv_backoff(SV *const sv) =for hackers Found in file sv.c =item sv_bless X =begin original Blesses an SV into a specified package. The SV must be an RV. The package must be designated by its stash (see C). The reference count of the SV is unaffected. =end original SV を指定したパッケージに bless します。 SV は RV でなければなりません。 パッケージは、そのスタッシュ(C 参照)によって 指示されていなければなりません。 SV の参照カウントは影響を受けません。 SV* sv_bless(SV *const sv, HV *const stash) =for hackers Found in file sv.c =item sv_catpv X =begin original Concatenates the string onto the end of the string which is in the SV. If the SV has the UTF-8 status set, then the bytes appended should be valid UTF-8. Handles 'get' magic, but not 'set' magic. See C. =end original 文字列を、SV にある文字列の終端に連結します。 SV の UTF-8 ステータスが設定されているなら、追加されるバイト列は妥当な UTF-8 であるべきです。 'get' magic をハンドルしますが、'set' magic はハンドルしません。 C を参照してください。 void sv_catpv(SV *const sv, const char* ptr) =for hackers Found in file sv.c =item sv_catpvf X =begin original Processes its arguments like C and appends the formatted output to an SV. If the appended data contains "wide" characters (including, but not limited to, SVs with a UTF-8 PV formatted with %s, and characters >255 formatted with %c), the original SV might get upgraded to UTF-8. Handles 'get' magic, but not 'set' magic. See C. If the original SV was UTF-8, the pattern should be valid UTF-8; if the original SV was bytes, the pattern should be too. =end original 引数を C のように処理し、SV にその結果を追加します。 追加するデータに「ワイド」文字(%s でフォーマットされた UTF-8 PV や %c でフォーマットされた >255 の文字の SV を含みますが、それに 限定されません)が含まれている場合、元の SV は UTF-8 に 昇格されるかもしれません。 'get' magic をハンドルしますが、'set' magic はハンドルしません。 C を参照してください。 元の SV が UTF-8 なら、パターンは妥当な UTF-8 であるべきです; 元の SV が バイト列なら、パターンもそうあるべきです。 void sv_catpvf(SV *const sv, const char *const pat, ...) =for hackers Found in file sv.c =item sv_catpvf_mg X =begin original Like C, but also handles 'set' magic. =end original C と同様ですが、'set' magic もハンドルします。 void sv_catpvf_mg(SV *const sv, const char *const pat, ...) =for hackers Found in file sv.c =item sv_catpvn X =begin original Concatenates the string onto the end of the string which is in the SV. The C indicates number of bytes to copy. If the SV has the UTF-8 status set, then the bytes appended should be valid UTF-8. Handles 'get' magic, but not 'set' magic. See C. =end original 文字列を、SV にある文字列の終端に連結します。 C はコピーするバイト数を示します。 SV の UTF-8 ステータスが設定されているなら、追加されるバイト列は妥当な UTF-8 であるべきです。 'get' magic をハンドルしますが、'set' magic はハンドルしません。 C を参照してください。 void sv_catpvn(SV *dsv, const char *sstr, STRLEN len) =for hackers Found in file sv.c =item sv_catpvn_flags X =begin original Concatenates the string onto the end of the string which is in the SV. The C indicates number of bytes to copy. If the SV has the UTF-8 status set, then the bytes appended should be valid UTF-8. If C has C bit set, will C on C if appropriate, else not. C and C are implemented in terms of this function. =end original 文字列を、SV にある文字列の終端に連結します。 C はコピーするバイト数を示します。 SV の UTF-8 ステータスが設定されているなら、追加されるバイト列は妥当な UTF-8 であるべきです。 C の C ビットがセットされていると、適切なら C に C し、さもなければしません。 C と C はこの関数に関して実装されています。 void sv_catpvn_flags(SV *const dstr, const char *sstr, const STRLEN len, const I32 flags) =for hackers Found in file sv.c =item sv_catpvs X =begin original Like C, but takes a literal string instead of a string/length pair. =end original C と同様ですが、文字列/長さの組ではなく、リテラルな文字列を 取ります。 void sv_catpvs(SV* sv, const char* s) =for hackers Found in file handy.h =item sv_catpv_mg X =begin original Like C, but also handles 'set' magic. =end original C と同様ですが、'set' magic もハンドルします。 void sv_catpv_mg(SV *const sv, const char *const ptr) =for hackers Found in file sv.c =item sv_catsv X =begin original Concatenates the string from SV C onto the end of the string in SV C. Modifies C but not C. Handles 'get' magic, but not 'set' magic. See C. =end original SV C にある文字列を、SV C にある文字列の終端へ連結します。 C を変更しますが C は変更しません。 'get' magic をハンドルしますが、'set' magic はハンドルしません。 C を参照してください。 void sv_catsv(SV *dstr, SV *sstr) =for hackers Found in file sv.c =item sv_catsv_flags X =begin original Concatenates the string from SV C onto the end of the string in SV C. Modifies C but not C. If C has C bit set, will C on the SVs if appropriate, else not. C and C are implemented in terms of this function. =end original SV C にある文字列を、SV C にある文字列の終端へ連結します。 C を変更しますが C は変更しません。 C の C ビットがセットされていると、適切なら SV に C し、さもなければしません。 C と C はこの関数に関して実装されています。 void sv_catsv_flags(SV *const dsv, SV *const ssv, const I32 flags) =for hackers Found in file sv.c =item sv_chop X =begin original Efficient removal of characters from the beginning of the string buffer. SvPOK(sv) must be true and the C must be a pointer to somewhere inside the string buffer. The C becomes the first character of the adjusted string. Uses the "OOK hack". Beware: after this function returns, C and SvPVX_const(sv) may no longer refer to the same chunk of data. =end original 文字列バッファの先頭から文字を効率的に削除します。 SvPOK(sv) が真でなければならず、C は文字列バッファの 内側のどこかを指し示すポインタでなければなりません。 C は調整後の文字列の先頭となります。 "OOK hack" を使います。 注意: この関数から返った後、C と SvPVX_const(sv) はもはや同じデータの 塊を参照していません。 void sv_chop(SV *const sv, const char *const ptr) =for hackers Found in file sv.c =item sv_clear X =begin original Clear an SV: call any destructors, free up any memory used by the body, and free the body itself. The SV's head is I freed, although its type is set to all 1's so that it won't inadvertently be assumed to be live during global destruction etc. This function should only be called when REFCNT is zero. Most of the time you'll want to call C (or its macro wrapper C) instead. =end original SV をクリアします: デストラクタを呼び出し、ボディで使われたメモリを解放し、 ボディ自身を解放します。 SV のヘッダは解放 I<されません> が、 its type is set to all 1's so that it won't inadvertently be assumed to be live during global destruction etc. この関数は REFCNT がゼロになったときにのみ呼び出されるべきです。 ほとんどの場合 C (またはそのマクロラッパー C) を 呼び出したいでしょう。 void sv_clear(SV *const orig_sv) =for hackers Found in file sv.c =item sv_cmp X =begin original Compares the strings in two SVs. Returns -1, 0, or 1 indicating whether the string in C is less than, equal to, or greater than the string in C. Is UTF-8 and 'use bytes' aware, handles get magic, and will coerce its args to strings if necessary. See also C. =end original 二つの SV にある文字列を比較します。 C が C より小さいときには -1 を、両者が等しいときには 0 を、 C が C より大きいときには 1 を返します。 UTF-8 と 'use bytes' を認識し、get magic を扱い、必要なら引数を文字列に 強制します。 C も参照してください。 I32 sv_cmp(SV *const sv1, SV *const sv2) =for hackers Found in file sv.c =item sv_cmp_locale X =begin original Compares the strings in two SVs in a locale-aware manner. Is UTF-8 and 'use bytes' aware, handles get magic, and will coerce its args to strings if necessary. See also C. =end original 二つの SV の文字列をロケールを認識するような形で比較します。 UTF-8 と 'use bytes' を認識し、get magic を扱い、必要なら引数を文字列に 強制します。 C も参照してください。 I32 sv_cmp_locale(SV *const sv1, SV *const sv2) =for hackers Found in file sv.c =item sv_collxfrm X char* sv_collxfrm(SV *const sv, STRLEN *const nxp) =for hackers Found in file sv.c =item sv_collxfrm_flags X =begin original Add Collate Transform magic to an SV if it doesn't already have it. If the flags contain SV_GMAGIC, it handles get-magic. =end original まだなければ、照合変換 magic を SV に追加します。 フラグに SV_GMAGIC が含まれている場合、get-magic を扱います。 =begin original Any scalar variable may carry PERL_MAGIC_collxfrm magic that contains the scalar data of the variable, but transformed to such a format that a normal memory comparison can be used to compare the data according to the locale settings. =end original 任意のスカラ値は変数のスカラデータを含む PERL_MAGIC_collxfrm magic を 保持しているかもしれませんが、ロケール設定に従った比較に通常のメモリ比較が 使えるようなフォーマットに変換されます。 =for hackers Found in file sv.c =item sv_copypv X =begin original Copies a stringified representation of the source SV into the destination SV. Automatically performs any necessary mg_get and coercion of numeric values into strings. Guaranteed to preserve UTF8 flag even from overloaded objects. Similar in nature to sv_2pv[_flags] but operates directly on an SV instead of just the string. Mostly uses sv_2pv_flags to do its work, except when that would lose the UTF-8'ness of the PV. =end original ソース SV の文字列化表現をデスティネーション SV にコピーします。 必要な mg_get と数値から文字列への強制を自動的に行います。 オーバーロードされたオブジェクトからであっても UTF8 フラグが 保存されることを保証します。 事実上 sv_2pv[_flags] と似ていますが、単なる文字列ではなく SV に対して 直接操作します。 この作業を行うためにほとんどは sv_2pv_flags フラグを使います; 例外は PV の UTF-8 性が失われるときです。 void sv_copypv(SV *const dsv, SV *const ssv) =for hackers Found in file sv.c =item sv_dec X =begin original Auto-decrement of the value in the SV, doing string to numeric conversion if necessary. Handles 'get' magic and operator overloading. =end original SV にある値の自動デクリメントを行います; 必要なら文字列から数値への変換を 行います。 'get' magic と演算子オーバーロードをハンドルします。 void sv_dec(SV *const sv) =for hackers Found in file sv.c =item sv_eq X =begin original Returns a boolean indicating whether the strings in the two SVs are identical. Is UTF-8 and 'use bytes' aware, handles get magic, and will coerce its args to strings if necessary. =end original 二つの SV にある文字列が同一のものであるかどうかをあらわす真偽値を 返します。 UTF-8 と 'use bytes' を認識し、get magic を扱い、必要なら引数を文字列に 強制します。 I32 sv_eq(SV* sv1, SV* sv2) =for hackers Found in file sv.c =item sv_force_normal_flags X =begin original Undo various types of fakery on an SV: if the PV is a shared string, make a private copy; if we're a ref, stop refing; if we're a glob, downgrade to an xpvmg; if we're a copy-on-write scalar, this is the on-write time when we do the copy, and is also used locally. If C is set then a copy-on-write scalar drops its PV buffer (if any) and becomes SvPOK_off rather than making a copy. (Used where this scalar is about to be set to some other value.) In addition, the C parameter gets passed to C when unreffing. C calls this function with flags set to 0. =end original SV に対する様々な種類のごまかしを元に戻します: PV が共有文字列なら、プライベートなコピーを作ります; 参照しているなら 参照を止めます; グロブなら、xpvmg に降格します; コピーオンライト スカラなら、コピーは書き込み時に行われ、ローカルに使われます。 C がセットされているなら、コピーオンライトスカラは (もしあれば)PV バッファを落として、コピーを作る代わりに SvPOK_off に なります。 (このスカラが何か他の値にセットされようとした場所で使われます。) さらに、参照を止めるときに C に C 引数が 渡されます。 C は flags に 0 をセットしてこの関数を呼び出します。 void sv_force_normal_flags(SV *const sv, const U32 flags) =for hackers Found in file sv.c =item sv_free X =begin original Decrement an SV's reference count, and if it drops to zero, call C to invoke destructors and free up any memory used by the body; finally, deallocate the SV's head itself. Normally called via a wrapper macro C. =end original SV の参照カウントをデクリメントして、ゼロになったら、デストラクタを起動して ボディによって使われているメモリを解放するために C を呼び出します; 最後に、SV のヘッド地震を割り当て解除します。 通常はラッパーマクロ C 経由で呼び出されます。 void sv_free(SV *const sv) =for hackers Found in file sv.c =item sv_gets X =begin original Get a line from the filehandle and store it into the SV, optionally appending to the currently-stored string. =end original ファイルハンドルから 1 行読み込んで SV に保管し、オプションで既に 保管されている文字列に追記します。 char* sv_gets(SV *const sv, PerlIO *const fp, I32 append) =for hackers Found in file sv.c =item sv_grow X =begin original Expands the character buffer in the SV. If necessary, uses C and upgrades the SV to C. Returns a pointer to the character buffer. Use the C wrapper instead. =end original SV にある文字バッファを拡張します。 もし必要なら、C を使用して、SV を C へ昇格します。 文字バッファへのポインタを返します。 代わりに C ラッパーを使用してください。 char* sv_grow(SV *const sv, STRLEN newlen) =for hackers Found in file sv.c =item sv_inc X =begin original Auto-increment of the value in the SV, doing string to numeric conversion if necessary. Handles 'get' magic and operator overloading. =end original SV にある値の自動インクリメントを行います; もし必要なら、文字列から数値への変換を行います。 'get' magic と演算子オーバーロードをハンドルします。 void sv_inc(SV *const sv) =for hackers Found in file sv.c =item sv_insert X =begin original Inserts a string at the specified offset/length within the SV. Similar to the Perl substr() function. Handles get magic. =end original 文字列を、SV 中の指定されたオフセット/長さの位置に挿入します。 Perl の substr() 関数と同様のものです。 get magic をハンドルします。 void sv_insert(SV *const bigstr, const STRLEN offset, const STRLEN len, const char *const little, const STRLEN littlelen) =for hackers Found in file sv.c =item sv_insert_flags X =begin original Same as C, but the extra C are passed the C that applies to C. =end original C と同様ですが追加の C が C に適用される C に渡されます。 void sv_insert_flags(SV *const bigstr, const STRLEN offset, const STRLEN len, const char *const little, const STRLEN littlelen, const U32 flags) =for hackers Found in file sv.c =item sv_isa X =begin original Returns a boolean indicating whether the SV is blessed into the specified class. This does not check for subtypes; use C to verify an inheritance relationship. =end original SV が指定したクラスに bless されているかどうかを表わす真偽値を 返します。 これは、subtype をどのようにチェックするかを知らないので、 継承関係に確認するのに C を使います。 int sv_isa(SV* sv, const char *const name) =for hackers Found in file sv.c =item sv_isobject X =begin original 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. =end original SV が、bless されているオブジェクトを指す RV であるかどうかを表わす 真偽値を返します。 SV が RV でない場合、もしくはオブジェクトが bless されていない場合にはこれは false を返します。 int sv_isobject(SV* sv) =for hackers Found in file sv.c =item sv_len X =begin original Returns the length of the string in the SV. Handles magic and type coercion. See also C, which gives raw access to the xpv_cur slot. =end original SV にある文字列の長さを返します。 magic と型強制をハンドルします。 xpv_cur スロットへの生アクセスを提供する C も参照してください。 STRLEN sv_len(SV *const sv) =for hackers Found in file sv.c =item sv_len_utf8 X =begin original Returns the number of characters in the string in an SV, counting wide UTF-8 bytes as a single character. Handles magic and type coercion. =end original SV にある文字列の文字数を返します; ワイド UTF-8 バイトは一文字として 数えます。 magic と型強制をハンドルします。 STRLEN sv_len_utf8(SV *const sv) =for hackers Found in file sv.c =item sv_magic X =begin original Adds magic to an SV. First upgrades C to type C if necessary, then adds a new magic item of type C to the head of the magic list. =end original SV に magic を追加します。 必要ならまず C を型 C に昇格して、それから magic リストの 先頭に型 C の新しい magic アイテムを追加します。 =begin original See C (which C now calls) for a description of the handling of the C and C arguments. =end original C と C 引数の扱いに関する記述については (C が 呼び出す) C を参照してください。 =begin original You need to use C to add magic to SvREADONLY SVs and also to add more than one instance of the same 'how'. =end original SvREADONLY SV に magic を追加したり同じ 'how' の複数の実体を追加するには C を使う必要があります。 void sv_magic(SV *const sv, SV *const obj, const int how, const char *const name, const I32 namlen) =for hackers Found in file sv.c =item sv_magicext X =begin original Adds magic to an SV, upgrading it if necessary. Applies the supplied vtable and returns a pointer to the magic added. =end original SV に magic を追加して、必要なら昇格させます。 提供された vtable を適用して、追加した magic へのポインタを返します。 =begin original Note that C will allow things that C will not. In particular, you can add magic to SvREADONLY SVs, and add more than one instance of the same 'how'. =end original C は、C が出来ないことが出来ると言うことに 注意してください。 特に、SvREADONLY SV に magic を追加したり、同じ 'how' の複数の実体を 追加したりできます。 =begin original If C is greater than zero then a C I of C is stored, if C is zero then C is stored as-is and - as another special case - if C<(name && namlen == HEf_SVKEY)> then C is assumed to contain an C and is stored as-is with its REFCNT incremented. =end original C がゼロ以上なら、C に C の I<コピー> が保管されます; C がゼロなら C はそのまま保管されて - もう一つの特殊な 場合として - C<(name && namlen == HEf_SVKEY)> なら C は C を 含んでいるものと仮定されて、その REFCNT をインクリメントして、そのまま 保管されます。 =begin original (This is now used as a subroutine by C.) =end original (これは今では C によってサブルーチンとして使われます。) MAGIC * sv_magicext(SV *const sv, SV *const obj, const int how, const MGVTBL *const vtbl, const char *const name, const I32 namlen) =for hackers Found in file sv.c =item sv_mortalcopy X =begin original Creates a new SV which is a copy of the original SV (using C). The new SV is marked as mortal. It will be destroyed "soon", either by an explicit call to FREETMPS, or by an implicit call at places such as statement boundaries. See also C and C. =end original (C を使って)元の SV のコピーである、新しい SV を生成します。 生成された SV は揮発性である目印が付けられます。 これは FREETMPS の明示的な呼び出しか、文の境界のような場所での暗黙の 呼び出しによって「すぐに」破壊されます。 C と C も参照してください。 SV* sv_mortalcopy(SV *const oldsv) =for hackers Found in file sv.c =item sv_newmortal X =begin original Creates a new null SV which is mortal. The reference count of the SV is set to 1. It will be destroyed "soon", either by an explicit call to FREETMPS, or by an implicit call at places such as statement boundaries. See also C and C. =end original 揮発性である新たな null SV を生成します。 新たに作られた SV の参照カウントは 1 に設定されます。 これは FREETMPS の明示的な呼び出しか、文の境界のような場所での暗黙の 呼び出しによって「すぐに」破壊されます。 C と C も参照してください。 SV* sv_newmortal() =for hackers Found in file sv.c =item sv_newref X =begin original Increment an SV's reference count. Use the C wrapper instead. =end original SV の参照カウントをインクリメントします。 代わりに C ラッパーを使ってください。 SV* sv_newref(SV *const sv) =for hackers Found in file sv.c =item sv_pos_b2u X =begin original Converts the value pointed to by offsetp from a count of bytes from the start of the string, to a count of the equivalent number of UTF-8 chars. Handles magic and type coercion. =end original 文字列の先頭からバイト数で offsetp 離れたところから、UTF-8 文字として等価な 数の分だけ変換します。 magic と型強制をハンドルします。 void sv_pos_b2u(SV *const sv, I32 *const offsetp) =for hackers Found in file sv.c =item sv_pos_u2b X =begin original Converts the value pointed to by offsetp from a count of UTF-8 chars from the start of the string, to a count of the equivalent number of bytes; if lenp is non-zero, it does the same to lenp, but this time starting from the offset, rather than from the start of the string. Handles magic and type coercion. =end original 文字列の先頭から UTF-8 の文字数で offsetp 離れたところから、 等価なバイト数の分だけのところまでの値を変換します; lenp が非ゼロなら、これは lenp と同じですが、この場合は文字列の 先頭からではなく offset から始めます。 magic と型強制をハンドルします。 =begin original Use C in preference, which correctly handles strings longer than 2Gb. =end original 2Gb より長い文字列を正しく扱える C を優先して 使ってください。 void sv_pos_u2b(SV *const sv, I32 *const offsetp, I32 *const lenp) =for hackers Found in file sv.c =item sv_pos_u2b_flags X =begin original Converts the value pointed to by offsetp from a count of UTF-8 chars from the start of the string, to a count of the equivalent number of bytes; if lenp is non-zero, it does the same to lenp, but this time starting from the offset, rather than from the start of the string. Handles type coercion. I is passed to C, and usually should be C to handle magic. =end original 文字列の先頭から UTF-8 の文字数で offsetp 離れたところから、 等価なバイト数の分だけのところまでの値を変換します; lenp が非ゼロなら、これは lenp と同じですが、この場合は文字列の 先頭からではなく offset から始めます。 型強制を扱います。 I は C に渡され、通常は magic を扱うために C を指定します。 STRLEN sv_pos_u2b_flags(SV *const sv, STRLEN uoffset, STRLEN *const lenp, U32 flags) =for hackers Found in file sv.c =item sv_pvbyten_force X =begin original The backend for the C macro. Always use the macro instead. =end original C マクロのバックエンドです。 代わりに、常にマクロを使ってください。 char* sv_pvbyten_force(SV *const sv, STRLEN *const lp) =for hackers Found in file sv.c =item sv_pvn_force X =begin original Get a sensible string out of the SV somehow. A private implementation of the C macro for compilers which can't cope with complex macro expressions. Always use the macro instead. =end original SV から何か識別できる文字列を取り出します。 複雑なマクロ式を扱えないコンパイラのための、C マクロの プライベート実装です。 代わりに、常にマクロを使ってください。 char* sv_pvn_force(SV* sv, STRLEN* lp) =for hackers Found in file sv.c =item sv_pvn_force_flags X =begin original Get a sensible string out of the SV somehow. If C has C bit set, will C on C if appropriate, else not. C and C are implemented in terms of this function. You normally want to use the various wrapper macros instead: see C and C =end original SV から何か識別できる文字列を取り出します。 C の C ビットがセットされていると、適切なら C に C し、さもなければしません。 C と C はこの関数に関して実装されています。 通常は代わりに様々なラッパーマクロを使いたいでしょう: C と C を参照してください。 char* sv_pvn_force_flags(SV *const sv, STRLEN *const lp, const I32 flags) =for hackers Found in file sv.c =item sv_pvutf8n_force X =begin original The backend for the C macro. Always use the macro instead. =end original C マクロのバックエンドです。 代わりに、常にマクロを使ってください。 char* sv_pvutf8n_force(SV *const sv, STRLEN *const lp) =for hackers Found in file sv.c =item sv_reftype X =begin original Returns a string describing what the SV is a reference to. =end original SV がリファレンスしているものを記述した文字列を返します。 const char* sv_reftype(const SV *const sv, const int ob) =for hackers Found in file sv.c =item sv_replace X =begin original Make the first argument a copy of the second, then delete the original. The target SV physically takes over ownership of the body of the source SV and inherits its flags; however, the target keeps any magic it owns, and any magic in the source is discarded. Note that this is a rather specialist SV copying operation; most of the time you'll want to use C or one of its many macro front-ends. =end original 最初の引数を二つ目の引数のコピーにして、元のデータを削除します。 ターゲット SV は物理的にソース SV のボディの所有権を受け取って、フラグを 継承します; しかし、ターゲットは magic を保持したままで、ソースの magic は 捨てられます。 これは特殊な SV コピー操作であることに注意してください; ほとんどの場合 C か多くのこれのマクロフロントエンドを使いたいでしょう。 void sv_replace(SV *const sv, SV *const nsv) =for hackers Found in file sv.c =item sv_reset X =begin original Underlying implementation for the C Perl function. Note that the perl-level function is vaguely deprecated. =end original C Perl 関数の基礎となる実装です。 perl レベルの関数は漠然と廃止予定であることに注意してください。 void sv_reset(const char* s, HV *const stash) =for hackers Found in file sv.c =item sv_rvweaken X =begin original Weaken a reference: set the C flag on this RV; give the referred-to SV C magic if it hasn't already; and push a back-reference to this RV onto the array of backreferences associated with that magic. If the RV is magical, set magic will be called after the RV is cleared. =end original 参照を弱めます: この RV の C フラグをセットします; まだなければ 参照されている SB に C magic を与えます; そしてこの RV への後方参照を magic と関連づけられた後方参照の配列に プッシュします。 RV がマジカルなら、set magic は RV がクリアした後呼び出されます。 SV* sv_rvweaken(SV *const sv) =for hackers Found in file sv.c =item sv_setiv X =begin original Copies an integer into the given SV, upgrading first if necessary. Does not handle 'set' magic. See also C. =end original 整数を与えられた SV へコピーします; 必要なら最初に昇格します。 'set' magic をハンドルしません。 C も参照してください。 void sv_setiv(SV *const sv, const IV num) =for hackers Found in file sv.c =item sv_setiv_mg X =begin original Like C, but also handles 'set' magic. =end original C と同様ですが、'set' magic をハンドルします。 void sv_setiv_mg(SV *const sv, const IV i) =for hackers Found in file sv.c =item sv_setnv X =begin original Copies a double into the given SV, upgrading first if necessary. Does not handle 'set' magic. See also C. =end original 倍精度浮動小数点数を与えられた SV へコピーします; 必要なら最初に昇格します。 'set' magic をハンドルしません。 C も参照してください。 void sv_setnv(SV *const sv, const NV num) =for hackers Found in file sv.c =item sv_setnv_mg X =begin original Like C, but also handles 'set' magic. =end original C と同様ですが、'set' magic をハンドルします。 void sv_setnv_mg(SV *const sv, const NV num) =for hackers Found in file sv.c =item sv_setpv X =begin original Copies a string into an SV. The string must be null-terminated. Does not handle 'set' magic. See C. =end original 文字列を SV へコピーします。 文字列は null で終端されていなければなりません。 'set' magic をハンドルしません。 C を参照してください。 void sv_setpv(SV *const sv, const char *const ptr) =for hackers Found in file sv.c =item sv_setpvf X =begin original Works like C but copies the text into the SV instead of appending it. Does not handle 'set' magic. See C. =end original C のように動作しますが、SV にテキストを追加するのではなく コピーします。 'set' magic をハンドルしません。 C を参照してください。 void sv_setpvf(SV *const sv, const char *const pat, ...) =for hackers Found in file sv.c =item sv_setpvf_mg X =begin original Like C, but also handles 'set' magic. =end original C と同様ですが、'set' magic をハンドルします。 void sv_setpvf_mg(SV *const sv, const char *const pat, ...) =for hackers Found in file sv.c =item sv_setpviv X =begin original Copies an integer into the given SV, also updating its string value. Does not handle 'set' magic. See C. =end original 整数値を与えられた SV をコピーし、同様にその文字列値を更新します。 'set' magic をハンドルしません。 C を参照してください。 void sv_setpviv(SV *const sv, const IV num) =for hackers Found in file sv.c =item sv_setpviv_mg X =begin original Like C, but also handles 'set' magic. =end original C と同様ですが、'set' magic をハンドルします。 void sv_setpviv_mg(SV *const sv, const IV iv) =for hackers Found in file sv.c =item sv_setpvn X =begin original Copies a string into an SV. The C parameter indicates the number of bytes to be copied. If the C argument is NULL the SV will become undefined. Does not handle 'set' magic. See C. =end original 文字列を SV へコピーします。 パラメーター C はコピーされるバイト数を指示します。 C 引数が NULL なら SV は未定義値になります。 'set' magic をハンドルしません。 C を参照してください。 void sv_setpvn(SV *const sv, const char *const ptr, const STRLEN len) =for hackers Found in file sv.c =item sv_setpvn_mg X =begin original Like C, but also handles 'set' magic. =end original C と同様ですが、'set' magic をハンドルします。 void sv_setpvn_mg(SV *const sv, const char *const ptr, const STRLEN len) =for hackers Found in file sv.c =item sv_setpvs X =begin original Like C, but takes a literal string instead of a string/length pair. =end original C と同様ですが、文字列/長さの組ではなく、リテラルな文字列を 取ります。 void sv_setpvs(SV* sv, const char* s) =for hackers Found in file handy.h =item sv_setpv_mg X =begin original Like C, but also handles 'set' magic. =end original C と同様ですが、'set' magic をハンドルします。 void sv_setpv_mg(SV *const sv, const char *const ptr) =for hackers Found in file sv.c =item sv_setref_iv X =begin original Copies an integer into a new SV, optionally blessing the SV. The C argument will be upgraded to an RV. That RV will be modified to point to the new SV. The C argument indicates the package for the blessing. Set C to C to avoid the blessing. The new SV will have a reference count of 1, and the RV will be returned. =end original 整数値を、bless することもできる新たな SV へコピーします。 引数 C は RV へと昇格します。 この RV は新たな SV を指し示すように変更されます。 引数 C は bless するパッケージを指示するものです。 bless をしないためには、C に C をセットします。 新しい SV の参照カウントは 1 となり、RV が返されます。 SV* sv_setref_iv(SV *const rv, const char *const classname, const IV iv) =for hackers Found in file sv.c =item sv_setref_nv X =begin original Copies a double into a new SV, optionally blessing the SV. The C argument will be upgraded to an RV. That RV will be modified to point to the new SV. The C argument indicates the package for the blessing. Set C to C to avoid the blessing. The new SV will have a reference count of 1, and the RV will be returned. =end original 倍精度実数値を、bless することもできる新たな SV へコピーします。 引数 C は RV へと昇格します。 この RV は新たな SV を指し示すように変更されます。 引数 C は bless するパッケージを指示するものです。 bless をしないためには、C に C をセットします。 新しい SV の参照カウントは 1 となり、RV が返されます。 SV* sv_setref_nv(SV *const rv, const char *const classname, const NV nv) =for hackers Found in file sv.c =item sv_setref_pv X =begin original Copies a pointer into a new SV, optionally blessing the SV. The C argument will be upgraded to an RV. That RV will be modified to point to the new SV. If the C argument is NULL then C will be placed into the SV. The C argument indicates the package for the blessing. Set C to C to avoid the blessing. The new SV will have a reference count of 1, and the RV will be returned. =end original ポインタを、bless することもできる新たな SV へコピーします。 引数 C は RV へと昇格します。 この RV は新たな SV を指し示すように変更されます。 引数 C が NULL であれば、C が新たな SV に格納されます。 引数 C は bless するパッケージを指示するものです。 bless をしないためには、C に C をセットします。 新しい SV の参照カウントは 1 となり、RV が返されます。 =begin original Do not use with other Perl types such as HV, AV, SV, CV, because those objects will become corrupted by the pointer copy process. =end original HV, AV, SV, CV のような Perl の他の type を使わないようにしてください; これは、そういったオブジェクトにポインタのコピー処理を 行うことでおかしくなってしまうからです。 =begin original Note that C copies the string while this copies the pointer. =end original C は、このポインタのコピーではなく文字列を コピーしているということに注意してください。 SV* sv_setref_pv(SV *const rv, const char *const classname, void *const pv) =for hackers Found in file sv.c =item sv_setref_pvn X =begin original Copies a string into a new SV, optionally blessing the SV. The length of the string must be specified with C. The C argument will be upgraded to an RV. That RV will be modified to point to the new SV. The C argument indicates the package for the blessing. Set C to C to avoid the blessing. The new SV will have a reference count of 1, and the RV will be returned. =end original 文字列を、bless することもできる新たな SV へコピーします。 文字列の長さを C で指定しなければなりません。 引数 C は RV へと昇格します。 この RV は新たな SV を指し示すように変更されます。 引数 C は bless するパッケージを指示するものです。 bless をしないためには、C に C をセットします。 新しい SV の参照カウントは 1 となり、RV が返されます。 =begin original Note that C copies the pointer while this copies the string. =end original C は、文字列をコピーするのではなくポインタを コピーするということに注意してください。 SV* sv_setref_pvn(SV *const rv, const char *const classname, const char *const pv, const STRLEN n) =for hackers Found in file sv.c =item sv_setref_uv X =begin original Copies an unsigned integer into a new SV, optionally blessing the SV. The C argument will be upgraded to an RV. That RV will be modified to point to the new SV. The C argument indicates the package for the blessing. Set C to C to avoid the blessing. The new SV will have a reference count of 1, and the RV will be returned. =end original 整数値を、bless することもできる新たな SV へコピーします。 引数 C は RV へと昇格します。 この RV は新たな SV を指し示すように変更されます。 引数 C は bless するパッケージを指示するものです。 bless をしないためには、C に C をセットします。 新しい SV の参照カウントは 1 となり、RV が返されます。 SV* sv_setref_uv(SV *const rv, const char *const classname, const UV uv) =for hackers Found in file sv.c =item sv_setsv X =begin original Copies the contents of the source SV C into the destination SV C. The source SV may be destroyed if it is mortal, so don't use this function if the source SV needs to be reused. Does not handle 'set' magic. Loosely speaking, it performs a copy-by-value, obliterating any previous content of the destination. =end original 送り元の SV C の内容を、送り先の SV C にコピーします。 送り元の SV は、それが揮発性であった場合には破壊されるかもしれません; 従ってソース SV を再利用する必要がある場合にはこの関数は使わないでください。 'set' magic をハンドルしません。 大まかに言うと、送り先の以前の内容を消して、値としてのコピーを行います。 =begin original You probably want to use one of the assortment of wrappers, such as C, C, C and C. =end original おそらく C, C, C, C のようなラッパーの一つを使いたいでしょう。 void sv_setsv(SV *dstr, SV *sstr) =for hackers Found in file sv.c =item sv_setsv_flags X =begin original Copies the contents of the source SV C into the destination SV C. The source SV may be destroyed if it is mortal, so don't use this function if the source SV needs to be reused. Does not handle 'set' magic. Loosely speaking, it performs a copy-by-value, obliterating any previous content of the destination. If the C parameter has the C bit set, will C on C if appropriate, else not. If the C parameter has the C bit set then the buffers of temps will not be stolen. and C are implemented in terms of this function. =end original 送り元の SV C の内容を、送り先の SV C にコピーします。 送り元の SV は、それが揮発性であった場合には破壊されるかもしれません; 従ってソース SV を再利用する必要がある場合にはこの関数は使わないでください。 'set' magic をハンドルしません。 大まかに言うと、送り先の以前の内容を消して、値としてのコピーを行います。 C の C ビットがセットされていると、適切なら C に C し、さもなければしません。 C 引数の C ビットがセットされているなら、temps の バッファは盗まれません。 と C はこの関数に関して実装されています。 =begin original You probably want to use one of the assortment of wrappers, such as C, C, C and C. =end original おそらく C, C, C, C のようなラッパーの一つを使いたいでしょう。 =begin original This is the primary function for copying scalars, and most other copy-ish functions and macros use this underneath. =end original これはスカラをコピーする基本的な関数で、その他のほとんどのコピー的な 関数とマクロは基礎としてこれを使っています。 void sv_setsv_flags(SV *dstr, SV *sstr, const I32 flags) =for hackers Found in file sv.c =item sv_setsv_mg X =begin original Like C, but also handles 'set' magic. =end original C と同様ですが、'set' magic をハンドルします。 void sv_setsv_mg(SV *const dstr, SV *const sstr) =for hackers Found in file sv.c =item sv_setuv X =begin original Copies an unsigned integer into the given SV, upgrading first if necessary. Does not handle 'set' magic. See also C. =end original 符号なし整数を与えられた SV へコピーします; 必要ならまず昇格します。 'set' magic をハンドルしません。 C も参照してください。 void sv_setuv(SV *const sv, const UV num) =for hackers Found in file sv.c =item sv_setuv_mg X =begin original Like C, but also handles 'set' magic. =end original C と同様ですが、'set' magic をハンドルします。 void sv_setuv_mg(SV *const sv, const UV u) =for hackers Found in file sv.c =item sv_tainted X =begin original Test an SV for taintedness. Use C instead. bool sv_tainted(SV *const sv) =end original TSV の汚染を調べます。 代わりに C を使ってください。 bool sv_tainted(SV *const sv) =for hackers Found in file sv.c =item sv_true X =begin original Returns true if the SV has a true value by Perl's rules. Use the C macro instead, which may call C or may instead use an in-line version. =end original SV が Perl の規則で真の値を持っていれば真を返します。 C を呼び出すかも知れないし代わりにインライン版を使うかも知れない C マクロを代わりに使ってください。 I32 sv_true(SV *const sv) =for hackers Found in file sv.c =item sv_unmagic X =begin original Removes all magic of type C from an SV. =end original SV から C 型の全ての magic を取り除きます。 int sv_unmagic(SV *const sv, const int type) =for hackers Found in file sv.c =item sv_unref_flags X =begin original 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 C. The C argument can contain C to force the reference count to be decremented (otherwise the decrementing is conditional on the reference count being different from one or the reference being a readonly SV). See C. =end original SV の RV ステータスをアンセットし、RV によって参照されているものの 参照カウントを減じます。 これは C の反転したものであると考えられます。 C 引数は、参照カウントをデクリメントすることを強制するために C を含むことができます (さもなければデクリメントは参照カウントが 1 ではないか、読み込み専用 SV を 参照しているという条件で行われます)。 C を参照してください。 void sv_unref_flags(SV *const ref, const U32 flags) =for hackers Found in file sv.c =item sv_untaint X =begin original Untaint an SV. Use C instead. void sv_untaint(SV *const sv) =end original SV を被汚染化します。 代わりに C を使ってください。 void sv_untaint(SV *const sv) =for hackers Found in file sv.c =item sv_upgrade X =begin original Upgrade an SV to a more complex form. Generally adds a new body type to the SV, then copies across as much information as possible from the old body. You generally want to use the C macro wrapper. See also C. =end original SV をより複雑な形式へと昇格させます。 一般的に新しいボディ型を SV に追加して、古いボディから出来るだけ多くの情報を コピーします。 一般的には C マクロラッパーを使いたいでしょう。 C も参照してください。 void sv_upgrade(SV *const sv, svtype new_type) =for hackers Found in file sv.c =item sv_usepvn_flags X =begin original Tells an SV to use C 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 C should point to memory that was allocated by C. The string length, C, must be supplied. By default this function will realloc (i.e. move) the memory pointed to by C, so that pointer should not be freed or used by the programmer after giving it to sv_usepvn, and neither should any pointers from "behind" that pointer (e.g. ptr + 1) be used. =end original 自身の文字列値を得るのに C を使うように SV に指示します。 通常文字列は SV の内側に保管されますが、sv_usepvn によって SV が外側の 文字列を使えるようにできます。 C は C によって割り当てられたメモリを指しているべきです。 文字列の長さ C を指定しなければなりません。 デフォルトではこの関数は C で指されているメモリを realloc (つまり移動) するので、ポインタは sv_usepvn に与えられた後で解放されたりプログラマによって 使われたりするべきではありませんし、このポインタの「背後」(例えば ptr + 1) からのポインタを使うべきではありません。 =begin original If C & SV_SMAGIC is true, will call SvSETMAGIC. If C & SV_HAS_TRAILING_NUL is true, then C must be NUL, and the realloc will be skipped. (i.e. the buffer is actually at least 1 byte longer than C, and already meets the requirements for storing in C) =end original C & SV_SMAGIC が真なら、SvSETMAGIC を呼び出します。 C & SV_HAS_TRAILING_NUL が真なら、C は NUL で なければならず、realloc はスキップされます。 (つまりバッファは実際には少なくとも C より 1 バイト長く、既に C を保管する条件を満たしています。) void sv_usepvn_flags(SV *const sv, char* ptr, const STRLEN len, const U32 flags) =for hackers Found in file sv.c =item sv_utf8_decode X =begin original If the PV of the SV is an octet sequence in UTF-8 and contains a multiple-byte character, the C flag is turned on so that it looks like a character. If the PV contains only single-byte characters, the C flag stays being off. Scans PV for validity and returns false if the PV is invalid UTF-8. =end original SV の PV が UTF-8 のオクテット並びで複数バイト文字を含んでいるなら、 文字のように見えるように C フラグがオンになります。 PV が単一バイト文字だけを含んでいるなら、C フラグはオフのママです。 PV の妥当性をスキャンして、PV が妥当な UTF-8 ではないなら偽を返します。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 bool sv_utf8_decode(SV *const sv) =for hackers Found in file sv.c =item sv_utf8_downgrade X =begin original Attempts to convert the PV of an SV from characters to bytes. If the PV contains a character that cannot fit in a byte, this conversion will fail; in this case, either returns false or, if C is not true, croaks. =end original SV の PV を文字からバイトに変換しようとします。 PV にバイトに収まらない文字が含まれているなら、この変換は失敗します; この場合、偽を返すか、C が真でないなら、croak します。 =begin original This is not as a general purpose Unicode to byte encoding interface: use the Encode extension for that. =end original これは汎用の Unicode からバイトエンコーディングへのインターフェースでは ありません: そのような目的には Encode エクステンションを使ってください。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 bool sv_utf8_downgrade(SV *const sv, const bool fail_ok) =for hackers Found in file sv.c =item sv_utf8_encode X =begin original Converts the PV of an SV to UTF-8, but then turns the C flag off so that it looks like octets again. =end original SV の PV を UTF-8 に変換しますが、再びオクテットのように見えるように C フラグをオフにします。 void sv_utf8_encode(SV *const sv) =for hackers Found in file sv.c =item sv_utf8_upgrade X =begin original Converts the PV of an SV to its UTF-8-encoded form. Forces the SV to string form if it is not already. Will C on C if appropriate. Always sets the SvUTF8 flag to avoid future validity checks even if the whole string is the same in UTF-8 as not. Returns the number of bytes in the converted string =end original SV の PV を UTF-8 エンコードされた形式に変換します。 もしまだ行われていなければ、SV を文字列形式に強制します。 適切なら C に C します。 例え文字列全体が UTF-8 で同じでも、将来の正当性チェックを 避けるために、常に SvUTF8 フラグがセットされます。 変換した文字列のバイト数を返します。 =begin original This is not as a general purpose byte encoding to Unicode interface: use the Encode extension for that. =end original これは汎用のバイトエンコーディングから Unicode へのインターフェースでは ありません: そのような目的には Encode エクステンションを使ってください。 STRLEN sv_utf8_upgrade(SV *sv) =for hackers Found in file sv.c =item sv_utf8_upgrade_flags X =begin original Converts the PV of an SV to its UTF-8-encoded form. Forces the SV to string form if it is not already. Always sets the SvUTF8 flag to avoid future validity checks even if all the bytes are invariant in UTF-8. If C has C bit set, will C on C if appropriate, else not. Returns the number of bytes in the converted string C and C are implemented in terms of this function. =end original SV の PV を UTF-8 エンコードされた形式に変換します。 もしまだ行われていなければ、SV を文字列形式に強制します。 例え全てのバイトが UTF-8 と変わらなくても、将来の正当性チェックを 避けるために、常に SvUTF8 フラグがセットされます。 C の C ビットがセットされていると、適切なら C に C し、さもなければしません。 変換した文字列のバイト数を返します。 C と C はこの関数に関して 実装されています。 =begin original This is not as a general purpose byte encoding to Unicode interface: use the Encode extension for that. =end original これは汎用のバイトエンコーディングから Unicode へのインターフェースでは ありません: そのような目的には Encode エクステンションを使ってください。 STRLEN sv_utf8_upgrade_flags(SV *const sv, const I32 flags) =for hackers Found in file sv.c =item sv_utf8_upgrade_nomg X =begin original Like sv_utf8_upgrade, but doesn't do magic on C =end original sv_utf8_upgrade と同様ですが C にマジックを適用しません。 STRLEN sv_utf8_upgrade_nomg(SV *sv) =for hackers Found in file sv.c =item sv_vcatpvf X =begin original Processes its arguments like C and appends the formatted output to an SV. Does not handle 'set' magic. See C. =end original 引数を C のように処理してフォーマットした出力を SV に追加します。 'set' magic をハンドルしません。 C を参照してください。 =begin original Usually used via its frontend C. =end original 普通はフロントエンドである C 経由で使われます。 void sv_vcatpvf(SV *const sv, const char *const pat, va_list *const args) =for hackers Found in file sv.c =item sv_vcatpvfn X =begin original Processes its arguments like C 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 C if results are untrustworthy (often due to the use of locales). =end original 引数を C のように処理してフォーマットした出力を SV に追加します。 C スタイルの変数引数リストがない(NULL)場合には Sv の配列を使用します。 汚染チェックが有効の状態で実行すると、(しばしばロケールの使用によって 結果が信頼できないものなら、C 経由で示します。 =begin original Usually used via one of its frontends C and C. =end original 普通はフロントエンドである C や C 経由で 使われます。 void sv_vcatpvfn(SV *const sv, const char *const pat, const STRLEN patlen, va_list *const args, SV **const svargs, const I32 svmax, bool *const maybe_tainted) =for hackers Found in file sv.c =item sv_vcatpvf_mg X =begin original Like C, but also handles 'set' magic. =end original C と同様ですが、'set' magic をハンドルします。 =begin original Usually used via its frontend C. =end original 普通はフロントエンドである C 経由で使われます。 void sv_vcatpvf_mg(SV *const sv, const char *const pat, va_list *const args) =for hackers Found in file sv.c =item sv_vsetpvf X =begin original Works like C but copies the text into the SV instead of appending it. Does not handle 'set' magic. See C. =end original C と同様に動作しますが、追加するのではなく SV にテキストを コピーします。 'set' magic をハンドルしません。 C を参照してください。 =begin original Usually used via its frontend C. =end original 普通はフロントエンドである C 経由で使われます。 void sv_vsetpvf(SV *const sv, const char *const pat, va_list *const args) =for hackers Found in file sv.c =item sv_vsetpvfn X =begin original Works like C but copies the text into the SV instead of appending it. =end original C のように動作しますが、SV にテキストを追加するのではなく コピーします。 =begin original Usually used via one of its frontends C and C. =end original 普通はフロントエンドである C や C 経由で 使われます。 void sv_vsetpvfn(SV *const sv, const char *const pat, const STRLEN patlen, va_list *const args, SV **const svargs, const I32 svmax, bool *const maybe_tainted) =for hackers Found in file sv.c =item sv_vsetpvf_mg X =begin original Like C, but also handles 'set' magic. =end original C と同様ですが、'set' magic をハンドルします。 =begin original Usually used via its frontend C. =end original 普通はフロントエンドである C 経由で使われます。 void sv_vsetpvf_mg(SV *const sv, const char *const pat, va_list *const args) =for hackers Found in file sv.c =back =head1 Unicode Support (Unicode 対応) =over 8 =item bytes_from_utf8 X =begin original Converts a string C of length C from UTF-8 into native byte encoding. Unlike C but like C, returns a pointer to the newly-created string, and updates C to contain the new length. Returns the original string if no conversion occurs, C is unchanged. Do nothing if C points to 0. Sets C to 0 if C is converted or consisted entirely of characters that are invariant in utf8 (i.e., US-ASCII on non-EBCDIC machines). =end original 長さ C の文字列 C を UTF-8 からネイティブなバイトエンコーディングに 変換します。 C と異なりますが C と同様、 新しく作成された文字列へのポインタを返し、C を新しい長さで更新します。 変換が行われなければ元の文字列を返し、C は変更されません。 C が 0 を指しているなら何もしません。 C が変換されたか、utf8 でも変わらない文字だけで構成されているなら (つまり非 EBCDIC マシンでの US-ASCII なら) C を 0 にセットします。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 U8* bytes_from_utf8(const U8 *s, STRLEN *len, bool *is_utf8) =for hackers Found in file utf8.c =item bytes_to_utf8 X =begin original Converts a string C of length C bytes from the native encoding into UTF-8. Returns a pointer to the newly-created string, and sets C to reflect the new length in bytes. =end original 長さ C バイトの文字列 C を、ネイティブなエンコーディングから UTF-8 エンコーディングに変換します。 新しく作成された文字列へのポインタを返し、C に新しい長さを バイトで反映させます。 =begin original A NUL character will be written after the end of the string. =end original 文字列の末尾に NUL 文字が書かれます。 =begin original If you want to convert to UTF-8 from encodings other than the native (Latin1 or EBCDIC), see sv_recode_to_utf8(). =end original ネイティブ以外のエンコーディング (Latin1 または EBCDIC) から UTF-8 に 変換したいなら、sv_recode_to_utf8() を参照してください。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 U8* bytes_to_utf8(const U8 *s, STRLEN *len) =for hackers Found in file utf8.c =item foldEQ_utf8 X =begin original Returns true if the leading portions of the strings s1 and s2 (either or both of which may be in UTF-8) are the same case-insensitively; false otherwise. How far into the strings to compare is determined by other input parameters. =end original 文字列 s1 と s2 の先頭部分(どちらかまたは両方は UTF-8 かもしれません)が 大文字小文字を無視して同じなら真を返し、 さもなければ偽を返します。 文字列をどの程度比較するかは他の入力パラメータによって決定されます。 =begin original If u1 is true, the string s1 is assumed to be in UTF-8-encoded Unicode; otherwise it is assumed to be in native 8-bit encoding. Correspondingly for u2 with respect to s2. =end original u1 が真なら、文字列 s1 は UTF-8 エンコードされた Unicode であると 仮定されます; さもなければ、ネイティブな 8 ビットエンコーディングであると仮定されます。 同様に、u2 によって s2 を仮定します。 =begin original For case-insensitiveness, the "casefolding" of Unicode is used instead of upper/lowercasing both the characters, see http://www.unicode.org/unicode/reports/tr21/ (Case Mappings). =end original 大文字小文字の虫に関して、Unicode の「畳み込み化」は文字の大文字化/小文字化の 両方の代わりに使われます; http://www.unicode.org/unicode/reports/tr21/ (Case Mappings) を 参照してください。 I32 foldEQ_utf8(const char *s1, char **pe1, UV l1, bool u1, const char *s2, char **pe2, UV l2, bool u2) =for hackers Found in file utf8.c =item is_ascii_string X =begin original Returns true if the first C bytes of the given string are the same whether or not the string is encoded in UTF-8 (or UTF-EBCDIC on EBCDIC machines). That is, if they are invariant. On ASCII-ish machines, only ASCII characters fit this definition, hence the function's name. =end original 与えられた文字列の最初の C バイトが、UTF-8 (または EBCDIC マシンでは UTF-EBCDIC) でエンコードされているかどうかに関わらず、同じ場合に 真を返します。 つまり、これらが不変の場合です。 ASCII 風のマシンでは、ASCII 文字のみがこの条件に一致するので、 この関数名になっています。 =begin original See also is_utf8_string(), is_utf8_string_loclen(), and is_utf8_string_loc(). =end original is_utf8_string(), is_utf8_string_loclen(), is_utf8_string_loc() も 参照してください。 bool is_ascii_string(const U8 *s, STRLEN len) =for hackers Found in file utf8.c =item is_utf8_char X =begin original Tests if some arbitrary number of bytes begins in a valid UTF-8 character. Note that an INVARIANT (i.e. ASCII on non-EBCDIC machines) character is a valid UTF-8 character. The actual number of bytes in the UTF-8 character will be returned if it is valid, otherwise 0. =end original 任意の数のバイト列が妥当な UTF-8 文字から始まるかどうかをテストします。 INVARIANT (つまり 非 EBCDIC マシンでは ASCII) は妥当な UTF-8 文字であることに 注意してください。 妥当であれば UTF-8 文字の実際のバイト数が返され、さもなければ 0 が 返されます。 STRLEN is_utf8_char(const U8 *s) =for hackers Found in file utf8.c =item is_utf8_string X =begin original Returns true if first C bytes of the given string form a valid UTF-8 string, false otherwise. If C is 0, it will be calculated using C. Note that 'a valid UTF-8 string' does not mean 'a string that contains code points above 0x7F encoded in UTF-8' because a valid ASCII string is a valid UTF-8 string. =end original 文字列の最初の C バイトが妥当な UTF-8 文字列なら真を返し、さもなければ 偽を返します。 C が 0 の場合、C を使って計算します。 「妥当な UTF-8 文字列」は「UTF-8 でエンコードされた、0x7F を超える符号位置の 文字を含む文字列」という意味ではないことに注意してください; なぜなら 妥当な ASCII 文字列は妥当な UTF-8 文字列だからです。 =begin original See also is_ascii_string(), is_utf8_string_loclen(), and is_utf8_string_loc(). =end original is_ascii_string(), is_utf8_string_loclen(), is_utf8_string_loc() も 参照してください。 bool is_utf8_string(const U8 *s, STRLEN len) =for hackers Found in file utf8.c =item is_utf8_string_loc X =begin original Like is_utf8_string() but stores the location of the failure (in the case of "utf8ness failure") or the location s+len (in the case of "utf8ness success") in the C. =end original is_utf8_string() と同様ですが、C に、(「utf8 失敗」の場合)失敗した 位置を、(「utf8 成功」の場合) s+len の位置を保管します。 =begin original See also is_utf8_string_loclen() and is_utf8_string(). =end original is_utf8_string_loclen() と is_utf8_string() も参照してください。 bool is_utf8_string_loc(const U8 *s, STRLEN len, const U8 **p) =for hackers Found in file utf8.c =item is_utf8_string_loclen X =begin original Like is_utf8_string() but stores the location of the failure (in the case of "utf8ness failure") or the location s+len (in the case of "utf8ness success") in the C, and the number of UTF-8 encoded characters in the C. =end original is_utf8_string() と同様ですが、C に、(「utf8 失敗」の場合)失敗した 位置を、(「utf8 成功」の場合) s+len の位置を保管し、UTF-8 エンコードされた 文字の数を C に保管します。 =begin original See also is_utf8_string_loc() and is_utf8_string(). =end original is_utf8_string_loc() と is_utf8_string() も参照してください。 bool is_utf8_string_loclen(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el) =for hackers Found in file utf8.c =item pv_uni_display X =begin original Build to the scalar dsv a displayable version of the string spv, length len, the displayable version being at most pvlim bytes long (if longer, the rest is truncated and "..." will be appended). =end original スカラ dsv を文字列 spv 長さ len の表示可能なバージョンに構築します; 表示可能なバージョンは最大でも pvlim バイトの長さです (もしより長ければ、 残りは切り詰められて "..." が追加されます)。 =begin original The flags argument can have UNI_DISPLAY_ISPRINT set to display isPRINT()able characters as themselves, UNI_DISPLAY_BACKSLASH to display the \\[nrfta\\] as the backslashed versions (like '\n') (UNI_DISPLAY_BACKSLASH is preferred over UNI_DISPLAY_ISPRINT for \\). UNI_DISPLAY_QQ (and its alias UNI_DISPLAY_REGEX) have both UNI_DISPLAY_BACKSLASH and UNI_DISPLAY_ISPRINT turned on. =end original flags 引数には、isPRINT() 可能な文字をそのまま表示する UNI_DISPLAY_ISPRINT、 \\[nrfta\\] を ('\n' のように) バックスラッシュ版として表示する UNI_DISPLAY_BACKSLASH を含むことができます (UNI_DISPLAY_BACKSLASH は \\ に関して UNI_DISPLAY_ISPRINT より優先されます)。 UNI_DISPLAY_QQ (およびその別名である UNI_DISPLAY_REGEX) は UNI_DISPLAY_BACKSLASH と UNI_DISPLAY_ISPRINT の両方をオンにします。 =begin original The pointer to the PV of the dsv is returned. =end original dsv の PV へのポインタが返されます。 char* pv_uni_display(SV *dsv, const U8 *spv, STRLEN len, STRLEN pvlim, UV flags) =for hackers Found in file utf8.c =item sv_cat_decode X =begin original The encoding is assumed to be an Encode object, the PV of the ssv is assumed to be octets in that encoding and decoding the input starts from the position which (PV + *offset) pointed to. The dsv will be concatenated the decoded UTF-8 string from ssv. Decoding will terminate when the string tstr appears in decoding output or the input ends on the PV of the ssv. The value which the offset points will be modified to the last input position on the ssv. =end original encoding は Encode オブジェクトであると仮定して、また ssv の PV は そのエンコーディングのオクテットであると仮定して、入力のデコードは (PV + *offset) が指す位置から開始されます。 dsv は ssv からデコードされた UTF-8 文字列と連結されます。 デコードは文字列 str がデコード出力に現れるか、ssv の PV の入力が 終わったときに終了します。 オフセットが指す値は ssv の最後の入力位置によって修正されます。 =begin original Returns TRUE if the terminator was found, else returns FALSE. =end original 終端子が見付かれば TRUE を、さもなければ FALSE を返します。 bool sv_cat_decode(SV* dsv, SV *encoding, SV *ssv, int *offset, char* tstr, int tlen) =for hackers Found in file sv.c =item sv_recode_to_utf8 X =begin original The encoding is assumed to be an Encode object, on entry the PV of the sv is assumed to be octets in that encoding, and the sv will be converted into Unicode (and UTF-8). =end original encoding は Encode オブジェクトであると仮定して、また sv の PV のエントリは そのエンコーディングのオクテットであると仮定して、sv を Unicode (と UTF-8) に 変換します。 =begin original If the sv already is UTF-8 (or if it is not POK), or if the encoding is not a reference, nothing is done to the sv. If the encoding is not an C Encoding object, bad things will happen. (See F and L). =end original sv が既に UTF-8 なら(または POK でなければ)、あるいは encoding が リファレンスでなければ、sv に対して何もしません。 encoding が C エンコーディングオブジェクトでなければ、 悪いことが起こります。 (F と L を参照してください)。 =begin original The PV of the sv is returned. =end original sv の PV が返されます。 char* sv_recode_to_utf8(SV* sv, SV *encoding) =for hackers Found in file sv.c =item sv_uni_display X =begin original Build to the scalar dsv a displayable version of the scalar sv, the displayable version being at most pvlim bytes long (if longer, the rest is truncated and "..." will be appended). =end original スカラ dsv をスカラ sv の表示可能なバージョンに構築します; 表示可能な バージョンは最大でも pvlim バイトの長さです (もしより長ければ、残りは 切り詰められて "..." が追加されます)。 =begin original The flags argument is as in pv_uni_display(). =end original flags 引数は pv_uni_display() と同様です。 =begin original The pointer to the PV of the dsv is returned. =end original dsv の PV へのポインタが返されます。 char* sv_uni_display(SV *dsv, SV *ssv, STRLEN pvlim, UV flags) =for hackers Found in file utf8.c =item to_utf8_case X =begin original The "p" contains the pointer to the UTF-8 string encoding the character that is being converted. =end original "p" は、変換された UTF-8 文字列エンコーディングの文字へのポインタを 含みます。 =begin original The "ustrp" is a pointer to the character buffer to put the conversion result to. The "lenp" is a pointer to the length of the result. =end original "ustrp" は変換結果を入れた文字バッファへのポインタです。 "lenp" は結果の長さへのポインタです。 =begin original The "swashp" is a pointer to the swash to use. =end original "swashp" は使う swash へのポインタです。 =begin original Both the special and normal mappings are stored in lib/unicore/To/Foo.pl, and loaded by SWASHNEW, using lib/utf8_heavy.pl. The special (usually, but not always, a multicharacter mapping), is tried first. =end original 特殊と通常の両方のマッピングは lib/unicore/To/Foo.pl に保管され、 lib/utf8_heavy.pl を使って SWASHNEW によって読み込まれます。 特殊(普通は複数文字マッピングですが常にそうというわけではありません)を 先に試します。 =begin original The "special" is a string like "utf8::ToSpecLower", which means the hash %utf8::ToSpecLower. The access to the hash is through Perl_to_utf8_case(). =end original 「特殊」とは、ハッシュ %utf8::ToSpecLower を意味する "utf8::ToSpecLower" のような文字列です。 ハッシュへのアクセスは Perl_to_utf8_case() を通します。 =begin original The "normal" is a string like "ToLower" which means the swash %utf8::ToLower. =end original 「通常」とは、swash %utf8::ToLower を意味する "ToLower" のような文字列です。 UV to_utf8_case(const U8 *p, U8* ustrp, STRLEN *lenp, SV **swashp, const char *normal, const char *special) =for hackers Found in file utf8.c =item to_utf8_fold X =begin original Convert the UTF-8 encoded character at p to its foldcase version and store that in UTF-8 in ustrp and its length in bytes in lenp. Note that the ustrp needs to be at least UTF8_MAXBYTES_CASE+1 bytes since the foldcase version may be longer than the original character (up to three characters). =end original p にある UTF-8 エンコードされた文字を畳み込み文字版に変換して、UTF-8 エンコードしたものを ustrp に、そのバイト数を lenp に保管します。 畳み込み文字版は元の文字より(最大 3 文字)長くなるかも知れないので、ustrp は 少なくとも UTF8_MAXBYTES_CASE+1 バイト必要であることに注意してください。 =begin original The first character of the foldcased version is returned (but note, as explained above, that there may be more.) =end original 最初の文字の畳み込み文字版が返されます(しかし、上述の通り、もっとあるかも しれません。) UV to_utf8_fold(const U8 *p, U8* ustrp, STRLEN *lenp) =for hackers Found in file utf8.c =item to_utf8_lower X =begin original Convert the UTF-8 encoded character at p to its lowercase version and store that in UTF-8 in ustrp and its length in bytes in lenp. Note that the ustrp needs to be at least UTF8_MAXBYTES_CASE+1 bytes since the lowercase version may be longer than the original character. =end original p にある UTF-8 エンコードされた文字を小文字版に変換して、UTF-8 エンコードしたものを ustrp に、そのバイト数を lenp に保管します。 小文字版は元の文字より長くなるかも知れないので、ustrp は少なくとも UTF8_MAXBYTES_CASE+1 バイト必要であることに注意してください。 =begin original The first character of the lowercased version is returned (but note, as explained above, that there may be more.) =end original 最初の文字の小文字版が返されます(しかし、上述の通り、もっとあるかも しれません。) UV to_utf8_lower(const U8 *p, U8* ustrp, STRLEN *lenp) =for hackers Found in file utf8.c =item to_utf8_title X =begin original Convert the UTF-8 encoded character at p to its titlecase version and store that in UTF-8 in ustrp and its length in bytes in lenp. Note that the ustrp needs to be at least UTF8_MAXBYTES_CASE+1 bytes since the titlecase version may be longer than the original character. =end original p にある UTF-8 エンコードされた文字をタイトル文字版に変換して、UTF-8 エンコードしたものを ustrp に、そのバイト数を lenp に保管します。 タイトル文字版は元の文字より長くなるかも知れないので、ustrp は少なくとも UTF8_MAXBYTES_CASE+1 バイト必要であることに注意してください。 =begin original The first character of the titlecased version is returned (but note, as explained above, that there may be more.) =end original 最初の文字のタイトル文字版が返されます(しかし、上述の通り、もっとあるかも しれません。) UV to_utf8_title(const U8 *p, U8* ustrp, STRLEN *lenp) =for hackers Found in file utf8.c =item to_utf8_upper X =begin original Convert the UTF-8 encoded character at p to its uppercase version and store that in UTF-8 in ustrp and its length in bytes in lenp. Note that the ustrp needs to be at least UTF8_MAXBYTES_CASE+1 bytes since the uppercase version may be longer than the original character. =end original p にある UTF-8 エンコードされた文字を大文字版に変換して、UTF-8 エンコードしたものを ustrp に、そのバイト数を lenp に保管します。 小文字版は元の文字より長くなるかも知れないので、ustrp は少なくとも UTF8_MAXBYTES_CASE+1 バイト必要であることに注意してください。 =begin original The first character of the uppercased version is returned (but note, as explained above, that there may be more.) =end original 最初の文字の大文字版が返されます(しかし、上述の通り、もっとあるかも しれません。) UV to_utf8_upper(const U8 *p, U8* ustrp, STRLEN *lenp) =for hackers Found in file utf8.c =item utf8n_to_uvchr X =begin original Returns the native character value of the first character in the string C which is assumed to be in UTF-8 encoding; C will be set to the length, in bytes, of that character. =end original UTF-8 エンコーディングされていると仮定されている文字列 C の最初の文字の ネイティブな符号位置を返します; C にはその文字のバイト数が セットされます。 =begin original length and flags are the same as utf8n_to_uvuni(). =end original length と flags は utf8n_to_uvuni() と同じです。 UV utf8n_to_uvchr(const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags) =for hackers Found in file utf8.c =item utf8n_to_uvuni X =begin original Bottom level UTF-8 decode routine. Returns the code point value of the first character in the string C which is assumed to be in UTF-8 (or UTF-EBCDIC) encoding and no longer than C bytes; C will be set to the length, in bytes, of that character. =end original 最低レベルの UTF-8 デコードルーチンです。 UTF-8 (または UTF-EBCDIC) エンコーディングされていて C バイトより 長くはないと仮定されている文字列 C の最初の文字の符号位置を返します; C にはその文字のバイト数がセットされます。 =begin original The value of C determines the behavior when C does not point to a well-formed UTF-8 character. If C is 0, when a malformation is found, C is set to the expected length of the UTF-8 character in bytes, zero is returned, and if UTF-8 warnings haven't been lexically disabled, a warning is raised. =end original C の値は、C が整形された UTF-8 文字を指していない場合の 振る舞いを決定します。 C が 0 の場合、不正な文字が見つかると、 C は想定される UTF-8 文字のバイト数がセットされ、ゼロが 返され、 UTF-8 警告がレキシカルに無効になっていない場合、 警告が発生します。 =begin original The UTF8_CHECK_ONLY flag overrides the behavior when a non-allowed (by other flags) malformation is found. If this flag is set, the routine assumes that the caller will raise a warning, and this function will silently just set C to C<-1> and return zero. =end original UTF8_CHECK_ONLY フラグは、(他のフラグによって) 許されない不正が見つかった ときの振る舞いを上書きします。 このフラグがセットされると、ルーチンは、呼び出し側が警告を発生させて、 この関数は暗黙に C を C<-1> にセットしてゼロを返すことを仮定します。 =begin original Most code should use utf8_to_uvchr() rather than call this directly. =end original ほとんどのコードではこれを直接呼び出さずに utf8_to_uvchr() を使うべきです。 UV utf8n_to_uvuni(const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags) =for hackers Found in file utf8.c =item utf8_distance X =begin original Returns the number of UTF-8 characters between the UTF-8 pointers C and C. =end original UTF-8 ポインタ C と C の間の UTF-8 文字の数を返します。 =begin original WARNING: use only if you *know* that the pointers point inside the same UTF-8 buffer. =end original 警告: ポインタが同じ UTF-8 バッファの中を指していることを「知っている」 場合にのみ使ってください。 IV utf8_distance(const U8 *a, const U8 *b) =for hackers Found in file utf8.c =item utf8_hop X =begin original Return the UTF-8 pointer C displaced by C characters, either forward or backward. =end original 前または後ろに C 文字だけずらした UTF-8 ポインタ C を返します。 =begin original WARNING: do not use the following unless you *know* C is within the UTF-8 data pointed to by C *and* that on entry C is aligned on the first byte of character or just after the last byte of a character. =end original 警告: C が C で指されている UTF-8 データの内側であることと、 エントリ C が文字の最初のバイトか文字の最後のバイトの直後に 位置合わせされているということが「分かっている」場合以外は 使わないでください。 U8* utf8_hop(const U8 *s, I32 off) =for hackers Found in file utf8.c =item utf8_length X =begin original Return the length of the UTF-8 char encoded string C in characters. Stops at C (inclusive). If C s> or if the scan would end up past C, croaks. =end original UTF-8 文字エンコードされた文字列 C の文字数を返します。 C で停止します(これも含みます)。 C s> であったり、スキャンが C を超えて停止すると、croak します。 STRLEN utf8_length(const U8* s, const U8 *e) =for hackers Found in file utf8.c =item utf8_to_bytes X =begin original Converts a string C of length C from UTF-8 into native byte encoding. Unlike C, this over-writes the original string, and updates len to contain the new length. Returns zero on failure, setting C to -1. =end original 長さ C の文字列 C を UTF-8 からネイティブなバイトエンコーディングに 変換します。 C と違って、これは元の文字列を上書きし、新しい長さで len を 更新します。 失敗時にはゼロを返し、C に -1 をセットします。 =begin original If you need a copy of the string, see C. =end original 文字列のコピーが必要なら、C を参照してください。 =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 U8* utf8_to_bytes(U8 *s, STRLEN *len) =for hackers Found in file utf8.c =item utf8_to_uvchr X =begin original Returns the native code point of the first character in the string C which is assumed to be in UTF-8 encoding; C will be set to the length, in bytes, of that character. =end original UTF-8 エンコーディングされていると仮定されている文字列 C の最初の文字の ネイティブな符号位置を返します; C にはその文字のバイト数が セットされます。 =begin original If C does not point to a well-formed UTF-8 character, zero is returned and retlen is set, if possible, to -1. =end original C が整形された UTF-8 文字を指していない場合、ゼロが返され、もし可能なら retlen は -1 がセットされます。 UV utf8_to_uvchr(const U8 *s, STRLEN *retlen) =for hackers Found in file utf8.c =item utf8_to_uvuni X =begin original Returns the Unicode code point of the first character in the string C which is assumed to be in UTF-8 encoding; C will be set to the length, in bytes, of that character. =end original UTF-8 エンコーディングされていると仮定されている文字列 C の最初の文字の Unicode 符号位置を返します; C にはその文字のバイト数が セットされます。 =begin original This function should only be used when the returned UV is considered an index into the Unicode semantic tables (e.g. swashes). =end original この関数は、返された UV が Unicode 意味論テーブル (つまり swash) への インデックスとして考えられる場合にのみ使われるべきです。 =begin original If C does not point to a well-formed UTF-8 character, zero is returned and retlen is set, if possible, to -1. =end original C が整形された UTF-8 文字を指していない場合、ゼロが返され、もし可能なら retlen は -1 がセットされます。 UV utf8_to_uvuni(const U8 *s, STRLEN *retlen) =for hackers Found in file utf8.c =item uvchr_to_utf8 X =begin original Adds the UTF-8 representation of the Native code point C to the end of the string C; C should be have at least C free bytes available. The return value is the pointer to the byte after the end of the new character. In other words, =end original ネイティブ符号位置 C の UTF-8 表現を文字列 C の末尾に追加します; C は少なくとも C バイトの空きが必要です。 返り値は新しい文字の末尾の次のバイトへのポインタです。 言い換えると: d = uvchr_to_utf8(d, uv); =begin original is the recommended wide native character-aware way of saying =end original が、ネイティブな文字を認識した形で以下のようなことをするときの推奨する 方法です: *(d++) = uv; U8* uvchr_to_utf8(U8 *d, UV uv) =for hackers Found in file utf8.c =item uvuni_to_utf8_flags X =begin original Adds the UTF-8 representation of the code point C to the end of the string C; C should have at least C free bytes available. The return value is the pointer to the byte after the end of the new character. In other words, =end original 符号位置 C の UTF-8 表現を文字列 C の末尾に追加します; C は少なくとも C バイトの空きが必要です。 返り値は新しい文字の末尾の次のバイトへのポインタです。 言い換えると: d = uvuni_to_utf8_flags(d, uv, flags); =begin original or, in most cases, =end original または、ほとんどの場合では、 d = uvuni_to_utf8(d, uv); =begin original (which is equivalent to) =end original (これは以下と等価です) d = uvuni_to_utf8_flags(d, uv, 0); =begin original This is the recommended Unicode-aware way of saying =end original これは、以下のようなものの Unicode を考慮に入れた方法として 推奨されます。 *(d++) = uv; U8* uvuni_to_utf8_flags(U8 *d, UV uv, UV flags) =for hackers Found in file utf8.c =back =head1 Variables created by C and C internal functions (C および C 内部関数で作成された変数) =over 8 =item ax X =begin original Variable which is setup by C to indicate the stack base offset, used by the C, C and C macros. The C macro must be called prior to setup the C variable. =end original C, C, C マクロによって使われるスタックベース オフセットを示すために C によってセットアップされる変数。 C マクロは C 変数をセットアップする前に 呼び出されなければなりません。 I32 ax =for hackers Found in file XSUB.h =item CLASS X =begin original Variable which is setup by C to indicate the class name for a C++ XS constructor. This is always a C. See C. =end original C によってセットアップされる、C++ の XS コンストラクターに 対するクラス名を表わす変数です。 これは常に C です。 C を参照してください。 char* CLASS =for hackers Found in file XSUB.h =item dAX X =begin original Sets up the C variable. This is usually handled automatically by C by calling C. =end original C 変数をセットアップします。 これは普通 C を呼び出すことで C によって自動的に 扱われます。 dAX; =for hackers Found in file XSUB.h =item dAXMARK X =begin original Sets up the C variable and stack marker variable C. This is usually handled automatically by C by calling C. =end original C 変数とスタックマーカー変数 C をセットアップします。 これは普通 C を呼び出すことで C によって自動的に 扱われます。 dAXMARK; =for hackers Found in file XSUB.h =item dITEMS X =begin original Sets up the C variable. This is usually handled automatically by C by calling C. =end original C 変数をセットアップします。 これは普通 C を呼び出すことで C によって自動的に 扱われます。 dITEMS; =for hackers Found in file XSUB.h =item dUNDERBAR X dUNDERBAR; =for hackers Found in file XSUB.h =item dXSARGS X =begin original Sets up stack and mark pointers for an XSUB, calling dSP and dMARK. Sets up the C and C variables by calling C and C. This is usually handled automatically by C. =end original XSUB のために、スタックポインタとマークポインタをセットアップし、 dSP と dMARK を呼び出します。 C と C を呼び出すことで変数 C と C を セットアップします。 これは通常、C によって自動的に扱われます。 dXSARGS; =for hackers Found in file XSUB.h =item dXSI32 X =begin original Sets up the C variable for an XSUB which has aliases. This is usually handled automatically by C. =end original エイリアスを持つ XSUB のために変数 C をセットアップします。 これは通常、C によって自動的に扱われます。 dXSI32; =for hackers Found in file XSUB.h =item items X =begin original Variable which is setup by C to indicate the number of items on the stack. See L. =end original C によりセットアップされ、スタックにあるアイテムの数を表わす 変数です。 L を参照してください。 I32 items =for hackers Found in file XSUB.h =item ix X =begin original Variable which is setup by C to indicate which of an XSUB's aliases was used to invoke it. See L. =end original C によりセットアップされ、それを起動するのに使われた XSUB の エイリアスを表わす変数です。 L を参照してください。 I32 ix =for hackers Found in file XSUB.h =item newXSproto X =begin original Used by C to hook up XSUBs as Perl subs. Adds Perl prototypes to the subs. =end original Perl サブルーチンのように XSUB をフックするために C が使います。 サブルーチンに対して Perl のプロトタイプを追加します。 =for hackers Found in file XSUB.h =item RETVAL X =begin original Variable which is setup by C to hold the return value for an XSUB. This is always the proper type for the XSUB. See L. =end original C によってセットアップされ、XSUB の戻り値を保持する変数です。 これは、常に XSUB にとって正しい型になります。 L を参照してください。 (whatever) RETVAL =for hackers Found in file XSUB.h =item ST X =begin original Used to access elements on the XSUB's stack. =end original XSUB のスタック上にある要素にアクセスするために使われます。 SV* ST(int ix) =for hackers Found in file XSUB.h =item THIS X =begin original Variable which is setup by C to designate the object in a C++ XSUB. This is always the proper type for the C++ object. See C and L. =end original C++ の XSUB におけるオブジェクトを指定する、C によって設定される 変数です。 これは常に C++ オブジェクトとして適切な型です。 C および L を参照してください。 (whatever) THIS =for hackers Found in file XSUB.h =item UNDERBAR X =begin original The SV* corresponding to the $_ variable. Works even if there is a lexical $_ in scope. =end original $_ 変数に対応する SV*。 たとえスコープ内にレキシカルな $_ があっても動作します。 =for hackers Found in file XSUB.h =item XS X =begin original Macro to declare an XSUB and its C parameter list. This is handled by C. =end original XSUB とその C のパラメーターリストを宣言するためのマクロです。 これは C によって扱われます。 =for hackers Found in file XSUB.h =item XS_VERSION X =begin original The version identifier for an XS module. This is usually handled automatically by C. See C. =end original XS モジュールに対するバージョン識別子。 これは通常、C によって自動的に使われます。 C を参照してください。 =for hackers Found in file XSUB.h =item XS_VERSION_BOOTCHECK X =begin original Macro to verify that a PM module's $VERSION variable matches the XS module's C variable. This is usually handled automatically by C. See L. =end original PM モジュールのバージョン変数と、XS モジュールの C 変数とが マッチするかを検査するためのマクロです。 これは通常、C によって自動的に扱われます。 L を参照してください。 XS_VERSION_BOOTCHECK; =for hackers Found in file XSUB.h =back =head1 Warning and Dieing (警告と die) =over 8 =item croak X =begin original This is an XS interface to Perl's C function. =end original Perl の C 関数に対する XS インターフェースです。 void croak(const char *pat, ...) =for hackers Found in file util.c =item croak_no_modify X =item warn X =begin original This is an XS interface to Perl's C function. =end original これは Perl の C 関数に対する XS インターフェースです。 void warn(const char *pat, ...) =for hackers Found in file util.c =item warn_sv X =back =head1 Undocumented functions (文書化されていない関数) =begin original The following functions have been flagged as part of the public API, but are currently undocumented. Use them at your own risk, as the interfaces are subject to change. =end original 以下の関数は公式 API の一部とされていますが、現在のところ 文書化されていません。 これらは自分自身の責任で使ってください; インターフェースは 変更されるかもしれません。 =over =item GetVars X =item Gv_AMupdate X =item PerlIO_clearerr X =item PerlIO_close X =item PerlIO_context_layers X =item PerlIO_eof X =item PerlIO_error X =item PerlIO_fileno X =item PerlIO_fill X =item PerlIO_flush X =item PerlIO_get_base X =item PerlIO_get_bufsiz X =item PerlIO_get_cnt X =item PerlIO_get_ptr X =item PerlIO_read X =item PerlIO_seek X =item PerlIO_set_cnt X =item PerlIO_set_ptrcnt X =item PerlIO_setlinebuf X =item PerlIO_stderr X =item PerlIO_stdin X =item PerlIO_stdout X =item PerlIO_tell X =item PerlIO_unread X =item PerlIO_write X =item Slab_Alloc X =item Slab_Free X =item _to_uni_fold_flags X<_to_uni_fold_flags> =item _to_utf8_fold_flags X<_to_utf8_fold_flags> =item amagic_call X =item amagic_deref_call X =item any_dup X =item apply_attrs_string X =item atfork_lock X =item atfork_unlock X =item av_arylen_p X =item av_iter_p X =item block_gimme X =item call_atexit X =item call_list X =item calloc X =item cast_i32 X =item cast_iv X =item cast_ulong X =item cast_uv X =item ck_warner X =item ck_warner_d X =item ckwarn X =item ckwarn_d X =item clone_params_del X =item clone_params_new X =item croak_nocontext X =item csighandler X =item cx_dump X =item cx_dup X =item cxinc X =item deb X =item deb_nocontext X =item debop X =item debprofdump X =item debstack X =item debstackptrs X =item delimcpy X =item despatch_signals X =item die_nocontext X =item dirp_dup X =item do_aspawn X =item do_binmode X =item do_close X =item do_gv_dump X =item do_gvgv_dump X =item do_hv_dump X =item do_join X =item do_magic_dump X =item do_op_dump X =item do_open X =item do_open9 X =item do_openn X =item do_pmop_dump X =item do_spawn X =item do_spawn_nowait X =item do_sprintf X =item do_sv_dump X =item doing_taint X =item doref X =item dounwind X =item dowantarray X =item dump_all X =item dump_eval X =item dump_fds X =item dump_form X =item dump_indent X =item dump_mstats X =item dump_packsubs X =item dump_sub X =item dump_vindent X =item fetch_cop_label X =item filter_add X =item filter_del X =item filter_read X =item find_rundefsv X =item find_rundefsvoffset X =item foldEQ_latin1 X =item foldEQ_utf8_flags X =item form_nocontext X =item fp_dup X =item fprintf_nocontext X =item free_global_struct X =item free_tmps X =item get_context X =item get_mstats X =item get_op_descs X =item get_op_names X =item get_ppaddr X =item get_vtbl X =item gp_dup X =item gp_free X =item gp_ref X =item gv_AVadd X =item gv_HVadd X =item gv_IOadd X =item gv_SVadd X =item gv_add_by_type X =item gv_autoload4 X =item gv_check X =item gv_dump X =item gv_efullname X =item gv_efullname3 X =item gv_efullname4 X =item gv_fetchfile X =item gv_fetchfile_flags X =item gv_fetchmethod_flags X =item gv_fetchpv X =item gv_fetchpvn_flags X =item gv_fetchsv X =item gv_fullname X =item gv_fullname3 X =item gv_fullname4 X =item gv_handler X =item gv_init X =item gv_name_set X =item he_dup X =item hek_dup X =item hv_common X =item hv_common_key_len X =item hv_delayfree_ent X =item hv_eiter_p X =item hv_eiter_set X =item hv_free_ent X =item hv_ksplit X =item hv_name_set X =item hv_placeholders_get X =item hv_placeholders_p X =item hv_placeholders_set X =item hv_riter_p X =item hv_riter_set X =item hv_store_flags X =item init_global_struct X =item init_i18nl10n X =item init_i18nl14n X =item init_stacks X =item init_tm X =item instr X =item is_lvalue_sub X =item is_uni_alnum X =item is_uni_alnum_lc X =item is_uni_alpha X =item is_uni_alpha_lc X =item is_uni_ascii X =item is_uni_ascii_lc X =item is_uni_cntrl X =item is_uni_cntrl_lc X =item is_uni_digit X =item is_uni_digit_lc X =item is_uni_graph X =item is_uni_graph_lc X =item is_uni_idfirst X =item is_uni_idfirst_lc X =item is_uni_lower X =item is_uni_lower_lc X =item is_uni_print X =item is_uni_print_lc X =item is_uni_punct X =item is_uni_punct_lc X =item is_uni_space X =item is_uni_space_lc X =item is_uni_upper X =item is_uni_upper_lc X =item is_uni_xdigit X =item is_uni_xdigit_lc X =item is_utf8_alnum X =item is_utf8_alpha X =item is_utf8_ascii X =item is_utf8_cntrl X =item is_utf8_digit X =item is_utf8_graph X =item is_utf8_idcont X =item is_utf8_idfirst X =item is_utf8_lower X =item is_utf8_mark X =item is_utf8_perl_space X =item is_utf8_perl_word X =item is_utf8_posix_digit X =item is_utf8_print X =item is_utf8_punct X =item is_utf8_space X =item is_utf8_upper X =item is_utf8_xdigit X =item is_utf8_xidcont X =item is_utf8_xidfirst X =item leave_scope X =item load_module_nocontext X =item magic_dump X =item malloc X =item markstack_grow X =item mess_nocontext X =item mfree X =item mg_dup X =item mg_size X =item mini_mktime X =item moreswitches X =item mro_get_from_name X =item mro_get_private_data X =item mro_register X =item mro_set_mro X =item mro_set_private_data X =item my_atof X =item my_atof2 X =item my_bcopy X =item my_bzero X =item my_chsize X =item my_cxt_index X =item my_cxt_init X =item my_dirfd X =item my_exit X =item my_failure_exit X =item my_fflush_all X =item my_fork X =item my_htonl X =item my_lstat X =item my_memcmp X =item my_memset X =item my_ntohl X =item my_pclose X =item my_popen X =item my_popen_list X =item my_setenv X =item my_socketpair X =item my_stat X =item my_strftime X =item my_strlcat X =item my_strlcpy X =item my_swap X =item newANONATTRSUB X =item newANONHASH X =item newANONLIST X =item newANONSUB X =item newATTRSUB X =item newAVREF X =item newCVREF X =item newFORM X =item newGVREF X =item newGVgen X =item newHVREF X =item newHVhv X =item newIO X =item newMYSUB X =item newPROG X =item newRV X =item newSUB X =item newSVREF X =item newSVpvf_nocontext X =item newXS_flags X =item new_collate X =item new_ctype X =item new_numeric X =item new_stackinfo X =item ninstr X =item op_dump X =item op_free X =item op_null X =item op_refcnt_lock X =item op_refcnt_unlock X =item parser_dup X =item perl_alloc_using X =item perl_clone_using X =item pmop_dump X =item pop_scope X =item pregcomp X =item pregexec X =item pregfree X =item pregfree2 X =item printf_nocontext X =item ptr_table_clear X =item ptr_table_fetch X =item ptr_table_free X =item ptr_table_new X =item ptr_table_split X =item ptr_table_store X =item push_scope X =item re_compile X =item re_dup_guts X =item re_intuit_start X =item re_intuit_string X =item realloc X =item reentrant_free X =item reentrant_init X =item reentrant_retry X =item reentrant_size X =item ref X =item reg_named_buff_all X =item reg_named_buff_exists X =item reg_named_buff_fetch X =item reg_named_buff_firstkey X =item reg_named_buff_nextkey X =item reg_named_buff_scalar X =item regclass_swash X =item regdump X =item regdupe_internal X =item regexec_flags X =item regfree_internal X =item reginitcolors X =item regnext X =item repeatcpy X =item rninstr X =item rsignal X =item rsignal_state X =item runops_debug X =item runops_standard X =item rvpv_dup X =item safesyscalloc X =item safesysfree X =item safesysmalloc X =item safesysrealloc X =item save_I16 X =item save_I32 X =item save_I8 X =item save_adelete X =item save_aelem X =item save_aelem_flags X =item save_alloc X =item save_aptr X =item save_ary X =item save_bool X =item save_clearsv X =item save_delete X =item save_destructor X =item save_destructor_x X =item save_freeop X =item save_freepv X =item save_freesv X =item save_generic_pvref X =item save_generic_svref X =item save_gp X =item save_hash X =item save_hdelete X =item save_helem X =item save_helem_flags X =item save_hints X =item save_hptr X =item save_int X =item save_item X =item save_iv X =item save_list X =item save_long X =item save_mortalizesv X =item save_nogv X =item save_op X =item save_padsv_and_mortalize X =item save_pptr X =item save_pushi32ptr X =item save_pushptr X =item save_pushptrptr X =item save_re_context X =item save_scalar X =item save_set_svflags X =item save_shared_pvref X =item save_sptr X =item save_svref X =item save_vptr X =item savestack_grow X =item savestack_grow_cnt X =item scan_num X =item scan_vstring X =item screaminstr X =item seed X =item set_context X =item set_numeric_local X =item set_numeric_radix X =item set_numeric_standard X =item share_hek X =item si_dup X =item ss_dup X =item stack_grow X =item start_subparse X =item stashpv_hvname_match X =item str_to_version X =item sv_2iv X =item sv_2pv X =item sv_2uv X =item sv_catpvf_mg_nocontext X =item sv_catpvf_nocontext X =item sv_compile_2op X =item sv_dump X =item sv_dup X =item sv_dup_inc X =item sv_peek X =item sv_pvn_nomg X =item sv_setpvf_mg_nocontext X =item sv_setpvf_nocontext X =item sv_utf8_upgrade_flags_grow X =item swash_fetch X =item swash_init X =item sys_init X =item sys_init3 X =item sys_intern_clear X =item sys_intern_dup X =item sys_intern_init X =item sys_term X =item taint_env X =item taint_proper X =item tmps_grow X =item to_uni_fold X =item to_uni_lower X =item to_uni_lower_lc X =item to_uni_title X =item to_uni_title_lc X =item to_uni_upper X =item to_uni_upper_lc X =item unlnk X =item unsharepvn X =item utf16_to_utf8 X =item utf16_to_utf8_reversed X =item uvchr_to_utf8_flags X =item uvuni_to_utf8 X =item vdeb X =item vform X =item vload_module X =item vnewSVpvf X =item vwarner X =item warn_nocontext X =item warner X =item warner_nocontext X =item whichsig X =back =head1 AUTHORS =begin original Until May 1997, this document was maintained by Jeff Okamoto . It is now maintained as part of Perl itself. =end original 1997 年 5 月まで、このドキュメントは Jeff Okamoto によって管理されていました。 今では Perl 自身の一部として管理されています。 =begin original 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. =end original Dean Roehrich, Malcolm Beattie, Andreas Koenig, Paul Hudson, Ilya Zakharevich, Paul Marquess, Neil Bowers, Matthew Green, Tim Bunce, Spider Boardman, Ulrich Pfeifer, Stephen McCamant, Gurusamy Sarathy から多くの助力と提案を受けました。 =begin original API Listing originally by Dean Roehrich . =end original 元の API 一覧は Dean Roehrich によるものです。 =begin original Updated to be autogenerated from comments in the source by Benjamin Stuhl. =end original Benjamin Stuhl によって、ソースのコメントから自動生成するように 更新されました。 =head1 SEE ALSO L, L, L, L =begin meta Translate: KIMURA Koichi Update: Kentaro Shirakata (5.10.0-) Status: in progress =end meta =cut ex: set ro: