argra****@users*****
argra****@users*****
2012年 9月 20日 (木) 04:31:23 JST
Index: docs/perl/5.10.0/perlapi.pod diff -u docs/perl/5.10.0/perlapi.pod:1.13 docs/perl/5.10.0/perlapi.pod:1.14 --- docs/perl/5.10.0/perlapi.pod:1.13 Fri Sep 14 04:46:52 2012 +++ docs/perl/5.10.0/perlapi.pod Thu Sep 20 04:31:22 2012 @@ -1147,13 +1147,11 @@ =end 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. -(TBT) +これは win32 のもので、unix では無視されます; perl に、自身を +クローンするのに(c++ である)win32host コードを知らせます; これは、 +二つのスレッドを同時に実行したいなら、win32 で必要です; 単に何かを別々の +perl インタプリタで実行したいなら、これは捨てて元のものを返します; 何もする +必要はありません。 PerlInterpreter* perl_clone(PerlInterpreter* interp, UV flags) @@ -1510,10 +1508,9 @@ =end 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. -(TBT) +多くても pv の最初の "count" 文字をエスケープして、エスケープされた文字列の +サイズは "max" は "max" 文字を超えず、不完全なエスケープシーケンスが +含まれないような結果を dsv に入れます。 =begin original @@ -1522,9 +1519,8 @@ =end original -If flags contains PERL_PV_ESCAPE_QUOTE then any double quotes in the string -will also be escaped. -(TBT) +flags に PERL_PV_ESCAPE_QUOTE が含まれているなら、文字列中のダブルクォートも +エスケープされます。 =begin original @@ -1533,9 +1529,8 @@ =end 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. -(TBT) +通常は SV はエスケープされた文字列が準備される前にクリアされますが、 +PERL_PV_ESCAPE_NOCLEAR がセットされているとこれは起こりません。 =begin original @@ -1545,10 +1540,10 @@ =end 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<is_utf8_string()> to determine if it is Unicode. -(TBT) +PERL_PV_ESCAPE_UNI がセットされているなら入力文字列は Unicode として +扱われます。 +PERL_PV_ESCAPE_UNI_DETECT がセットされているなら入力文字列は Unicode かどうか +決定するために C<is_utf8_string()> を使ってスキャンされます。 =begin original @@ -1561,13 +1556,12 @@ =end original -If PERL_PV_ESCAPE_ALL is set then all input chars will be output -using C<\x01F1> style escapes, otherwise only chars above 255 will be -escaped using this style, other non printable chars will use octal or -common escaped patterns like C<\n>. If PERL_PV_ESCAPE_NOBACKSLASH -then all chars below 255 will be treated as printable and -will be output as literals. -(TBT) +PERL_PV_ESCAPE_ALL がセットされていると、全ての入力文字は C<\x01F1> 形式の +エスケープを使って出力され、さもなければ 255 を超える文字のみがこの形式で +エスケープされ、その他の表示できない文字は 8 進数か C<\n> のような一般的な +エスケープパターンを使います。 +PERL_PV_ESCAPE_NOBACKSLASH なら、255 以下の全ての文字は表示可能として +扱われてリテラルとして出力されます。 =begin original @@ -1598,9 +1592,8 @@ PERL_PV_ESCAPE_RE が設定されると、使われるエスケープ文字は '\\' ではなく '%' になります。 -This is because regexes very often contain backslashed -sequences, whereas '%' is not a particularly common character in patterns. -(TBT) +これは正規表現がとてもしばしばバックスラッシュ並びを含んでいて、一方 '%' は +パターン中で特に一般的な文字というわけではないからです。 =begin original @@ -1637,9 +1630,8 @@ =end original -Converts a string into something presentable, handling escaping via -pv_escape() and supporting quoting and ellipses. -(TBT) +文字列を何か表現可能なものに変換します; pv_escape() によるエスケープを扱い、 +クォートと省略に対応しています。 =begin original @@ -2907,13 +2899,15 @@ =end original -Clears any placeholders from a hash. If a restricted hash has any of its keys +ハッシュからのプレースホルダをクリアします。 +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. +future point. +この関数はこのようなハッシュからのプレースホルダキーをクリアします。 +この使用例は Hash::Util::lock_keys() を参照してください。 (TBT) void hv_clear_placeholders(HV* hb) @@ -3242,14 +3236,14 @@ ハッシュ反復子からエントリーを返します。 C<hv_iterinit> と C<hv_iternext> を参照してください。 -The C<flags> 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. -(TBT) +C<flags> の値は普通はゼロです; HV_ITERNEXT_WANTPLACEHOLDERS が +セットされていると、(制限ハッシュのための) プレースホルダキーは通常のキーに +追加して返されます。 +デフォルトではプレースホルダは自動的に飛ばされます。 +現在のところプレースホルダは C<&Perl_sv_placeholder> の値として +実装されています。 +プレースホルダと制限ハッシュの実装は変更されるかも知れず、現在の実装は +整理するための変更には抽象化が不十分であることに注意してください。 =begin original @@ -3351,16 +3345,14 @@ 呼び出し側は、呼び出しの前に C<val> の参照カウントを適切にインクリメントし、 関数が NULL を返した場合には参照カウントをデクリメントする責任が あるということに注意してください。 -Effectively -a successful hv_store takes ownership of one reference to C<val>. 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. -(TBT) +事実上成功した hv_store は C<val> へのリファレンスを取得します。 +これは通常あなたの求めているものです; 新しく作られた SV は参照カウント 1 を +持つので、あなたのコードがすることが SV を作成してハッシュを +保管することだけなら、hv_store は新しい SV へのリファレンスだけを所有し、 +あなたのコードは整理のためにさらなる何かをする必要はありません。 +hv_store は hv_store_ent の呼び出しとして実装されておらず、キーのための +一時的な SV を作成しないので、キーデータがすでに SV 形式に +なっているのでなければ、hv_store_ent よりも hv_store を使ってください。 =begin original @@ -3435,18 +3427,17 @@ 呼び出し側は、呼び出しの前に C<val> の参照カウントを適切にインクリメントし、 関数が NULL を返した場合には参照カウントをデクリメントする責任が あるということに注意してください。 -Effectively a successful -hv_store_ent takes ownership of one reference to C<val>. 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<key>; -unlike C<val> it does not take ownership of it, so maintaining the correct -reference count on C<key> 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. -(TBT) +事実上成功した hv_store_ent は C<val> へのリファレンスを取得します。 +これは通常あなたの求めているものです; 新しく作られた SV は参照カウント 1 を +持つので、あなたのコードがすることが SV を作成してハッシュを +保管することだけなら、hv_store は新しい SV へのリファレンスだけを所有し、 +あなたのコードは整理のためにさらなる何かをする必要はありません。 +hv_store_ent は C<key> だけを読み込むことに注意してください; C<val> と違って +所有権を取らないので、C<key> の参照カウントを正しく保守するのは全て +呼び出し側に責任があります。 +hv_store は hv_store_ent の呼び出しとして実装されておらず、キーのための +一時的な SV を作成しないので、キーデータがすでに SV 形式に +なっているのでなければ、hv_store_ent よりも hv_store を使ってください。 =begin original @@ -3667,9 +3658,8 @@ =end original -Arranges for a mutual exclusion lock to be obtained on sv if a suitable module -has been loaded. -(TBT) +適切なモジュールが読み込まれていれば、sv を得るための相互排他ロックを +準備します。 void SvLOCK(SV* sv) @@ -3774,9 +3764,8 @@ =end original -Arranges for sv to be shared between threads if a suitable module -has been loaded. -(TBT) +適切なモジュールが読み込まれていれば、sv をスレッド間で共有するための +準備をします。 void SvSHARE(SV* sv) @@ -3907,14 +3896,13 @@ =end original -5.9.3 から、Newx() とその同類は古い New() API を置き換え、and drops -the first parameter, I<x>, a debug aid which allowed callers to identify -themselves. -この助けは新しいビルドオプション PERL_MEM_LOG -(L<perlhack/PERL_MEM_LOG> 参照) によって置き換えられました。 +5.9.3 から、Newx() とその同類は古い New() API を置き換え、呼び出し側が +自分自身を識別できるようにデバッグの助けをするための最初の引数 I<x> が +なくなりました。 +この助けは新しいビルドオプション PERL_MEM_LOG (L<perlhack/PERL_MEM_LOG> +参照) で置き換えられました。 古い API は、古い perl に対応している XS モジュールが使えるように まだ存在しています。 -(TBT) void Newx(void* ptr, int nitems, type) @@ -4089,11 +4077,9 @@ =end original Perl 版の C<strdup()>。 -Returns a pointer to a newly allocated -string which is a duplicate of C<pv>. The size of the string is -determined by C<strlen()>. The memory allocated for the new string can -be freed with the C<Safefree()> function. -(TBT) +C<pv> の複製である、新しく割り当てられた文字列へのポインタを返します。 +文字列のサイズは C<strlen()> によって決定されます。 +新しい文字列のために割り当てられたメモリは C<Safefree()> 関数で解放できます。 char* savepv(const char* pv) @@ -4113,11 +4099,9 @@ =end original もしあれば C<strndup()> が行うことの Perl 版。 -Returns a -pointer to a newly allocated string which is a duplicate of the first -C<len> bytes from C<pv>, plus a trailing NUL byte. The memory allocated for -the new string can be freed with the C<Safefree()> function. -(TBT) +C<pv> から C<len> バイトの複製に加えて末尾の NUL バイトからなる、新しく +割り当てられた文字列へのポインタを返します。 +新しい文字列のために割り当てられたメモリは C<Safefree()> 関数で解放できます。 char* savepvn(const char* pv, I32 len) @@ -4151,9 +4135,8 @@ =end original -A version of C<savepv()> which allocates the duplicate string in memory -which is shared between threads. -(TBT) +スレッド間で共有しているメモリで複製された文字列を割り当てるバージョンの +C<savepv()>。 char* savesharedpv(const char* pv) @@ -4171,10 +4154,9 @@ =end original -A version of C<savepvn()> which allocates the duplicate string in memory -which is shared between threads. (With the specific difference that a NULL -pointer is not acceptable) -(TBT) +スレッド間で共有したメモリに複製した文字列を割り当てるバージョンの +C<savepvn()> です。 +(NULL ポインタを受け付けないという違いもあります) char* savesharedpvn(const char *const pv, const STRLEN len) @@ -4191,9 +4173,8 @@ =end original -A version of C<savepv()>/C<savepvn()> which gets the string to duplicate from -the passed in SV using C<SvPV()> -(TBT) +C<SvPV()> を使った SV で渡されたものから複製した文字列を取得するバージョンの +C<savepv()>/C<savepvn()> です。 char* savesvpv(SV* sv) @@ -4310,9 +4291,8 @@ =end original -Takes a sprintf-style format pattern and conventional -(non-SV) arguments and returns the formatted string. -(TBT) +sprintf 形式のフォーマットパターンと形式的な (非 SV) 引数を取って、 +フォーマットされた文字列を返します。 (char *) Perl_form(pTHX_ const char* pat, ...) @@ -4334,10 +4314,9 @@ =end 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). -(TBT) +単一のプライベートなバッファを使うので、いくつかの文字列を +フォーマットしたいなら、以前の文字列を明示的にコピーしなければなりません +(そして使い終わったらコピーを解放しなければなりません)。 char* form(const char* pat, ...) @@ -4374,13 +4353,12 @@ =end original -The C library C<snprintf> functionality, if available and -standards-compliant (uses C<vsnprintf>, actually). However, if the -C<vsnprintf> is not available, will unfortunately use the unsafe -C<vsprintf> which can overrun the buffer (there is an overrun check, -but that may be too late). Consider using C<sv_vcatpvf> instead, or -getting C<vsnprintf>. -(TBT) +利用可能で標準に準拠していれば、C ライブラリの C<snprintf> の機能です +(実際には C<vsnprintf> を使います)。 +しかし、C<vsnprintf> が利用不可能なら、残念ながらバッファをオーバーランする +可能性のある安全でない C<vsprintf> を使います (オーバーランチェックは +ありますが、遅すぎるかもしれません)。 +代わりに C<sv_vcatpvf> を使うか、C<vsnprintf> を使うことを考慮してください。 int my_snprintf(char *buffer, const Size_t len, const char *format, ...) @@ -4398,10 +4376,10 @@ =end original -The C library C<sprintf>, 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<sprintf>. -(TBT) +バッファに書き込んだ文字列の長さが確実に返されるように、もし必要なら +ラップされた、C ライブラリの C<sprintf> です。 +稀な ANSI 以前のシステムのみがラッパー関数を必要とします - 通常はこれは直接 +C<sprintf> を呼び出します。 int my_sprintf(char *buffer, const char *pat, ...) @@ -4421,12 +4399,11 @@ =end original -The C library C<vsnprintf> if available and standards-compliant. -However, if if the C<vsnprintf> is not available, will unfortunately -use the unsafe C<vsprintf> which can overrun the buffer (there is an -overrun check, but that may be too late). Consider using -C<sv_vcatpvf> instead, or getting C<vsnprintf>. -(TBT) +利用可能で標準に準拠していれば、C ライブラリの C<snprintf> です。 +しかし、C<vsnprintf> が利用不可能なら、残念ながらバッファをオーバーランする +可能性のある安全でない C<vsprintf> を使います (オーバーランチェックは +ありますが、遅すぎるかもしれません)。 +代わりに C<sv_vcatpvf> を使うか、C<vsnprintf> を使うことを考慮してください。 int my_vsnprintf(char *buffer, const Size_t len, const char *format, va_list ap) @@ -4472,10 +4449,8 @@ =end original -Returns a pointer to the next character after the parsed -version string, as well as upgrading the passed in SV to -an RV. -(TBT) +バージョン文字列をパースした後の次の文字へのポインタを返します; また、SV に +渡されたものを RV に昇格させます。 =begin original @@ -4828,11 +4803,9 @@ =end 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 -(TBT) +以前のバージョンの Perl との最大限の互換性を維持するために、この関数は +元のバージョンにドットが一つだけか複数あるかに依存して、浮動小数点表記か +複数ドット表記のどちらかを返します。 SV* vstringify(SV *vs) @@ -4859,9 +4832,9 @@ =end 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): -(TBT) +これは生の最小限の構造体だけを確認することに注意してください (従って +追加のハッシュエントリを含んでいるかもしれない派生クラスによって +混乱しません): bool vverify(SV *vs) @@ -4887,12 +4860,10 @@ =end original -Returns either C<mro_get_linear_isa_c3> or -C<mro_get_linear_isa_dfs> for the given stash, -dependant upon which MRO is in effect -for that stash. +このスタッシュに対して MRO が有効かどうかに依存して、スタッシュに対する +C<mro_get_linear_isa_c3> か C<mro_get_linear_isa_dfs> のどちらかを +返します。 返り値は読み込み専用の AV* です。 -(TBT) =begin original @@ -4927,10 +4898,8 @@ =end original -Invalidates method caching on any child classes -of the given stash, so that they might notice -the changes in this one. -(TBT) +スタッシュの全ての子クラスのメソッドキャッシュを無効にして、これによる +変更が通知されます。 =begin original @@ -4940,10 +4909,8 @@ =end original -Ideally, all instances of C<PL_sub_generation++> in -perl source outside of C<mro.c> should be -replaced by calls to this. -(TBT) +理想的には、C<mro.c> の外側の perl ソースの C<PL_sub_generation++> の全ての +実体はこれへの呼び出しで置き換えられるべきです。 =begin original @@ -4955,12 +4922,10 @@ =end 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: -(TBT) +Perl はメソッドが再定義されるかもしれない一般的な方法のほとんどを自動的に +扱います。 +しかしキャッシュコードが気付くことなくスタッシュのメソッドを変更する +いくつかの方法があります; この場合後でこのメソッドを呼び出す必要があります: =begin original @@ -4980,11 +4945,8 @@ =end 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). -(TBT) +2) 読み込み専用スカラ定数へのリファレンスを、(constant.pm がしているように) +定数サブルーチンを作成するためにスタッシュエントリに代入する。 =begin original @@ -5109,8 +5071,8 @@ On entry I<start> and I<*len> give the string to scan, I<*flags> gives conversion flags, and I<result> 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<PERL_SCAN_SILENT_ILLDIGIT> is set in I<*flags>, encountering an -invalid character will also trigger a warning. +I<*flags> に C<PERL_SCAN_SILENT_ILLDIGIT> がセットされていなければ、不正な +文字に遭遇すると警告も引き起こされます。 返るときに、I<*len> はスキャンした文字列の長さにセットされ、 I<*flags> は出力フラグになります。 (TBT) @@ -5125,12 +5087,11 @@ =end original -If the value is <= C<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<grok_bin> -returns UV_MAX, sets C<PERL_SCAN_GREATER_THAN_UV_MAX> in the output flags, -and writes the value to I<*result> (or the value is discarded if I<result> -is NULL). -(TBT) +値が <= C<UV_MAX> なら、出力フラグがクリアされ、I<*result> に何も書かない +UV として返されます。 +値が > UV_MAX なら、C<grok_bin> は出力フラグに +C<PERL_SCAN_GREATER_THAN_UV_MAX> をセットし、値を I<*result> に書き込んで、 +UV_MAX を返します (あるいは I<result> が NULL なら値は捨てられます)。 =begin original @@ -5141,11 +5102,11 @@ =end original -The binary number may optionally be prefixed with "0b" or "b" unless -C<PERL_SCAN_DISALLOW_PREFIX> is set in I<*flags> on entry. +エントリの I<*flags> に C<PERL_SCAN_DISALLOW_PREFIX> が +セットされていなければ、2 進数にオプションとして "0b" または "b" を +前置できます。 I<*flags> で C<PERL_SCAN_ALLOW_UNDERSCORES> がセットされていると、2 進数で 数値を区切るのに '_' 文字が使えます。 -(TBT) UV grok_bin(const char* start, STRLEN* len_p, I32* flags, NV *result) @@ -5178,10 +5139,10 @@ On entry I<start> and I<*len> give the string to scan, I<*flags> gives conversion flags, and I<result> 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<PERL_SCAN_SILENT_ILLDIGIT> 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. +I<*flags> に C<PERL_SCAN_SILENT_ILLDIGIT> がセットされていなければ、不正な +文字に遭遇すると警告も引き起こされます。 +返るときに、I<*len> はスキャンした文字列の長さにセットされ、 +I<*flags> は出力フラグになります。 (TBT) =begin original @@ -5194,12 +5155,11 @@ =end 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<grok_hex> -returns UV_MAX, sets C<PERL_SCAN_GREATER_THAN_UV_MAX> in the output flags, -and writes the value to I<*result> (or the value is discarded if I<result> -is NULL). -(TBT) +値が <= UV_MAX なら、出力フラグがクリアされ、I<*result> に何も書かない +UV として返されます。 +値が > UV_MAX なら、C<grok_hex> は出力フラグに +C<PERL_SCAN_GREATER_THAN_UV_MAX> をセットし、値を I<*result> に書き込んで、 +UV_MAX を返します (あるいは I<result> が NULL なら値は捨てられます)。 =begin original @@ -5210,11 +5170,11 @@ =end original -The hex number may optionally be prefixed with "0x" or "x" unless -C<PERL_SCAN_DISALLOW_PREFIX> is set in I<*flags> on entry. If -C<PERL_SCAN_ALLOW_UNDERSCORES> is set in I<*flags> then the hex -number may use '_' characters to separate digits. -(TBT) +エントリの I<*flags> に C<PERL_SCAN_DISALLOW_PREFIX> が +セットされていなければ、16 進数にオプションとして "0x" または "x" を +前置できます。 +I<*flags> で C<PERL_SCAN_ALLOW_UNDERSCORES> がセットされていると、2 進数で +数値を区切るのに '_' 文字が使えます。 UV grok_hex(const char* start, STRLEN* len_p, I32* flags, NV *result) @@ -5233,11 +5193,11 @@ =end 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). -(TBT) +数値を認識します(またはしません)。 +数値の型(認識されなかった場合は 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 @@ -5271,8 +5231,9 @@ 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. +absolute value). +e 記法が使われたり数値が UV よりも大きいなら、IS_NUMBER_IN_UV は +セットされません。 (TBT) int grok_number(const char *pv, STRLEN len, UV *valuep) @@ -5321,11 +5282,11 @@ On entry I<start> and I<*len> give the string to scan, I<*flags> gives conversion flags, and I<result> 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<PERL_SCAN_SILENT_ILLDIGIT> 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. +スキャンは文字列の末尾か、最初の不正な文字で停止します。 +I<*flags> に C<PERL_SCAN_SILENT_ILLDIGIT> がセットされていなければ、不正な +文字に遭遇すると警告も引き起こされます。 +返るときに、I<*len> はスキャンした文字列の長さにセットされ、 +I<*flags> は出力フラグになります。 (TBT) =begin original @@ -5338,12 +5299,11 @@ =end 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<grok_oct> -returns UV_MAX, sets C<PERL_SCAN_GREATER_THAN_UV_MAX> in the output flags, -and writes the value to I<*result> (or the value is discarded if I<result> -is NULL). -(TBT) +値が <= UV_MAX なら、出力フラグがクリアされ、I<*result> に何も書かない +UV として返されます。 +値が > UV_MAX なら、C<grok_oct> は出力フラグに +C<PERL_SCAN_GREATER_THAN_UV_MAX> をセットし、値を I<*result> に書き込んで、 +UV_MAX を返します (あるいは I<result> が NULL なら値は捨てられます)。 =begin original @@ -7114,12 +7074,11 @@ =end original SV が get magic かオーバーロードであれば真を返します。 -If either is true then -the scalar is active data, and has the potential to return a new value every -time it is accessed. Hence you must be careful to only read it once per user -logical operation and work with that returned value. +どちらかが真なら、スカラはアクティブなデータで、アクセスされる度に新しい値を +返す可能性があります。 +従って、ユーザーの論理的な操作につき一回だけ読み込んで、返された値に対して +作業をするように注意しなければなりません。 どちらも真でなければ、書き込まれるまでスカラの値は変更できません。 -(TBT) char* SvGAMAGIC(SV* sv) @@ -7257,8 +7216,8 @@ =end original -Tells and SV that it is an unsigned integer and disables all other OK bits. -(TBT) +SV に対し、その SV が符号なし整数であり、他の OK ビットをすべてディセーブルに +するように指示します。 void SvIOK_only_UV(SV* sv) @@ -7328,9 +7287,9 @@ =end original -与えられた SV を強制的に整数に変換し、それを返します。 -sv を一度だけ評価することが保証されているバージョンについては -C<SvIVx> を参照してください。 +SV を強制的に整数に変換し、それを返します。 +sv を一度だけ評価することが保証されているバージョンについては C<SvIVx> を +参照してください。 IV SvIV(SV* sv) @@ -7369,8 +7328,8 @@ SV を強制的に整数に変換し、それを返します。 C<sv> を一度だけ評価することを保証します。 -C<sv> が副作用のある式の時にのみこれを使ってください; さもなければ -より効率的な C<SvIV> を使ってください。 +C<sv> が副作用のある式の時にのみこれを使ってください; さもなければより +効率的な C<SvIV> を使ってください。 IV SvIVx(SV* sv) @@ -7599,8 +7558,8 @@ =end original -SV に対して、自分が倍精度実数でありその他の OK フラグを -ディセーブルにするよう指示します。 +SV に対し、その SV が倍精度実数であり、その他の OK フラグをディセーブルに +するよう指示します。 void SvNOK_only(SV* sv) @@ -7636,10 +7595,9 @@ =end original -Returns the raw value in the SV's NV slot, without checks or conversions. +SV の NV スロットの生の値を、チェックや変換なしに返します。 SvNOK が真であると分かっているときにだけ使ってください。 C<SvNV()> も参照してください。 -(TBT) NV SvNVX(SV* sv) @@ -7714,10 +7672,10 @@ =end original -SvIVX が SvPVX に対する正しいオフセット値であるかどうかを示す -U32 値を返します。 -この hack は SvPV の先頭から文字を -取り除くスピードを向上するために内部的に使われます。 +SvIVX が SvPVX に対する正しいオフセット値であるかどうかを示す U32 値を +返します。 +この hack は SvPV の先頭から文字を取り除くスピードを向上するために内部的に +使われます。 SvOOK が真であるとき、割り当てられた文字列バッファの開始点は (SvPVX - SvIVX)となります。 @@ -7804,8 +7762,8 @@ =end original -SV に対して、自分が文字列であるということを指示し、 -他の OK ビットをすべてディセーブルにするように指示します。 +SV に対し、その SV が文字列であり、他の OK ビットをすべてディセーブルに +するように指示します。 また、UTF-8 ステータスをオフにします。 void SvPOK_only(SV* sv) @@ -7823,8 +7781,8 @@ =end original -文字列で他の全ての OK ビットが無効で UTF-8 ステータスがそのままであることを -SV に知らせます。 +SV に対し、その SV が文字列であり、他の OK ビットをディセーブルに +して、UTF-8 ステータスがそのままにするように指示します。 void SvPOK_only_UTF8(SV* sv) @@ -8060,10 +8018,9 @@ =end original -A version of C<SvPV> which guarantees to evaluate C<sv> only once. +C<sv> を一度だけ評価することを保証するバージョンの C<SvPV> です。 C<sv> が副作用のある式の時にのみこれを使ってください; さもなければ より効率的な C<SvPVV> を使ってください。 -(TBT) char* SvPVx(SV* sv, STRLEN len) @@ -8213,9 +8170,8 @@ =end original -All of the following SvREFCNT_inc* macros are optimized versions of -SvREFCNT_inc, and can be replaced with SvREFCNT_inc. -(TBT) +以下の SvREFCNT_inc* マクロ全ては SvREFCNT_inc の最適化バージョンで、 +SvREFCNT_inc に置き換えられます。 SV* SvREFCNT_inc(SV* sv) @@ -8233,8 +8189,8 @@ =end original -SvREFCNT_inc と同じですが、 -I<sv> が NULL ではないと分かっている場合にのみ使えます。 +SvREFCNT_inc と同じですが、I<sv> が NULL ではないと分かっている場合にのみ +使えます。 NULL かどうかをチェックする必要がないので、より速くより小さいです。 SV* SvREFCNT_inc_NN(SV* sv) @@ -8271,8 +8227,8 @@ =end original -SvREFCNT_inc_simple と同じですが、 -I<sv> が NULL ではないと分かっている場合にのみ使えます。 +SvREFCNT_inc_simple と同じですが、I<sv> が NULL ではないと分かっている +場合にのみ使えます。 NULL かどうかをチェックする必要がないので、より速くより小さいです。 SV* SvREFCNT_inc_simple_NN(SV* sv) @@ -8635,9 +8591,8 @@ SV が UTF-8 エンコードされたデータを含んでいるかどうかを示す U32 値を 返します。 -Call this after SvPV() in case any call to string overloading updates the -internal flag. -(TBT) +オーバーロードが内部フラグを更新する文字列に対して呼び出すときは +SvPV() の後にこれを呼び出してください。 U32 SvUTF8(SV* sv) @@ -8849,9 +8804,8 @@ =end original -Returns a boolean indicating whether the SV performs a specific, named role. -The SV can be a Perl object or the name of a Perl class. -(TBT) +SV が特定の名前付きのロールを行うかどうかを示す真偽値を返します。 +SV は Perl オブジェクトか Perl クラスの名前です。 bool sv_does(SV* sv, const char* name) @@ -8964,12 +8918,12 @@ =end original -In 5.9.3, newSV() replaces the older NEWSV() API, and drops the first -parameter, I<x>, a debug aid which allowed callers to identify themselves. -This aid has been superseded by a new build option, PERL_MEM_LOG (see -L<perlhack/PERL_MEM_LOG>). The older API is still there for use in XS -modules supporting older perls. -(TBT) +5.9.3 で、newSV() は古い NEWSV() API を置き換え、呼び出し側が自分自身を +識別できるようにデバッグの助けをするための最初の引数 I<x> がなくなりました。 +この助けは新しいビルドオプション PERL_MEM_LOG (L<perlhack/PERL_MEM_LOG> +参照) で置き換えられました。 +古い API は、古い perl に対応している XS モジュールが使えるように +まだ存在しています。 SV* newSV(STRLEN len) @@ -9285,10 +9239,8 @@ =end original -Using various gambits, try to get an IO from an SV: the IO slot if its a -GV; or the recursive result if we're an RV; or the IO slot of the symbol -named after the PV if we're a string. -(TBT) +様々な作戦を使って、SV から CV を得ようとします; GV なら IO スロット; +RV なら再帰した結果; 文字列なら PV の後のシンボル名の IO スロットです。 IO* sv_2io(SV* sv) @@ -9306,10 +9258,9 @@ =end original -Return the integer value of an SV, doing any necessary string -conversion. If flags includes SV_GMAGIC, does an mg_get() first. -Normally used via the C<SvIV(sv)> and C<SvIVx(sv)> macros. -(TBT) +必要な文字列変換を行って、SV の整数値を返します。 +フラグに SV_GMAGIC が含まれていると、最初に mg_get() を行います。 +通常は C<SvIV(sv)> と C<SvIVx(sv)> マクロ経由で使われます。 IV sv_2iv_flags(SV* sv, I32 flags) @@ -9330,12 +9281,11 @@ =end original SV を揮発性にします。 -The SV will be destroyed "soon", either -by an explicit call to FREETMPS, or by an implicit call at places such as -statement boundaries. SvTEMP() is turned on which means that the SV's -string buffer can be "stolen" if this SV is copied. See also C<sv_newmortal> -and C<sv_mortalcopy>. -(TBT) +SV は FREETMPS の明示的な呼び出しか、文の境界のような場所での暗黙の +呼び出しによって「すぐに」破壊されます。 +この SV がコピーされると、SvTEMP() は SV の文字列バッファが「盗まれた」ことを +示すために音になります。 +C<sv_newmortal> と C<sv_mortalcopy> も参照してください。 SV* sv_2mortal(SV* sv) @@ -9353,10 +9303,8 @@ =end original -Return the num value of an SV, doing any necessary string or integer -conversion, magic etc. Normally used via the C<SvNV(sv)> and C<SvNVx(sv)> -macros. -(TBT) +必要な文字列変換や整数変換、magic などを行って、SV の数値を返します。 +通常は C<SvNV(sv)> と C<SvNVx(sv)> のマクロ経由で使います。 NV sv_2nv(SV* sv) @@ -9431,12 +9379,11 @@ =end original -Returns a pointer to the string value of an SV, and sets *lp to its length. -If flags includes SV_GMAGIC, does an mg_get() first. Coerces sv to a string -if necessary. -Normally invoked via the C<SvPV_flags> macro. C<sv_2pv()> and C<sv_2pv_nomg> -usually end up here too. -(TBT) +SV の文字列値へのポインタを返し、*lp にその長さをセットします。 +フラグに SV_GMAGIC が含まれていると、最初に mg_get() を行います。 +必要なら sv を文字列に強制します。 +通常は C<SvPV_flags> マクロ経由で起動されます。 +C<sv_2pv()> と C<sv_2pv_nomg> も普通はここで終わります。 char* sv_2pv_flags(SV* sv, STRLEN* lp, I32 flags) @@ -9454,10 +9401,9 @@ =end original -Return the unsigned integer value of an SV, doing any necessary string -conversion. If flags includes SV_GMAGIC, does an mg_get() first. -Normally used via the C<SvUV(sv)> and C<SvUVx(sv)> macros. -(TBT) +必要な文字列変換を行って、SV の符号なし整数値を返します。 +フラグに SV_GMAGIC が含まれていると、最初に mg_get() を行います。 +通常は C<SvUV(sv)> と C<SvUVx(sv)> マクロ経由で使われます。 UV sv_2uv_flags(SV* sv, I32 flags) @@ -9474,9 +9420,8 @@ =end original -Remove any string offset. You should normally use the C<SvOOK_off> macro -wrapper instead. -(TBT) +文字列オフセットを取り除きます。 +通常は代わりに C<SvOOK_off> マクロラッパーを使うべきです。 int sv_backoff(SV* sv) @@ -9543,15 +9488,14 @@ =end original 引数を C<sprintf> のように処理し、SV にその結果を追加します。 -If the appended data contains "wide" characters -(including, but not limited to, SVs with a UTF-8 PV formatted with %s, -and characters >255 formatted with %c), the original SV might get -upgraded to UTF-8. +追加するデータに「ワイド」文字(%s でフォーマットされた UTF-8 PV や +%c でフォーマットされた >255 の文字の SV を含みますが、それに +限定されません)が含まれている場合、元の SV は UTF-8 に +昇格されるかもしれません。 'get' magic をハンドルしますが、'set' magic はハンドルしません。 C<sv_catpvf_mg> を参照してください。 元の SV が UTF-8 なら、パターンは妥当な UTF-8 であるべきです; 元の SV が バイト列なら、パターンもそうあるべきです。 -(TBT) void sv_catpvf(SV* sv, const char* pat, ...) @@ -9616,10 +9560,9 @@ C<len> はコピーするバイト数を示します。 SV の UTF-8 ステータスが設定されているなら、追加されるバイト列は妥当な UTF-8 であるべきです。 -If C<flags> has C<SV_GMAGIC> bit set, will C<mg_get> on C<dsv> if -appropriate, else not. C<sv_catpvn> and C<sv_catpvn_nomg> are implemented -in terms of this function. -(TBT) +C<flags> の C<SV_GMAGIC> ビットがセットされていると、適切なら C<dsv> に +C<mg_get> し、さもなければしません。 +C<sv_catpvn> と C<sv_catpvn_nomg> はこの関数に関して実装されています。 void sv_catpvn_flags(SV* sv, const char* ptr, STRLEN len, I32 flags) @@ -9694,10 +9637,9 @@ SV C<ssv> にある文字列を、SV C<dsv> にある文字列の終端へ連結します。 C<dsv> を変更しますが C<ssv> は変更しません。 -If C<flags> has C<SV_GMAGIC> -bit set, will C<mg_get> on the SVs if appropriate, else not. -C<sv_catsv> and C<sv_catsv_nomg> are implemented in terms of this function. -(TBT) +C<flags> の C<SV_GMAGIC> ビットがセットされていると、適切なら SV に +C<mg_get> し、さもなければしません。 +C<sv_catsv> と C<sv_catsv_nomg> はこの関数に関して実装されています。 void sv_catsv_flags(SV* dsv, SV* ssv, I32 flags) @@ -9723,9 +9665,8 @@ 内側のどこかを指し示すポインタでなければなりません。 C<ptr> は調整後の文字列の先頭となります。 "OOK hack" を使います。 -Beware: after this function returns, C<ptr> and SvPVX_const(sv) may no longer -refer to the same chunk of data. -(TBT) +注意: この関数から返った後、C<ptr> と SvPVX_const(sv) はもはや同じデータの +塊を参照していません。 void sv_chop(SV* sv, const char* ptr) @@ -9747,14 +9688,14 @@ =end original -Clear an SV: call any destructors, free up any memory used by the body, -and free the body itself. The SV's head is I<not> freed, although +SV をクリアします: デストラクタを呼び出し、ボディで使われたメモリを解放し、 +ボディ自身を解放します。 +SV のヘッダは解放 I<されません> が、 its type is set to all 1's so that it won't inadvertently be assumed to be live during global destruction etc. -This function should only be called when REFCNT is zero. Most of the time -you'll want to call C<sv_free()> (or its macro wrapper C<SvREFCNT_dec>) -instead. -(TBT) +この関数は REFCNT がゼロになったときにのみ呼び出されるべきです。 +ほとんどの場合 C<sv_free()> (またはそのマクロラッパー C<SvREFCNT_dec>) を +呼び出したいでしょう。 void sv_clear(SV* sv) @@ -9776,7 +9717,7 @@ 二つの SV にある文字列を比較します。 C<sv1> が C<sv2> より小さいときには -1 を、両者が等しいときには 0 を、 C<sv1> が C<sv2> より大きいときには 1 を返します。 -UTF-8 で 'use bytes' を認識し、get magic をハンドルし、もし必要なら引数を +UTF-8 と 'use bytes' を認識し、get magic をハンドルし、必要なら引数を 文字列に強制します。 C<sv_cmp_locale> も参照してください。 @@ -9796,10 +9737,11 @@ =end original -Compares the strings in two SVs in a locale-aware manner. Is UTF-8 and -'use bytes' aware, handles get magic, and will coerce its args to strings -if necessary. See also C<sv_cmp_locale>. See also C<sv_cmp>. -(TBT) +ロケールを考慮した形で二つの SV の文字列を比較します。 +UTF-8 と 'use bytes' を認識し、get magic をハンドルし、必要なら引数を +文字列に強制します。 +C<sv_cmp_locale> も参照してください。 +C<sv_cmp> も参照してください。 I32 sv_cmp_locale(SV* sv1, SV* sv2) @@ -9852,14 +9794,14 @@ =end original -Copies a stringified representation of the source SV into the -destination SV. Automatically performs any necessary mg_get and -coercion of numeric values into strings. Guaranteed to preserve -UTF8 flag even from overloaded objects. Similar in nature to -sv_2pv[_flags] but operates directly on an SV instead of just the -string. Mostly uses sv_2pv_flags to do its work, except when that -would lose the UTF-8'ness of the PV. -(TBT) +ソース SV の文字列化表現をデスティネーション SV にコピーします。 +必要な mg_get と数値から文字列への強制を自動的に行います。 +オーバーロードされたオブジェクトからであっても UTF8 フラグが +保存されることを保証します。 +事実上 sv_2pv[_flags] と似ていますが、単なる文字列ではなく SV に対して +直接操作します。 +この作業を行うためにほとんどは sv_2pv_flags フラグを使います; 例外は +PV の UTF-8 性が失われるときです。 void sv_copypv(SV* dsv, SV* ssv) @@ -9898,9 +9840,8 @@ 二つの SV にある文字列が同一のものであるかどうかをあらわす真偽値を 返します。 -Is UTF-8 and 'use bytes' aware, handles get magic, and will -coerce its args to strings if necessary. -(TBT) +UTF-8 と 'use bytes' を認識し、get magic をハンドルし、必要なら引数を +文字列に強制します。 I32 sv_eq(SV* sv1, SV* sv2) @@ -10092,7 +10033,7 @@ =end original SV にある文字列の長さを返します。 -magic をハンドルし、型を強制します。 +magic と型強制をハンドルします。 xpv_cur スロットへの生アクセスを提供する C<SvCUR> も参照してください。 STRLEN sv_len(SV* sv) @@ -10110,10 +10051,9 @@ =end original -Returns the number of characters in the string in an SV, counting wide -UTF-8 bytes as a single character. -Handles magic and type coercion. -(TBT) +SV にある文字列の文字数を返します; ワイド UTF-8 バイトは一文字として +数えます。 +magic と型強制をハンドルします。 STRLEN sv_len_utf8(SV* sv) @@ -10130,10 +10070,9 @@ =end original -SV に magic を付加します。 -First upgrades C<sv> to type C<SVt_PVMG> if necessary, -then adds a new magic item of type C<how> to the head of the magic list. -(TBT) +SV に magic を追加します。 +必要ならまず C<sv> を型 C<SVt_PVMG> に昇格して、それから magic リストの +先頭に型 C<how> の新しい magic アイテムを追加します。 =begin original @@ -10142,9 +10081,8 @@ =end original -See C<sv_magicext> (which C<sv_magic> now calls) for a description of the -handling of the C<name> and C<namlen> arguments. -(TBT) +C<name> と C<namlen> 引数の扱いに関する記述については (C<sv_magic> が +呼び出す) C<sv_magicext> を参照してください。 =begin original @@ -10153,9 +10091,8 @@ =end original -You need to use C<sv_magicext> to add magic to SvREADONLY SVs and also -to add more than one instance of the same 'how'. -(TBT) +SvREADONLY SV に magic を追加したり同じ 'how' の複数の実体を追加するには +C<sv_magicext> を使う必要があります。 void sv_magic(SV* sv, SV* obj, int how, const char* name, I32 namlen) @@ -10172,9 +10109,8 @@ =end original -Adds magic to an SV, upgrading it if necessary. Applies the -supplied vtable and returns a pointer to the magic added. -(TBT) +SV に magic を追加して、必要なら昇格させます。 +提供された vtable を適用して、追加した magic へのポインタを返します。 =begin original @@ -10184,10 +10120,10 @@ =end original -Note that C<sv_magicext> will allow things that C<sv_magic> will not. -In particular, you can add magic to SvREADONLY SVs, and add more than -one instance of the same 'how'. -(TBT) +C<sv_magicext> は、C<sv_magic> が出来ないことが出来るっと言うことに +注意してください。 +特に、SvREADONLY SV に magic を追加したり、同じ 'how' の複数の実体を +追加したりできます。 =begin original @@ -10231,11 +10167,9 @@ (C<sv_setsv> を使って)元の SV のコピーである、新しい SV を生成します。 生成された SV は揮発性である目印が付けられます。 -It will be destroyed "soon", either by an -explicit call to FREETMPS, or by an implicit call at places such as -statement boundaries. -See also C<sv_newmortal> and C<sv_2mortal>. -(TBT) +これは FREETMPS の明示的な呼び出しか、文の境界のような場所での暗黙の +呼び出しによって「すぐに」破壊されます。 +C<sv_newmortal> と C<sv_2mortal> も参照してください。 SV* sv_mortalcopy(SV* oldsv) @@ -10256,10 +10190,9 @@ 揮発性である新たな null SV を生成します。 新たに作られた SV の参照カウントは 1 に設定されます。 -It will be destroyed "soon", either by an explicit call to -FREETMPS, or by an implicit call at places such as statement boundaries. +これは FREETMPS の明示的な呼び出しか、文の境界のような場所での暗黙の +呼び出しによって「すぐに」破壊されます。 C<sv_mortalcopy> と C<sv_2mortal> も参照してください。 -(TBT) SV* sv_newmortal() @@ -10297,7 +10230,7 @@ Converts the value pointed to by offsetp from a count of bytes from the start of the string, to a count of the equivalent number of UTF-8 chars. -Handles magic and type coercion. +magic と型強制をハンドルします。 (TBT) void sv_pos_b2u(SV* sv, I32* offsetp) @@ -10319,10 +10252,10 @@ =end original Converts the value pointed to by offsetp from a count of UTF-8 chars from -the start of the string, to a count of the equivalent number of bytes; if -lenp is non-zero, it does the same to lenp, but this time starting from -the offset, rather than from the start of the string. Handles magic and -type coercion. +the start of the string, to a count of the equivalent number of bytes; +lenp が非ゼロなら、これは lenp と同じですが、この場合は文字列の +先頭からではなく offset から始めます。 +magic と型強制をハンドルします。 (TBT) void sv_pos_u2b(SV* sv, I32* offsetp, I32* lenp) @@ -10358,11 +10291,10 @@ =end original -Get a sensible string out of the SV somehow. +SV から何か識別できる文字列を取り出します。 複雑なマクロ式を扱えないコンパイラのための、C<SvPV_force> マクロの プライベート実装です。 代わりに、常にマクロを使ってください。 -(TBT) char* sv_pvn_force(SV* sv, STRLEN* lp) @@ -10383,13 +10315,12 @@ =end original -Get a sensible string out of the SV somehow. -If C<flags> has C<SV_GMAGIC> bit set, will C<mg_get> on C<sv> if -appropriate, else not. C<sv_pvn_force> and C<sv_pvn_force_nomg> are -implemented in terms of this function. -You normally want to use the various wrapper macros instead: see -C<SvPV_force> and C<SvPV_force_nomg> -(TBT) +SV から何か識別できる文字列を取り出します。 +C<flags> の C<SV_GMAGIC> ビットがセットされていると、適切なら C<sv> に +C<mg_get> し、さもなければしません。 +C<sv_pvn_force> と C<sv_pvn_force_nomg> はこの関数に関して実装されています。 +通常は代わりに様々なラッパーマクロを使いたいでしょう: C<SvPV_force> と +C<SvPV_force_nomg> を参照してください。 char* sv_pvn_force_flags(SV* sv, STRLEN* lp, I32 flags) @@ -10422,8 +10353,7 @@ =end original -Returns a string describing what the SV is a reference to. -(TBT) +SV がリファレンスしているものを記述した文字列を返します。 const char* sv_reftype(const SV* sv, int ob) @@ -10467,9 +10397,8 @@ =end original -Underlying implementation for the C<reset> Perl function. -Note that the perl-level function is vaguely deprecated. -(TBT) +C<reset> Perl 関数の基礎となる実装です。 +perl レベルの関数は漠然と廃止予定であることに注意してください。 void sv_reset(const char* s, HV* stash) @@ -10492,8 +10421,8 @@ Weaken a reference: set the C<SvWEAKREF> flag on this RV; give the referred-to SV C<PERL_MAGIC_backref> magic if it hasn't already; and push a back-reference to this RV onto the array of backreferences -associated with that magic. If the RV is magical, set magic will be -called after the RV is cleared. +associated with that magic. +RV がマジカルなら、set magic は RV がクリアした後呼び出されます。 (TBT) SV* sv_rvweaken(SV *sv) @@ -10920,10 +10849,8 @@ =end original -You probably want to use one of the assortment of wrappers, such as -C<SvSetSV>, C<SvSetSV_nosteal>, C<SvSetMagicSV> and -C<SvSetMagicSV_nosteal>. -(TBT) +C<SvSetSV>, C<SvSetSV_nosteal>, C<SvSetMagicSV>, +C<SvSetMagicSV_nosteal> のようなラッパーの一つを使いたいでしょう。 void sv_setsv(SV* dsv, SV* ssv) @@ -10952,11 +10879,11 @@ ソース SV を再利用する必要がある場合にはこの関数は使わないでください 'set' magic をハンドルしません。 大まかに言うと、送り先の以前の内容を消して、値としてのコピーを行います。 -If the C<flags> parameter has the C<SV_GMAGIC> bit set, will C<mg_get> on -C<ssv> if appropriate, else not. If the C<flags> parameter has the -C<NOSTEAL> bit set then the buffers of temps will not be stolen. <sv_setsv> -and C<sv_setsv_nomg> are implemented in terms of this function. -(TBT) +C<flags> の C<SV_GMAGIC> ビットがセットされていると、適切なら C<ssv> に +C<mg_get> し、さもなければしません。 +C<flags> 引数の C<NOSTEAL> ビットがセットされているなら、temps の +バッファは盗まれません。 +<sv_setsv> と C<sv_setsv_nomg> はこの関数に関して実装されています。 =begin original @@ -10966,10 +10893,8 @@ =end original -You probably want to use one of the assortment of wrappers, such as -C<SvSetSV>, C<SvSetSV_nosteal>, C<SvSetMagicSV> and -C<SvSetMagicSV_nosteal>. -(TBT) +おそらく C<SvSetSV>, C<SvSetSV_nosteal>, C<SvSetMagicSV>, +C<SvSetMagicSV_nosteal> のようなラッパーの一つを使いたいでしょう。 =begin original @@ -10978,9 +10903,8 @@ =end original -This is the primary function for copying scalars, and most other -copy-ish functions and macros use this underneath. -(TBT) +これはスカラをコピーする基本的な関数で、その他のほとんどのコピー的な +関数とマクロは基礎としてこれを使っています。 void sv_setsv_flags(SV* dsv, SV* ssv, I32 flags) @@ -11066,10 +10990,9 @@ =end original -Returns true if the SV has a true value by Perl's rules. -Use the C<SvTRUE> macro instead, which may call C<sv_true()> or may -instead use an in-line version. -(TBT) +SV が Perl の規則で真の値を持っていれば真を返します。 +C<sv_true()> を呼び出すかも知れないし代わりにインライン版を使うかも知れない +C<SvTRUE> マクロを代わりに使ってください。 I32 sv_true(SV *sv) @@ -11259,9 +11182,8 @@ =end original -This is not as a general purpose Unicode to byte encoding interface: -use the Encode extension for that. -(TBT) +これは汎用の Unicode からバイトエンコーディングへのインターフェースでは +ありません: そのような目的には Encode エクステンションを使ってください。 =begin original @@ -11287,9 +11209,8 @@ =end original -Converts the PV of an SV to UTF-8, but then turns the C<SvUTF8> -flag off so that it looks like octets again. -(TBT) +SV の PV を UTF-8 に変換しますが、再びオクテットのように見えるように +C<SvUTF8> フラグをオフにします。 void sv_utf8_encode(SV *sv) @@ -11308,11 +11229,10 @@ =end original -Converts the PV of an SV to its UTF-8-encoded form. -Forces the SV to string form if it is not already. -Always sets the SvUTF8 flag to avoid future validity checks even -if all the bytes have hibit clear. -(TBT) +SV の PV を UTF-8 エンコードされた形式に変換します。F +もしまだ行われていなければ、SV を文字列形式に強制します。 +例え全てのバイトの最上位ビットがクリアされていても、将来の正当性チェックを +避けるために、常に SvUTF8 フラグがセットされます。 =begin original @@ -11321,9 +11241,8 @@ =end original -This is not as a general purpose byte encoding to Unicode interface: -use the Encode extension for that. -(TBT) +これは汎用のバイトエンコーディングから Unicode へのインターフェースでは +ありません: そのような目的には Encode エクステンションを使ってください。 STRLEN sv_utf8_upgrade(SV *sv) @@ -11344,13 +11263,14 @@ =end original -Converts the PV of an SV to its UTF-8-encoded form. -Forces the SV to string form if it is not already. -Always sets the SvUTF8 flag to avoid future validity checks even -if all the bytes have hibit clear. If C<flags> has C<SV_GMAGIC> bit set, -will C<mg_get> on C<sv> if appropriate, else not. C<sv_utf8_upgrade> and -C<sv_utf8_upgrade_nomg> are implemented in terms of this function. -(TBT) +SV の PV を UTF-8 エンコードされた形式に変換します。 +もしまだ行われていなければ、SV を文字列形式に強制します。 +例え全てのバイトの最上位ビットがクリアされていても、将来の正当性チェックを +避けるために、常に SvUTF8 フラグがセットされます。 +C<flags> の C<SV_GMAGIC> ビットがセットされていると、適切なら C<sv> に +C<mg_get> し、さもなければしません。 +C<sv_utf8_upgrade> と C<sv_utf8_upgrade_nomg> はこの関数に関して +実装されています。 =begin original @@ -11359,9 +11279,8 @@ =end original -This is not as a general purpose byte encoding to Unicode interface: -use the Encode extension for that. -(TBT) +これは汎用のバイトエンコーディングから Unicode へのインターフェースでは +ありません: そのような目的には Encode エクステンションを使ってください。 STRLEN sv_utf8_upgrade_flags(SV *sv, I32 flags) @@ -11410,10 +11329,8 @@ 引数を C<vsprintf> のように処理してフォーマットした出力を SV に追加します。 C スタイルの変数引数リストがない(NULL)場合には Sv の配列を使用します。 -When running with taint checks enabled, indicates via -C<maybe_tainted> if results are untrustworthy (often due to the use of -locales). -(TBT) +汚染チェックが有効の状態で実行すると、(しばしばロケールの使用によって +結果が信頼できないものなら、C<maybe_tainted> 経由で示します。 =begin original @@ -11463,11 +11380,10 @@ =end original -Works like C<sv_vcatpvf> but copies the text into the SV instead of -appending it. +C<sv_vcatpvf> と同様に動作しますが、追加するのではなく SV にテキストを +コピーします。 'set' magic をハンドルしません。 -See C<sv_vsetpvf_mg>. -(TBT) +C<sv_vsetpvf_mg> を参照してください。 =begin original @@ -11598,9 +11514,8 @@ =end original -If you want to convert to UTF-8 from other encodings than ASCII, -see sv_recode_to_utf8(). -(TBT) +ASCII 以外のエンコーディングから UTF-8 に変換したいなら、 +sv_recode_to_utf8() を参照してください。 =begin original @@ -11630,13 +11545,14 @@ =end original -Return true if the strings s1 and s2 differ case-insensitively, false -if not (if they are equal case-insensitively). If u1 is true, the -string s1 is assumed to be in UTF-8-encoded Unicode. If u2 is true, -the string s2 is assumed to be in UTF-8-encoded Unicode. If u1 or u2 -are false, the respective string is assumed to be in native 8-bit -encoding. -(TBT) +文字列 s1 と s2 が大文字小文字を無視しても違いがあれば真を返し、 +さもなければ (大文字小文字を無視して同じなら) 偽を返します。 +u1 が真なら、文字列 s1 は UTF-8 エンコードされた Unicode であると +仮定されます。 +u2 が真なら、文字列 s2 は UTF-8 エンコードされた Unicode であると +仮定されます。 +u1 か u2 が偽なら、対応する文字列はネイティブな 8 ビットエンコーディングで +あると仮定されます。 =begin original @@ -11836,8 +11752,7 @@ =end original -The pointer to the PV of the dsv is returned. -(TBT) +dsv の PV へのポインタが返されます。 char* pv_uni_display(SV *dsv, const U8 *spv, STRLEN len, STRLEN pvlim, UV flags) @@ -11874,8 +11789,7 @@ =end original -Returns TRUE if the terminator was found, else returns FALSE. -(TBT) +終端子が見付かれば TRUE を、さもなければ FALSE を返します。 bool sv_cat_decode(SV* dsv, SV *encoding, SV *ssv, int *offset, char* tstr, int tlen) @@ -11919,8 +11833,7 @@ =end original -The PV of the sv is returned. -(TBT) +sv の PV が返されます。 char* sv_recode_to_utf8(SV* sv, SV *encoding) @@ -11949,8 +11862,7 @@ =end original -The flags argument is as in pv_uni_display(). -(TBT) +flags 引数は pv_uni_display() と同様です。 =begin original @@ -11958,8 +11870,7 @@ =end original -The pointer to the PV of the dsv is returned. -(TBT) +dsv の PV へのポインタが返されます。 char* sv_uni_display(SV *dsv, SV *ssv, STRLEN pvlim, UV flags) @@ -11976,9 +11887,8 @@ =end original -The "p" contains the pointer to the UTF-8 string encoding -the character that is being converted. -(TBT) +"p" は、変換された UTF-8 文字列エンコーディングの文字へのポインタを +含みます。 =begin original @@ -11988,10 +11898,8 @@ =end original -The "ustrp" is a pointer to the character buffer to put the -conversion result to. The "lenp" is a pointer to the length -of the result. -(TBT) +"ustrp" は変換結果を入れた文字バッファへのポインタです。 +"lenp" は結果の長さへのポインタです。 =begin original @@ -11999,8 +11907,7 @@ =end original -The "swashp" is a pointer to the swash to use. -(TBT) +"swashp" は使う swash へのポインタです。 =begin original @@ -12071,9 +11978,8 @@ =end original -The first character of the foldcased version is returned -(but note, as explained above, that there may be more.) -(TBT) +最初の文字の畳み込み文字版が返されます(しかし、上述の通り、もっとあるかも +しれません。) UV to_utf8_fold(const U8 *p, U8* ustrp, STRLEN *lenp) @@ -12105,9 +12011,8 @@ =end original -The first character of the lowercased version is returned -(but note, as explained above, that there may be more.) -(TBT) +最初の文字の小文字版が返されます(しかし、上述の通り、もっとあるかも +しれません。) UV to_utf8_lower(const U8 *p, U8* ustrp, STRLEN *lenp) @@ -12139,9 +12044,8 @@ =end original -The first character of the titlecased version is returned -(but note, as explained above, that there may be more.) -(TBT) +最初の文字のタイトル文字版が返されます(しかし、上述の通り、もっとあるかも +しれません。) UV to_utf8_title(const U8 *p, U8* ustrp, STRLEN *lenp) @@ -12173,9 +12077,8 @@ =end original -The first character of the uppercased version is returned -(but note, as explained above, that there may be more.) -(TBT) +最初の文字の大文字版が返されます(しかし、上述の通り、もっとあるかも +しれません。) UV to_utf8_upper(const U8 *p, U8* ustrp, STRLEN *lenp) @@ -12192,7 +12095,6 @@ =end original flags -(TBT) =begin original @@ -12203,11 +12105,9 @@ =end original -Returns the native character value of the first character in the string -C<s> -which is assumed to be in UTF-8 encoding; C<retlen> will be set to the -length, in bytes, of that character. -(TBT) +UTF-8 エンコーディングされていると仮定されている文字列 C<s> の最初の文字の +ネイティブな符号位置を返します; C<retlen> にはその文字のバイト数が +セットされます。 =begin original @@ -12215,8 +12115,7 @@ =end original -Allows length and flags to be passed to low level routine. -(TBT) +長さとフラグは低レベルルーチンに渡されることを許しています。 UV utf8n_to_uvchr(const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags) @@ -12235,11 +12134,10 @@ =end original -Bottom level UTF-8 decode routine. -Returns the Unicode code point value of the first character in the string C<s> -which is assumed to be in UTF-8 encoding and no longer than C<curlen>; -C<retlen> will be set to the length, in bytes, of that character. -(TBT) +最低レベルの UTF-8 デコードルーチンです。 +UTF-8 エンコーディングされていて C<curlen> より長くはないと仮定されている +文字列 C<s> の最初の文字のUnicode 符号位置を返します; C<retlen> には +その文字のバイト数がセットされます。 =begin original @@ -12269,9 +12167,8 @@ =end original -The C<flags> can also contain various flags to allow deviations from -the strict UTF-8 encoding (see F<utf8.h>). -(TBT) +C<flags> は、厳密な UTF-8 エンコーディングからの逸脱を認める様々なフラグを +含めることもできます (F<utf8.h> を参照してください)。 =begin original @@ -12279,8 +12176,7 @@ =end original -Most code should use utf8_to_uvchr() rather than call this directly. -(TBT) +ほとんどのコードではこれを直接呼び出さずに utf8_to_uvchr() を使うべきです。 UV utf8n_to_uvuni(const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags) @@ -12297,9 +12193,7 @@ =end original -Returns the number of UTF-8 characters between the UTF-8 pointers C<a> -and C<b>. -(TBT) +UTF-8 ポインタ C<a> と C<b> の間の UTF-8 文字の数を返します。 =begin original @@ -12308,9 +12202,8 @@ =end original -WARNING: use only if you *know* that the pointers point inside the -same UTF-8 buffer. -(TBT) +警告: ポインタが同じ UTF-8 バッファの中を指していることを「知っている」 +場合にのみ使ってください。 IV utf8_distance(const U8 *a, const U8 *b) @@ -12327,9 +12220,7 @@ =end original -Return the UTF-8 pointer C<s> displaced by C<off> characters, either -forward or backward. -(TBT) +前または後ろに C<off> 文字だけずらした UTF-8 ポインタ C<s> を返します。 =begin original @@ -12360,10 +12251,9 @@ =end original -Return the length of the UTF-8 char encoded string C<s> in characters. -Stops at C<e> (inclusive). If C<e E<lt> s> or if the scan would end -up past C<e>, croaks. -(TBT) +UTF-8 文字エンコードされた文字列 C<s> の文字数を返します。 +C<e> で停止します(これも含みます)。 +C<e E<lt> s> であったり、スキャンが C<e> を超えて停止すると、croak します。 STRLEN utf8_length(const U8* s, const U8 *e) @@ -12421,10 +12311,9 @@ =end original -Returns the native character value of the first character in the string C<s> -which is assumed to be in UTF-8 encoding; C<retlen> will be set to the -length, in bytes, of that character. -(TBT) +UTF-8 エンコーディングされていると仮定されている文字列 C<s> の最初の文字の +ネイティブな符号位置を返します; C<retlen> にはその文字のバイト数が +セットされます。 =begin original @@ -12433,9 +12322,8 @@ =end original -If C<s> does not point to a well-formed UTF-8 character, zero is -returned and retlen is set, if possible, to -1. -(TBT) +C<s> が整形された UTF-8 文字を指していない場合、ゼロが返され、もし可能なら +retlen は -1 がセットされます。 UV utf8_to_uvchr(const U8 *s, STRLEN *retlen) @@ -12453,10 +12341,9 @@ =end original -Returns the Unicode code point of the first character in the string C<s> -which is assumed to be in UTF-8 encoding; C<retlen> will be set to the -length, in bytes, of that character. -(TBT) +UTF-8 エンコーディングされていると仮定されている文字列 C<s> の最初の文字の +Unicode 符号位置を返します; C<retlen> にはその文字のバイト数が +セットされます。 =begin original @@ -12465,9 +12352,8 @@ =end original -This function should only be used when returned UV is considered -an index into the Unicode semantic tables (e.g. swashes). -(TBT) +この関数は、返された UV が Unicode 意味論テーブル (つまり swash) への +インデックスとして考えられる場合にのみ使われるべきです。 =begin original @@ -12476,9 +12362,8 @@ =end original -If C<s> does not point to a well-formed UTF-8 character, zero is -returned and retlen is set, if possible, to -1. -(TBT) +C<s> が整形された UTF-8 文字を指していない場合、ゼロが返され、もし可能なら +retlen は -1 がセットされます。 UV utf8_to_uvuni(const U8 *s, STRLEN *retlen) @@ -12497,11 +12382,10 @@ =end original -Adds the UTF-8 representation of the Native codepoint C<uv> to the end -of the string C<d>; C<d> should be have at least C<UTF8_MAXBYTES+1> free -bytes available. The return value is the pointer to the byte after the -end of the new character. In other words, -(TBT) +ネイティブ符号位置 C<uv> の UTF-8 表現を文字列 C<d> の末尾に追加します; +C<d> は少なくとも C<UTF8_MAXBYTES+1> バイトの空きが必要です。 +返り値は新しい文字の末尾の次のバイトへのポインタです。 +言い換えると: d = uvchr_to_utf8(d, uv); @@ -12511,8 +12395,8 @@ =end original -is the recommended wide native character-aware way of saying -(TBT) +が、ネイティブな文字を認識した形で以下のようなことをするときの推奨する +方法です: *(d++) = uv; @@ -12533,10 +12417,10 @@ =end original -Adds the UTF-8 representation of the Unicode codepoint C<uv> to the end -of the string C<d>; C<d> should be have at least C<UTF8_MAXBYTES+1> free -bytes available. The return value is the pointer to the byte after the -end of the new character. In other words, +Unicode 符号位置 C<uv> の UTF-8 表現を文字列 C<d> の末尾に追加します; +C<d> は少なくとも C<UTF8_MAXBYTES+1> バイトの空きが必要です。 +返り値は新しい文字の末尾の次のバイトへのポインタです。 +言い換えると: (TBT) d = uvuni_to_utf8_flags(d, uv, flags);