=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> が セットされているという事実に依存しています。 =begin original Perl equivalent: C. =end original Perl equivalent: C. (TBT) 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 を返します。 =begin original The Perl equivalent for this is C<$#myarray>. =end original The Perl equivalent for this is C<$#myarray>. (TBT) 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 を持ちます。 =begin original Perl equivalent: C =end original Perl equivalent: C (TBT) 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 (大文字小文字変換) =over 8 =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 =back =head1 Character classes (文字クラス) =begin original There are three variants for all the functions in this section. The base ones operate using the character set of the platform Perl is running on. The ones with an C<_A> suffix operate on the ASCII character set, and the ones with an C<_L1> suffix operate on the full Latin1 character set. All are unaffected by locale =end original There are three variants for all the functions in this section. The base ones operate using the character set of the platform Perl is running on. The ones with an C<_A> suffix operate on the ASCII character set, and the ones with an C<_L1> suffix operate on the full Latin1 character set. All are unaffected by locale (TBT) =begin original For ASCII platforms, the base function with no suffix and the one with the C<_A> suffix are identical. The function with the C<_L1> suffix imposes the Latin-1 character set onto the platform. That is, the code points that are ASCII are unaffected, since ASCII is a subset of Latin-1. But the non-ASCII code points are treated as if they are Latin-1 characters. For example, C will return true when called with the code point 0xA0, which is the Latin-1 NO-BREAK SPACE. =end original For ASCII platforms, the base function with no suffix and the one with the C<_A> suffix are identical. The function with the C<_L1> suffix imposes the Latin-1 character set onto the platform. That is, the code points that are ASCII are unaffected, since ASCII is a subset of Latin-1. But the non-ASCII code points are treated as if they are Latin-1 characters. For example, C will return true when called with the code point 0xA0, which is the Latin-1 NO-BREAK SPACE. (TBT) =begin original For EBCDIC platforms, the base function with no suffix and the one with the C<_L1> suffix should be identical, since, as of this writing, the EBCDIC code pages that Perl knows about all are equivalent to Latin-1. The function that ends in an C<_A> suffix will not return true unless the specified character also has an ASCII equivalent. =end original For EBCDIC platforms, the base function with no suffix and the one with the C<_L1> suffix should be identical, since, as of this writing, the EBCDIC code pages that Perl knows about all are equivalent to Latin-1. The function that ends in an C<_A> suffix will not return true unless the specified character also has an ASCII equivalent. (TBT) =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 isASCII X =begin original Returns a boolean indicating whether the specified character is one of the 128 characters in the ASCII character set. On non-ASCII platforms, it is if this character corresponds to an ASCII character. Variants C and C are identical to C. =end original Returns a boolean indicating whether the specified character is one of the 128 characters in the ASCII character set. On non-ASCII platforms, it is if this character corresponds to an ASCII character. Variants C and C are identical to C. (TBT) bool isASCII(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 isOCTAL X =begin original Returns a boolean indicating whether the specified character is an octal digit, [0-7] in the platform's native character set. Variants C and C are identical to C. =end original Returns a boolean indicating whether the specified character is an octal digit, [0-7] in the platform's native character set. Variants C and C are identical to C. (TBT) bool isOCTAL(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 =item isWORDCHAR X =begin original Returns a boolean indicating whether the specified character is a character that is any of: alphabetic, numeric, or an underscore. This is the same as what C<\w> matches in a regular expression. C is a synonym provided for backward compatibility. Note that it does not have the standard C language meaning of alphanumeric, since it matches an underscore and the standard meaning does not. See the L for an explanation of variants C and C. =end original Returns a boolean indicating whether the specified character is a character that is any of: alphabetic, numeric, or an underscore. This is the same as what C<\w> matches in a regular expression. C is a synonym provided for backward compatibility. Note that it does not have the standard C language meaning of alphanumeric, since it matches an underscore and the standard meaning does not. See the L for an explanation of variants C and C. (TBT) bool isWORDCHAR(char ch) =for hackers Found in file handy.h =item isXDIGIT X =begin original Returns a boolean indicating whether the specified character is a hexadecimal digit, [0-9A-Fa-f]. Variants C and C are identical to C. =end original Returns a boolean indicating whether the specified character is a hexadecimal digit, [0-9A-Fa-f]. Variants C and C are identical to C. (TBT) bool isXDIGIT(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 Compile-time scope hooks =over 8 =item BhkDISABLE X =begin original Temporarily disable an entry in this BHK structure, by clearing the appropriate flag. I is a preprocessor token indicating which entry to disable. =end original Temporarily disable an entry in this BHK structure, by clearing the appropriate flag. I is a preprocessor token indicating which entry to disable. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 void BhkDISABLE(BHK *hk, which) =for hackers Found in file op.h =item BhkENABLE X =begin original Re-enable an entry in this BHK structure, by setting the appropriate flag. I is a preprocessor token indicating which entry to enable. This will assert (under -DDEBUGGING) if the entry doesn't contain a valid pointer. =end original Re-enable an entry in this BHK structure, by setting the appropriate flag. I is a preprocessor token indicating which entry to enable. This will assert (under -DDEBUGGING) if the entry doesn't contain a valid pointer. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 void BhkENABLE(BHK *hk, which) =for hackers Found in file op.h =item BhkENTRY_set X =begin original Set an entry in the BHK structure, and set the flags to indicate it is valid. I is a preprocessing token indicating which entry to set. The type of I depends on the entry. =end original Set an entry in the BHK structure, and set the flags to indicate it is valid. I is a preprocessing token indicating which entry to set. The type of I depends on the entry. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 void BhkENTRY_set(BHK *hk, which, void *ptr) =for hackers Found in file op.h =item blockhook_register X =begin original Register a set of hooks to be called when the Perl lexical scope changes at compile time. See L. =end original Register a set of hooks to be called when the Perl lexical scope changes at compile time. See L. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 =begin original NOTE: this function must be explicitly called as Perl_blockhook_register with an aTHX_ parameter. =end original NOTE: this function must be explicitly called as Perl_blockhook_register with an aTHX_ parameter. (TBT) void Perl_blockhook_register(pTHX_ BHK *hk) =for hackers Found in file op.c =back =head1 COP Hint Hashes =over 8 =item cophh_2hv X =begin original Generates and returns a standard Perl hash representing the full set of key/value pairs in the cop hints hash I. I is currently unused and must be zero. =end original Generates and returns a standard Perl hash representing the full set of key/value pairs in the cop hints hash I. I is currently unused and must be zero. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 HV * cophh_2hv(const COPHH *cophh, U32 flags) =for hackers Found in file cop.h =item cophh_copy X =begin original Make and return a complete copy of the cop hints hash I. =end original Make and return a complete copy of the cop hints hash I. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 COPHH * cophh_copy(COPHH *cophh) =for hackers Found in file cop.h =item cophh_delete_pv X =begin original Like L, but takes a nul-terminated string instead of a string/length pair. =end original Like L, but takes a nul-terminated string instead of a string/length pair. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 COPHH * cophh_delete_pv(const COPHH *cophh, const char *key, U32 hash, U32 flags) =for hackers Found in file cop.h =item cophh_delete_pvn X =begin original Delete a key and its associated value from the cop hints hash I, and returns the modified hash. The returned hash pointer is in general not the same as the hash pointer that was passed in. The input hash is consumed by the function, and the pointer to it must not be subsequently used. Use L if you need both hashes. =end original Delete a key and its associated value from the cop hints hash I, and returns the modified hash. The returned hash pointer is in general not the same as the hash pointer that was passed in. The input hash is consumed by the function, and the pointer to it must not be subsequently used. Use L if you need both hashes. (TBT) =begin original The key is specified by I and I. If I has the C bit set, the key octets are interpreted as UTF-8, otherwise they are interpreted as Latin-1. I is a precomputed hash of the key string, or zero if it has not been precomputed. =end original The key is specified by I and I. If I has the C bit set, the key octets are interpreted as UTF-8, otherwise they are interpreted as Latin-1. I is a precomputed hash of the key string, or zero if it has not been precomputed. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 COPHH * cophh_delete_pvn(COPHH *cophh, const char *keypv, STRLEN keylen, U32 hash, U32 flags) =for hackers Found in file cop.h =item cophh_delete_pvs X =begin original Like L, but takes a literal string instead of a string/length pair, and no precomputed hash. =end original Like L, but takes a literal string instead of a string/length pair, and no precomputed hash. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 COPHH * cophh_delete_pvs(const COPHH *cophh, const char *key, U32 flags) =for hackers Found in file cop.h =item cophh_delete_sv X =begin original Like L, but takes a Perl scalar instead of a string/length pair. =end original Like L, but takes a Perl scalar instead of a string/length pair. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 COPHH * cophh_delete_sv(const COPHH *cophh, SV *key, U32 hash, U32 flags) =for hackers Found in file cop.h =item cophh_fetch_pv X =begin original Like L, but takes a nul-terminated string instead of a string/length pair. =end original Like L, but takes a nul-terminated string instead of a string/length pair. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 SV * cophh_fetch_pv(const COPHH *cophh, const char *key, U32 hash, U32 flags) =for hackers Found in file cop.h =item cophh_fetch_pvn X =begin original Look up the entry in the cop hints hash I with the key specified by I and I. If I has the C bit set, the key octets are interpreted as UTF-8, otherwise they are interpreted as Latin-1. I is a precomputed hash of the key string, or zero if it has not been precomputed. Returns a mortal scalar copy of the value associated with the key, or C<&PL_sv_placeholder> if there is no value associated with the key. =end original Look up the entry in the cop hints hash I with the key specified by I and I. If I has the C bit set, the key octets are interpreted as UTF-8, otherwise they are interpreted as Latin-1. I is a precomputed hash of the key string, or zero if it has not been precomputed. Returns a mortal scalar copy of the value associated with the key, or C<&PL_sv_placeholder> if there is no value associated with the key. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 SV * cophh_fetch_pvn(const COPHH *cophh, const char *keypv, STRLEN keylen, U32 hash, U32 flags) =for hackers Found in file cop.h =item cophh_fetch_pvs X =begin original Like L, but takes a literal string instead of a string/length pair, and no precomputed hash. =end original Like L, but takes a literal string instead of a string/length pair, and no precomputed hash. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 SV * cophh_fetch_pvs(const COPHH *cophh, const char *key, U32 flags) =for hackers Found in file cop.h =item cophh_fetch_sv X =begin original Like L, but takes a Perl scalar instead of a string/length pair. =end original Like L, but takes a Perl scalar instead of a string/length pair. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 SV * cophh_fetch_sv(const COPHH *cophh, SV *key, U32 hash, U32 flags) =for hackers Found in file cop.h =item cophh_free X =begin original Discard the cop hints hash I, freeing all resources associated with it. =end original Discard the cop hints hash I, freeing all resources associated with it. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 void cophh_free(COPHH *cophh) =for hackers Found in file cop.h =item cophh_new_empty X =begin original Generate and return a fresh cop hints hash containing no entries. =end original Generate and return a fresh cop hints hash containing no entries. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 COPHH * cophh_new_empty() =for hackers Found in file cop.h =item cophh_store_pv X =begin original Like L, but takes a nul-terminated string instead of a string/length pair. =end original Like L, but takes a nul-terminated string instead of a string/length pair. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 COPHH * cophh_store_pv(const COPHH *cophh, const char *key, U32 hash, SV *value, U32 flags) =for hackers Found in file cop.h =item cophh_store_pvn X =begin original Stores a value, associated with a key, in the cop hints hash I, and returns the modified hash. The returned hash pointer is in general not the same as the hash pointer that was passed in. The input hash is consumed by the function, and the pointer to it must not be subsequently used. Use L if you need both hashes. =end original Stores a value, associated with a key, in the cop hints hash I, and returns the modified hash. The returned hash pointer is in general not the same as the hash pointer that was passed in. The input hash is consumed by the function, and the pointer to it must not be subsequently used. Use L if you need both hashes. (TBT) =begin original The key is specified by I and I. If I has the C bit set, the key octets are interpreted as UTF-8, otherwise they are interpreted as Latin-1. I is a precomputed hash of the key string, or zero if it has not been precomputed. =end original The key is specified by I and I. If I has the C bit set, the key octets are interpreted as UTF-8, otherwise they are interpreted as Latin-1. I is a precomputed hash of the key string, or zero if it has not been precomputed. (TBT) =begin original I is the scalar value to store for this key. I is copied by this function, which thus does not take ownership of any reference to it, and later changes to the scalar will not be reflected in the value visible in the cop hints hash. Complex types of scalar will not be stored with referential integrity, but will be coerced to strings. =end original I is the scalar value to store for this key. I is copied by this function, which thus does not take ownership of any reference to it, and later changes to the scalar will not be reflected in the value visible in the cop hints hash. Complex types of scalar will not be stored with referential integrity, but will be coerced to strings. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 COPHH * cophh_store_pvn(COPHH *cophh, const char *keypv, STRLEN keylen, U32 hash, SV *value, U32 flags) =for hackers Found in file cop.h =item cophh_store_pvs X =begin original Like L, but takes a literal string instead of a string/length pair, and no precomputed hash. =end original Like L, but takes a literal string instead of a string/length pair, and no precomputed hash. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 COPHH * cophh_store_pvs(const COPHH *cophh, const char *key, SV *value, U32 flags) =for hackers Found in file cop.h =item cophh_store_sv X =begin original Like L, but takes a Perl scalar instead of a string/length pair. =end original Like L, but takes a Perl scalar instead of a string/length pair. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 COPHH * cophh_store_sv(const COPHH *cophh, SV *key, U32 hash, SV *value, U32 flags) =for hackers Found in file cop.h =back =head1 COP Hint Reading =over 8 =item cop_hints_2hv X =begin original Generates and returns a standard Perl hash representing the full set of hint entries in the cop I. I is currently unused and must be zero. =end original Generates and returns a standard Perl hash representing the full set of hint entries in the cop I. I is currently unused and must be zero. (TBT) HV * cop_hints_2hv(const COP *cop, U32 flags) =for hackers Found in file cop.h =item cop_hints_fetch_pv X =begin original Like L, but takes a nul-terminated string instead of a string/length pair. =end original Like L, but takes a nul-terminated string instead of a string/length pair. (TBT) SV * cop_hints_fetch_pv(const COP *cop, const char *key, U32 hash, U32 flags) =for hackers Found in file cop.h =item cop_hints_fetch_pvn X =begin original Look up the hint entry in the cop I with the key specified by I and I. If I has the C bit set, the key octets are interpreted as UTF-8, otherwise they are interpreted as Latin-1. I is a precomputed hash of the key string, or zero if it has not been precomputed. Returns a mortal scalar copy of the value associated with the key, or C<&PL_sv_placeholder> if there is no value associated with the key. =end original Look up the hint entry in the cop I with the key specified by I and I. If I has the C bit set, the key octets are interpreted as UTF-8, otherwise they are interpreted as Latin-1. I is a precomputed hash of the key string, or zero if it has not been precomputed. Returns a mortal scalar copy of the value associated with the key, or C<&PL_sv_placeholder> if there is no value associated with the key. (TBT) SV * cop_hints_fetch_pvn(const COP *cop, const char *keypv, STRLEN keylen, U32 hash, U32 flags) =for hackers Found in file cop.h =item cop_hints_fetch_pvs X =begin original Like L, but takes a literal string instead of a string/length pair, and no precomputed hash. =end original Like L, but takes a literal string instead of a string/length pair, and no precomputed hash. (TBT) SV * cop_hints_fetch_pvs(const COP *cop, const char *key, U32 flags) =for hackers Found in file cop.h =item cop_hints_fetch_sv X =begin original Like L, but takes a Perl scalar instead of a string/length pair. =end original Like L, but takes a Perl scalar instead of a string/length pair. (TBT) SV * cop_hints_fetch_sv(const COP *cop, SV *key, U32 hash, U32 flags) =for hackers Found in file cop.h =back =head1 Custom Operators =over 8 =item custom_op_register X =begin original Register a custom op. See L. =end original Register a custom op. See L. (TBT) =begin original NOTE: this function must be explicitly called as Perl_custom_op_register with an aTHX_ parameter. =end original NOTE: this function must be explicitly called as Perl_custom_op_register with an aTHX_ parameter. (TBT) void Perl_custom_op_register(pTHX_ Perl_ppaddr_t ppaddr, const XOP *xop) =for hackers Found in file op.c =item custom_op_xop X =begin original Return the XOP structure for a given custom op. This function should be considered internal to OP_NAME and the other access macros: use them instead. =end original Return the XOP structure for a given custom op. This function should be considered internal to OP_NAME and the other access macros: use them instead. (TBT) =begin original NOTE: this function must be explicitly called as Perl_custom_op_xop with an aTHX_ parameter. =end original NOTE: this function must be explicitly called as Perl_custom_op_xop with an aTHX_ parameter. (TBT) const XOP * Perl_custom_op_xop(pTHX_ const OP *o) =for hackers Found in file op.c =item XopDISABLE X =begin original Temporarily disable a member of the XOP, by clearing the appropriate flag. =end original Temporarily disable a member of the XOP, by clearing the appropriate flag. (TBT) void XopDISABLE(XOP *xop, which) =for hackers Found in file op.h =item XopENABLE X =begin original Reenable a member of the XOP which has been disabled. =end original Reenable a member of the XOP which has been disabled. (TBT) void XopENABLE(XOP *xop, which) =for hackers Found in file op.h =item XopENTRY X =begin original Return a member of the XOP structure. I is a cpp token indicating which entry to return. If the member is not set this will return a default value. The return type depends on I. =end original Return a member of the XOP structure. I is a cpp token indicating which entry to return. If the member is not set this will return a default value. The return type depends on I. (TBT) XopENTRY(XOP *xop, which) =for hackers Found in file op.h =item XopENTRY_set X =begin original Set a member of the XOP structure. I is a cpp token indicating which entry to set. See L for details about the available members and how they are used. =end original Set a member of the XOP structure. I is a cpp token indicating which entry to set. See L for details about the available members and how they are used. (TBT) void XopENTRY_set(XOP *xop, which, value) =for hackers Found in file op.h =item XopFLAGS X =begin original Return the XOP's flags. =end original Return the XOP's flags. (TBT) U32 XopFLAGS(XOP *xop) =for hackers Found in file op.h =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 custom_op_desc X =begin original Return the description of a given custom op. This was once used by the OP_DESC macro, but is no longer: it has only been kept for compatibility, and should not be used. =end original Return the description of a given custom op. This was once used by the OP_DESC macro, but is no longer: it has only been kept for compatibility, and should not be used. (TBT) const char * custom_op_desc(const OP *o) =for hackers Found in file mathoms.c =item custom_op_name X =begin original Return the name for a given custom op. This was once used by the OP_NAME macro, but is no longer: it has only been kept for compatibility, and should not be used. =end original Return the name for a given custom op. This was once used by the OP_NAME macro, but is no longer: it has only been kept for compatibility, and should not be used. (TBT) const char * custom_op_name(const OP *o) =for hackers Found in file mathoms.c =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 op.c =over 8 =item op_contextualize X =begin original Applies a syntactic context to an op tree representing an expression. I is the op tree, and I must be C, C, or C to specify the context to apply. The modified op tree is returned. =end original Applies a syntactic context to an op tree representing an expression. I is the op tree, and I must be C, C, or C to specify the context to apply. The modified op tree is returned. (TBT) OP * op_contextualize(OP *o, I32 context) =for hackers Found in file op.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 caller_cx X =begin original The XSUB-writer's equivalent of L. The returned C structure can be interrogated to find all the information returned to Perl by C. Note that XSUBs don't get a stack frame, so C will return information for the immediately-surrounding Perl code. =end original The XSUB-writer's equivalent of L. The returned C structure can be interrogated to find all the information returned to Perl by C. Note that XSUBs don't get a stack frame, so C will return information for the immediately-surrounding Perl code. (TBT) =begin original This function skips over the automatic calls to C<&DB::sub> made on the behalf of the debugger. If the stack frame requested was a sub called by C, the return value will be the frame for the call to C, since that has the correct line number/etc. for the call site. If I is non-C, it will be set to a pointer to the frame for the sub call itself. =end original This function skips over the automatic calls to C<&DB::sub> made on the behalf of the debugger. If the stack frame requested was a sub called by C, the return value will be the frame for the call to C, since that has the correct line number/etc. for the call site. If I is non-C, it will be set to a pointer to the frame for the sub call itself. (TBT) const PERL_CONTEXT * caller_cx(I32 level, const PERL_CONTEXT **dbcxp) =for hackers Found in file pp_ctl.c =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 =head1 Functions in file utf8.h =over 8 =item ibcmp_utf8 X =begin original This is a synonym for (! foldEQ_utf8()) =end original This is a synonym for (! foldEQ_utf8()) (TBT) I32 ibcmp_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.h =back =head1 Functions in file util.h =over 8 =item ibcmp X =begin original This is a synonym for (! foldEQ()) =end original This is a synonym for (! foldEQ()) (TBT) I32 ibcmp(const char* a, const char* b, I32 len) =for hackers Found in file util.h =item ibcmp_locale X =begin original This is a synonym for (! foldEQ_locale()) =end original This is a synonym for (! foldEQ_locale()) (TBT) I32 ibcmp_locale(const char* a, const char* b, I32 len) =for hackers Found in file util.h =back =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 HvENAME X =begin original Returns the effective name of a stash, or NULL if there is none. The effective name represents a location in the symbol table where this stash resides. It is updated automatically when packages are aliased or deleted. A stash that is no longer in the symbol table has no effective name. This name is preferable to C for use in MRO linearisations and isa caches. =end original Returns the effective name of a stash, or NULL if there is none. The effective name represents a location in the symbol table where this stash resides. It is updated automatically when packages are aliased or deleted. A stash that is no longer in the symbol table has no effective name. This name is preferable to C for use in MRO linearisations and isa caches. (TBT) char* HvENAME(HV* stash) =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_copy_hints_hv X =begin original A specialised version of L for copying C<%^H>. I must be a pointer to a hash (which may have C<%^H> magic, but should be generally non-magical), or C (interpreted as an empty hash). The content of I is copied to a new hash, which has the C<%^H>-specific magic added to it. A pointer to the new hash is returned. =end original A specialised version of L for copying C<%^H>. I must be a pointer to a hash (which may have C<%^H> magic, but should be generally non-magical), or C (interpreted as an empty hash). The content of I is copied to a new hash, which has the C<%^H>-specific magic added to it. A pointer to the new hash is returned. (TBT) HV * hv_copy_hints_hv(HV *ohv) =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_fill X =begin original Returns the number of hash buckets that happen to be in use. This function is wrapped by the macro C. =end original Returns the number of hash buckets that happen to be in use. This function is wrapped by the macro C. (TBT) =begin original Previously this value was stored in the HV structure, rather than being calculated on demand. =end original Previously this value was stored in the HV structure, rather than being calculated on demand. (TBT) STRLEN hv_fill(HV const *const hv) =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_start X =begin original Creates and initialises a new lexer/parser state object, supplying a context in which to lex and parse from a new source of Perl code. A pointer to the new state object is placed in L. An entry is made on the save stack so that upon unwinding the new state object will be destroyed and the former value of L will be restored. Nothing else need be done to clean up the parsing context. =end original Creates and initialises a new lexer/parser state object, supplying a context in which to lex and parse from a new source of Perl code. A pointer to the new state object is placed in L. An entry is made on the save stack so that upon unwinding the new state object will be destroyed and the former value of L will be restored. Nothing else need be done to clean up the parsing context. (TBT) =begin original The code to be parsed comes from I and I. I, if non-null, provides a string (in SV form) containing code to be parsed. A copy of the string is made, so subsequent modification of I does not affect parsing. I, if non-null, provides an input stream from which code will be read to be parsed. If both are non-null, the code in I comes first and must consist of complete lines of input, and I supplies the remainder of the source. =end original The code to be parsed comes from I and I. I, if non-null, provides a string (in SV form) containing code to be parsed. A copy of the string is made, so subsequent modification of I does not affect parsing. I, if non-null, provides an input stream from which code will be read to be parsed. If both are non-null, the code in I comes first and must consist of complete lines of input, and I supplies the remainder of the source. (TBT) =begin original The I parameter is reserved for future use, and must always be zero, except for one flag that is currently reserved for perl's internal use. =end original The I parameter is reserved for future use, and must always be zero, except for one flag that is currently reserved for perl's internal use. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 void lex_start(SV *line, PerlIO *rsfp, U32 flags) =for hackers Found in file toke.c =item lex_stuff_pv 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 octets starting at I and continuing to the first nul. 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 it is not convenient to nul-terminate a string to be inserted, the L function is more appropriate. =end original The string to be inserted is represented by octets starting at I and continuing to the first nul. 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 it is not convenient to nul-terminate a string to be inserted, the L function is more appropriate. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 void lex_stuff_pv(const char *pv, 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_pvs X =begin original Like L, but takes a literal string instead of a string/length pair. =end original Like L, but takes a literal string instead of a string/length pair. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 void lex_stuff_pvs(const char *pv, U32 flags) =for hackers Found in file handy.h =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 parse_arithexpr X =begin original Parse a Perl arithmetic expression. This may contain operators of precedence down to the bit shift operators. The expression must be followed (and thus terminated) either by a comparison or lower-precedence operator or by something that would normally terminate an expression such as semicolon. If I includes C then the expression is optional, otherwise it is mandatory. It is up to the caller to ensure that the dynamic parser state (L et al) is correctly set to reflect the source of the code to be parsed and the lexical context for the expression. =end original Parse a Perl arithmetic expression. This may contain operators of precedence down to the bit shift operators. The expression must be followed (and thus terminated) either by a comparison or lower-precedence operator or by something that would normally terminate an expression such as semicolon. If I includes C then the expression is optional, otherwise it is mandatory. It is up to the caller to ensure that the dynamic parser state (L et al) is correctly set to reflect the source of the code to be parsed and the lexical context for the expression. (TBT) =begin original The op tree representing the expression is returned. If an optional expression is absent, a null pointer is returned, otherwise the pointer will be non-null. =end original The op tree representing the expression is returned. If an optional expression is absent, a null pointer is returned, otherwise the pointer will be non-null. (TBT) =begin original If an error occurs in parsing or compilation, in most cases a valid op tree is returned anyway. The error is reflected in the parser state, normally resulting in a single exception at the top level of parsing which covers all the compilation errors that occurred. Some compilation errors, however, will throw an exception immediately. =end original If an error occurs in parsing or compilation, in most cases a valid op tree is returned anyway. The error is reflected in the parser state, normally resulting in a single exception at the top level of parsing which covers all the compilation errors that occurred. Some compilation errors, however, will throw an exception immediately. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 OP * parse_arithexpr(U32 flags) =for hackers Found in file toke.c =item parse_barestmt X =begin original Parse a single unadorned Perl statement. This may be a normal imperative statement or a declaration that has compile-time effect. It does not include any label or other affixture. It is up to the caller to ensure that the dynamic parser state (L et al) is correctly set to reflect the source of the code to be parsed and the lexical context for the statement. =end original Parse a single unadorned Perl statement. This may be a normal imperative statement or a declaration that has compile-time effect. It does not include any label or other affixture. It is up to the caller to ensure that the dynamic parser state (L et al) is correctly set to reflect the source of the code to be parsed and the lexical context for the statement. (TBT) =begin original The op tree representing the statement is returned. This may be a null pointer if the statement is null, for example if it was actually a subroutine definition (which has compile-time side effects). If not null, it will be ops directly implementing the statement, suitable to pass to L. It will not normally include a C or equivalent op (except for those embedded in a scope contained entirely within the statement). =end original The op tree representing the statement is returned. This may be a null pointer if the statement is null, for example if it was actually a subroutine definition (which has compile-time side effects). If not null, it will be ops directly implementing the statement, suitable to pass to L. It will not normally include a C or equivalent op (except for those embedded in a scope contained entirely within the statement). (TBT) =begin original If an error occurs in parsing or compilation, in most cases a valid op tree (most likely null) is returned anyway. The error is reflected in the parser state, normally resulting in a single exception at the top level of parsing which covers all the compilation errors that occurred. Some compilation errors, however, will throw an exception immediately. =end original If an error occurs in parsing or compilation, in most cases a valid op tree (most likely null) is returned anyway. The error is reflected in the parser state, normally resulting in a single exception at the top level of parsing which covers all the compilation errors that occurred. Some compilation errors, however, will throw an exception immediately. (TBT) =begin original The I parameter is reserved for future use, and must always be zero. =end original The I parameter is reserved for future use, and must always be zero. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 OP * parse_barestmt(U32 flags) =for hackers Found in file toke.c =item parse_block X =begin original Parse a single complete Perl code block. This consists of an opening brace, a sequence of statements, and a closing brace. The block constitutes a lexical scope, so C variables and various compile-time effects can be contained within it. It is up to the caller to ensure that the dynamic parser state (L et al) is correctly set to reflect the source of the code to be parsed and the lexical context for the statement. =end original Parse a single complete Perl code block. This consists of an opening brace, a sequence of statements, and a closing brace. The block constitutes a lexical scope, so C variables and various compile-time effects can be contained within it. It is up to the caller to ensure that the dynamic parser state (L et al) is correctly set to reflect the source of the code to be parsed and the lexical context for the statement. (TBT) =begin original The op tree representing the code block is returned. This is always a real op, never a null pointer. It will normally be a C list, including C or equivalent ops. No ops to construct any kind of runtime scope are included by virtue of it being a block. =end original The op tree representing the code block is returned. This is always a real op, never a null pointer. It will normally be a C list, including C or equivalent ops. No ops to construct any kind of runtime scope are included by virtue of it being a block. (TBT) =begin original If an error occurs in parsing or compilation, in most cases a valid op tree (most likely null) is returned anyway. The error is reflected in the parser state, normally resulting in a single exception at the top level of parsing which covers all the compilation errors that occurred. Some compilation errors, however, will throw an exception immediately. =end original If an error occurs in parsing or compilation, in most cases a valid op tree (most likely null) is returned anyway. The error is reflected in the parser state, normally resulting in a single exception at the top level of parsing which covers all the compilation errors that occurred. Some compilation errors, however, will throw an exception immediately. (TBT) =begin original The I parameter is reserved for future use, and must always be zero. =end original The I parameter is reserved for future use, and must always be zero. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 OP * parse_block(U32 flags) =for hackers Found in file toke.c =item parse_fullexpr X =begin original Parse a single complete Perl expression. This allows the full expression grammar, including the lowest-precedence operators such as C. The expression must be followed (and thus terminated) by a token that an expression would normally be terminated by: end-of-file, closing bracketing punctuation, semicolon, or one of the keywords that signals a postfix expression-statement modifier. If I includes C then the expression is optional, otherwise it is mandatory. It is up to the caller to ensure that the dynamic parser state (L et al) is correctly set to reflect the source of the code to be parsed and the lexical context for the expression. =end original Parse a single complete Perl expression. This allows the full expression grammar, including the lowest-precedence operators such as C. The expression must be followed (and thus terminated) by a token that an expression would normally be terminated by: end-of-file, closing bracketing punctuation, semicolon, or one of the keywords that signals a postfix expression-statement modifier. If I includes C then the expression is optional, otherwise it is mandatory. It is up to the caller to ensure that the dynamic parser state (L et al) is correctly set to reflect the source of the code to be parsed and the lexical context for the expression. (TBT) =begin original The op tree representing the expression is returned. If an optional expression is absent, a null pointer is returned, otherwise the pointer will be non-null. =end original The op tree representing the expression is returned. If an optional expression is absent, a null pointer is returned, otherwise the pointer will be non-null. (TBT) =begin original If an error occurs in parsing or compilation, in most cases a valid op tree is returned anyway. The error is reflected in the parser state, normally resulting in a single exception at the top level of parsing which covers all the compilation errors that occurred. Some compilation errors, however, will throw an exception immediately. =end original If an error occurs in parsing or compilation, in most cases a valid op tree is returned anyway. The error is reflected in the parser state, normally resulting in a single exception at the top level of parsing which covers all the compilation errors that occurred. Some compilation errors, however, will throw an exception immediately. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 OP * parse_fullexpr(U32 flags) =for hackers Found in file toke.c =item parse_fullstmt X =begin original Parse a single complete Perl statement. This may be a normal imperative statement or a declaration that has compile-time effect, and may include optional labels. It is up to the caller to ensure that the dynamic parser state (L et al) is correctly set to reflect the source of the code to be parsed and the lexical context for the statement. =end original Parse a single complete Perl statement. This may be a normal imperative statement or a declaration that has compile-time effect, and may include optional labels. It is up to the caller to ensure that the dynamic parser state (L et al) is correctly set to reflect the source of the code to be parsed and the lexical context for the statement. (TBT) =begin original The op tree representing the statement is returned. This may be a null pointer if the statement is null, for example if it was actually a subroutine definition (which has compile-time side effects). If not null, it will be the result of a L call, normally including a C or equivalent op. =end original The op tree representing the statement is returned. This may be a null pointer if the statement is null, for example if it was actually a subroutine definition (which has compile-time side effects). If not null, it will be the result of a L call, normally including a C or equivalent op. (TBT) =begin original If an error occurs in parsing or compilation, in most cases a valid op tree (most likely null) is returned anyway. The error is reflected in the parser state, normally resulting in a single exception at the top level of parsing which covers all the compilation errors that occurred. Some compilation errors, however, will throw an exception immediately. =end original If an error occurs in parsing or compilation, in most cases a valid op tree (most likely null) is returned anyway. The error is reflected in the parser state, normally resulting in a single exception at the top level of parsing which covers all the compilation errors that occurred. Some compilation errors, however, will throw an exception immediately. (TBT) =begin original The I parameter is reserved for future use, and must always be zero. =end original The I parameter is reserved for future use, and must always be zero. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 OP * parse_fullstmt(U32 flags) =for hackers Found in file toke.c =item parse_label X =begin original Parse a single label, possibly optional, of the type that may prefix a Perl statement. It is up to the caller to ensure that the dynamic parser state (L et al) is correctly set to reflect the source of the code to be parsed. If I includes C then the label is optional, otherwise it is mandatory. =end original Parse a single label, possibly optional, of the type that may prefix a Perl statement. It is up to the caller to ensure that the dynamic parser state (L et al) is correctly set to reflect the source of the code to be parsed. If I includes C then the label is optional, otherwise it is mandatory. (TBT) =begin original The name of the label is returned in the form of a fresh scalar. If an optional label is absent, a null pointer is returned. =end original The name of the label is returned in the form of a fresh scalar. If an optional label is absent, a null pointer is returned. (TBT) =begin original If an error occurs in parsing, which can only occur if the label is mandatory, a valid label is returned anyway. The error is reflected in the parser state, normally resulting in a single exception at the top level of parsing which covers all the compilation errors that occurred. =end original If an error occurs in parsing, which can only occur if the label is mandatory, a valid label is returned anyway. The error is reflected in the parser state, normally resulting in a single exception at the top level of parsing which covers all the compilation errors that occurred. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 SV * parse_label(U32 flags) =for hackers Found in file toke.c =item parse_listexpr X =begin original Parse a Perl list expression. This may contain operators of precedence down to the comma operator. The expression must be followed (and thus terminated) either by a low-precedence logic operator such as C or by something that would normally terminate an expression such as semicolon. If I includes C then the expression is optional, otherwise it is mandatory. It is up to the caller to ensure that the dynamic parser state (L et al) is correctly set to reflect the source of the code to be parsed and the lexical context for the expression. =end original Parse a Perl list expression. This may contain operators of precedence down to the comma operator. The expression must be followed (and thus terminated) either by a low-precedence logic operator such as C or by something that would normally terminate an expression such as semicolon. If I includes C then the expression is optional, otherwise it is mandatory. It is up to the caller to ensure that the dynamic parser state (L et al) is correctly set to reflect the source of the code to be parsed and the lexical context for the expression. (TBT) =begin original The op tree representing the expression is returned. If an optional expression is absent, a null pointer is returned, otherwise the pointer will be non-null. =end original The op tree representing the expression is returned. If an optional expression is absent, a null pointer is returned, otherwise the pointer will be non-null. (TBT) =begin original If an error occurs in parsing or compilation, in most cases a valid op tree is returned anyway. The error is reflected in the parser state, normally resulting in a single exception at the top level of parsing which covers all the compilation errors that occurred. Some compilation errors, however, will throw an exception immediately. =end original If an error occurs in parsing or compilation, in most cases a valid op tree is returned anyway. The error is reflected in the parser state, normally resulting in a single exception at the top level of parsing which covers all the compilation errors that occurred. Some compilation errors, however, will throw an exception immediately. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 OP * parse_listexpr(U32 flags) =for hackers Found in file toke.c =item parse_stmtseq X =begin original Parse a sequence of zero or more Perl statements. These may be normal imperative statements, including optional labels, or declarations that have compile-time effect, or any mixture thereof. The statement sequence ends when a closing brace or end-of-file is encountered in a place where a new statement could have validly started. It is up to the caller to ensure that the dynamic parser state (L et al) is correctly set to reflect the source of the code to be parsed and the lexical context for the statements. =end original Parse a sequence of zero or more Perl statements. These may be normal imperative statements, including optional labels, or declarations that have compile-time effect, or any mixture thereof. The statement sequence ends when a closing brace or end-of-file is encountered in a place where a new statement could have validly started. It is up to the caller to ensure that the dynamic parser state (L et al) is correctly set to reflect the source of the code to be parsed and the lexical context for the statements. (TBT) =begin original The op tree representing the statement sequence is returned. This may be a null pointer if the statements were all null, for example if there were no statements or if there were only subroutine definitions (which have compile-time side effects). If not null, it will be a C list, normally including C or equivalent ops. =end original The op tree representing the statement sequence is returned. This may be a null pointer if the statements were all null, for example if there were no statements or if there were only subroutine definitions (which have compile-time side effects). If not null, it will be a C list, normally including C or equivalent ops. (TBT) =begin original If an error occurs in parsing or compilation, in most cases a valid op tree is returned anyway. The error is reflected in the parser state, normally resulting in a single exception at the top level of parsing which covers all the compilation errors that occurred. Some compilation errors, however, will throw an exception immediately. =end original If an error occurs in parsing or compilation, in most cases a valid op tree is returned anyway. The error is reflected in the parser state, normally resulting in a single exception at the top level of parsing which covers all the compilation errors that occurred. Some compilation errors, however, will throw an exception immediately. (TBT) =begin original The I parameter is reserved for future use, and must always be zero. =end original The I parameter is reserved for future use, and must always be zero. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 OP * parse_stmtseq(U32 flags) =for hackers Found in file toke.c =item parse_termexpr X =begin original Parse a Perl term expression. This may contain operators of precedence down to the assignment operators. The expression must be followed (and thus terminated) either by a comma or lower-precedence operator or by something that would normally terminate an expression such as semicolon. If I includes C then the expression is optional, otherwise it is mandatory. It is up to the caller to ensure that the dynamic parser state (L et al) is correctly set to reflect the source of the code to be parsed and the lexical context for the expression. =end original Parse a Perl term expression. This may contain operators of precedence down to the assignment operators. The expression must be followed (and thus terminated) either by a comma or lower-precedence operator or by something that would normally terminate an expression such as semicolon. If I includes C then the expression is optional, otherwise it is mandatory. It is up to the caller to ensure that the dynamic parser state (L et al) is correctly set to reflect the source of the code to be parsed and the lexical context for the expression. (TBT) =begin original The op tree representing the expression is returned. If an optional expression is absent, a null pointer is returned, otherwise the pointer will be non-null. =end original The op tree representing the expression is returned. If an optional expression is absent, a null pointer is returned, otherwise the pointer will be non-null. (TBT) =begin original If an error occurs in parsing or compilation, in most cases a valid op tree is returned anyway. The error is reflected in the parser state, normally resulting in a single exception at the top level of parsing which covers all the compilation errors that occurred. Some compilation errors, however, will throw an exception immediately. =end original If an error occurs in parsing or compilation, in most cases a valid op tree is returned anyway. The error is reflected in the parser state, normally resulting in a single exception at the top level of parsing which covers all the compilation errors that occurred. Some compilation errors, however, will throw an exception immediately. (TBT) =begin original NOTE: this function is experimental and may change or be removed without notice. =end original 注意: この関数は実験的で、予告なしに変更あるいは削除されるかもしれません。 OP * parse_termexpr(U32 flags) =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_findext X =begin original Finds the magic pointer of C with the given C for the C. See C. =end original Finds the magic pointer of C with the given C for the C. See C. (TBT) MAGIC* mg_findext(const SV* sv, int type, const MGVTBL *vtbl) =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_free_type X =begin original Remove any magic of type I from the SV I. See L. =end original Remove any magic of type I from the SV I. See L. (TBT) void mg_free_type(SV *sv, int how) =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 savesharedpvs X =begin original A version of C which allocates the duplicate string in memory which is shared between threads. =end original A version of C which allocates the duplicate string in memory which is shared between threads. (TBT) char* savesharedpvs(const char* s) =for hackers Found in file handy.h =item savesharedsvpv X =begin original A version of C which allocates the duplicate string in memory which is shared between threads. =end original A version of C which allocates the duplicate string in memory which is shared between threads. (TBT) char* savesharedsvpv(SV *sv) =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 foldEQ X =begin original Returns true if the leading len bytes of the strings s1 and s2 are the same case-insensitively; false otherwise. Uppercase and lowercase ASCII range bytes match themselves and their opposite case counterparts. Non-cased and non-ASCII range bytes match only themselves. =end original Returns true if the leading len bytes of the strings s1 and s2 are the same case-insensitively; false otherwise. Uppercase and lowercase ASCII range bytes match themselves and their opposite case counterparts. Non-cased and non-ASCII range bytes match only themselves. (TBT) I32 foldEQ(const char* a, const char* b, I32 len) =for hackers Found in file util.c =item foldEQ_locale X =begin original Returns true if the leading len bytes of the strings s1 and s2 are the same case-insensitively in the current locale; false otherwise. =end original Returns true if the leading len bytes of the strings s1 and s2 are the same case-insensitively in the current locale; false otherwise. (TBT) I32 foldEQ_locale(const char* a, const char* b, I32 len) =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 mess X =begin original Take a sprintf-style format pattern and argument list. These are used to generate a string message. If the message does not end with a newline, then it will be extended with some indication of the current location in the code, as described for L. =end original Take a sprintf-style format pattern and argument list. These are used to generate a string message. If the message does not end with a newline, then it will be extended with some indication of the current location in the code, as described for L. (TBT) =begin original Normally, the resulting message is returned in a new mortal SV. During global destruction a single SV may be shared between uses of this function. =end original Normally, the resulting message is returned in a new mortal SV. During global destruction a single SV may be shared between uses of this function. (TBT) SV * mess(const char *pat, ...) =for hackers Found in file util.c =item mess_sv X =begin original Expands a message, intended for the user, to include an indication of the current location in the code, if the message does not already appear to be complete. =end original Expands a message, intended for the user, to include an indication of the current location in the code, if the message does not already appear to be complete. (TBT) =begin original C is the initial message or object. If it is a reference, it will be used as-is and will be the result of this function. Otherwise it is used as a string, and if it already ends with a newline, it is taken to be complete, and the result of this function will be the same string. If the message does not end with a newline, then a segment such as C will be appended, and possibly other clauses indicating the current state of execution. The resulting message will end with a dot and a newline. =end original C is the initial message or object. If it is a reference, it will be used as-is and will be the result of this function. Otherwise it is used as a string, and if it already ends with a newline, it is taken to be complete, and the result of this function will be the same string. If the message does not end with a newline, then a segment such as C will be appended, and possibly other clauses indicating the current state of execution. The resulting message will end with a dot and a newline. (TBT) =begin original Normally, the resulting message is returned in a new mortal SV. During global destruction a single SV may be shared between uses of this function. If C is true, then the function is permitted (but not required) to modify and return C instead of allocating a new SV. =end original Normally, the resulting message is returned in a new mortal SV. During global destruction a single SV may be shared between uses of this function. If C is true, then the function is permitted (but not required) to modify and return C instead of allocating a new SV. (TBT) SV * mess_sv(SV *basemsg, bool consume) =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 =begin original Validate that a given string can be parsed as a version object, but doesn't actually perform the parsing. Can use either strict or lax validation rules. Can optionally set a number of hint variables to save the parsing code some time when tokenizing. =end original Validate that a given string can be parsed as a version object, but doesn't actually perform the parsing. Can use either strict or lax validation rules. Can optionally set a number of hint variables to save the parsing code some time when tokenizing. (TBT) 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 vmess X =begin original C and C are a sprintf-style format pattern and encapsulated argument list. These are used to generate a string message. If the message does not end with a newline, then it will be extended with some indication of the current location in the code, as described for L. =end original C and C are a sprintf-style format pattern and encapsulated argument list. These are used to generate a string message. If the message does not end with a newline, then it will be extended with some indication of the current location in the code, as described for L. (TBT) =begin original Normally, the resulting message is returned in a new mortal SV. During global destruction a single SV may be shared between uses of this function. =end original Normally, the resulting message is returned in a new mortal SV. During global destruction a single SV may be shared between uses of this function. (TBT) SV * vmess(const char *pat, va_list *args) =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 のどちらでも渡せます。 =begin original The SV returned has a refcount of 1. =end original The SV returned has a refcount of 1. (TBT) 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 のどちらでも渡せます。 =begin original The SV returned has a refcount of 1. =end original The SV returned has a refcount of 1. (TBT) 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 との最大限の互換性を維持するために、この関数は 元のバージョンにドットが一つだけか複数あるかに依存して、浮動小数点表記か 複数ドット表記のどちらかを返します。 =begin original The SV returned has a refcount of 1. =end original The SV returned has a refcount of 1. (TBT) 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 construction =over 8 =item newASSIGNOP X =begin original Constructs, checks, and returns an assignment op. I and I supply the parameters of the assignment; they are consumed by this function and become part of the constructed op tree. =end original Constructs, checks, and returns an assignment op. I and I supply the parameters of the assignment; they are consumed by this function and become part of the constructed op tree. (TBT) =begin original If I is C, C, or C, then a suitable conditional optree is constructed. If I is the opcode of a binary operator, such as C, then an op is constructed that performs the binary operation and assigns the result to the left argument. Either way, if I is non-zero then I has no effect. =end original If I is C, C, or C, then a suitable conditional optree is constructed. If I is the opcode of a binary operator, such as C, then an op is constructed that performs the binary operation and assigns the result to the left argument. Either way, if I is non-zero then I has no effect. (TBT) =begin original If I is zero, then a plain scalar or list assignment is constructed. Which type of assignment it is is automatically determined. I gives the eight bits of C, except that C will be set automatically, and, shifted up eight bits, the eight bits of C, except that the bit with value 1 or 2 is automatically set as required. =end original If I is zero, then a plain scalar or list assignment is constructed. Which type of assignment it is is automatically determined. I gives the eight bits of C, except that C will be set automatically, and, shifted up eight bits, the eight bits of C, except that the bit with value 1 or 2 is automatically set as required. (TBT) OP * newASSIGNOP(I32 flags, OP *left, I32 optype, OP *right) =for hackers Found in file op.c =item newBINOP X =begin original Constructs, checks, and returns an op of any binary type. I is the opcode. I gives the eight bits of C, except that C will be set automatically, and, shifted up eight bits, the eight bits of C, except that the bit with value 1 or 2 is automatically set as required. I and I supply up to two ops to be the direct children of the binary op; they are consumed by this function and become part of the constructed op tree. =end original Constructs, checks, and returns an op of any binary type. I is the opcode. I gives the eight bits of C, except that C will be set automatically, and, shifted up eight bits, the eight bits of C, except that the bit with value 1 or 2 is automatically set as required. I and I supply up to two ops to be the direct children of the binary op; they are consumed by this function and become part of the constructed op tree. (TBT) OP * newBINOP(I32 type, I32 flags, OP *first, OP *last) =for hackers Found in file op.c =item newCONDOP X =begin original Constructs, checks, and returns a conditional-expression (C) op. I gives the eight bits of C, except that C will be set automatically, and, shifted up eight bits, the eight bits of C, except that the bit with value 1 is automatically set. I supplies the expression selecting between the two branches, and I and I supply the branches; they are consumed by this function and become part of the constructed op tree. =end original Constructs, checks, and returns a conditional-expression (C) op. I gives the eight bits of C, except that C will be set automatically, and, shifted up eight bits, the eight bits of C, except that the bit with value 1 is automatically set. I supplies the expression selecting between the two branches, and I and I supply the branches; they are consumed by this function and become part of the constructed op tree. (TBT) OP * newCONDOP(I32 flags, OP *first, OP *trueop, OP *falseop) =for hackers Found in file op.c =item newFOROP X =begin original Constructs, checks, and returns an op tree expressing a C loop (iteration through a list of values). This is a heavyweight loop, with structure that allows exiting the loop by C and suchlike. =end original Constructs, checks, and returns an op tree expressing a C loop (iteration through a list of values). This is a heavyweight loop, with structure that allows exiting the loop by C and suchlike. (TBT) =begin original I optionally supplies the variable that will be aliased to each item in turn; if null, it defaults to C<$_> (either lexical or global). I supplies the list of values to iterate over. I supplies the main body of the loop, and I optionally supplies a C block that operates as a second half of the body. All of these optree inputs are consumed by this function and become part of the constructed op tree. =end original I optionally supplies the variable that will be aliased to each item in turn; if null, it defaults to C<$_> (either lexical or global). I supplies the list of values to iterate over. I supplies the main body of the loop, and I optionally supplies a C block that operates as a second half of the body. All of these optree inputs are consumed by this function and become part of the constructed op tree. (TBT) =begin original I gives the eight bits of C for the C op and, shifted up eight bits, the eight bits of C for the C op, except that (in both cases) some bits will be set automatically. =end original I gives the eight bits of C for the C op and, shifted up eight bits, the eight bits of C for the C op, except that (in both cases) some bits will be set automatically. (TBT) OP * newFOROP(I32 flags, OP *sv, OP *expr, OP *block, OP *cont) =for hackers Found in file op.c =item newGIVENOP X =begin original Constructs, checks, and returns an op tree expressing a C block. I supplies the expression that will be locally assigned to a lexical variable, and I supplies the body of the C construct; they are consumed by this function and become part of the constructed op tree. I is the pad offset of the scalar lexical variable that will be affected. =end original Constructs, checks, and returns an op tree expressing a C block. I supplies the expression that will be locally assigned to a lexical variable, and I supplies the body of the C construct; they are consumed by this function and become part of the constructed op tree. I is the pad offset of the scalar lexical variable that will be affected. (TBT) OP * newGIVENOP(OP *cond, OP *block, PADOFFSET defsv_off) =for hackers Found in file op.c =item newGVOP X =begin original Constructs, checks, and returns an op of any type that involves an embedded reference to a GV. I is the opcode. I gives the eight bits of C. I identifies the GV that the op should reference; calling this function does not transfer ownership of any reference to it. =end original Constructs, checks, and returns an op of any type that involves an embedded reference to a GV. I is the opcode. I gives the eight bits of C. I identifies the GV that the op should reference; calling this function does not transfer ownership of any reference to it. (TBT) OP * newGVOP(I32 type, I32 flags, GV *gv) =for hackers Found in file op.c =item newLISTOP X =begin original Constructs, checks, and returns an op of any list type. I is the opcode. I gives the eight bits of C, except that C will be set automatically if required. I and I supply up to two ops to be direct children of the list op; they are consumed by this function and become part of the constructed op tree. =end original Constructs, checks, and returns an op of any list type. I is the opcode. I gives the eight bits of C, except that C will be set automatically if required. I and I supply up to two ops to be direct children of the list op; they are consumed by this function and become part of the constructed op tree. (TBT) OP * newLISTOP(I32 type, I32 flags, OP *first, OP *last) =for hackers Found in file op.c =item newLOGOP X =begin original Constructs, checks, and returns a logical (flow control) op. I is the opcode. I gives the eight bits of C, except that C will be set automatically, and, shifted up eight bits, the eight bits of C, except that the bit with value 1 is automatically set. I supplies the expression controlling the flow, and I supplies the side (alternate) chain of ops; they are consumed by this function and become part of the constructed op tree. =end original Constructs, checks, and returns a logical (flow control) op. I is the opcode. I gives the eight bits of C, except that C will be set automatically, and, shifted up eight bits, the eight bits of C, except that the bit with value 1 is automatically set. I supplies the expression controlling the flow, and I supplies the side (alternate) chain of ops; they are consumed by this function and become part of the constructed op tree. (TBT) OP * newLOGOP(I32 type, I32 flags, OP *first, OP *other) =for hackers Found in file op.c =item newLOOPEX X =begin original Constructs, checks, and returns a loop-exiting op (such as C or C). I is the opcode. I