[perldocjp-cvs 1932] CVS update: docs/perl/5.16.1

アーカイブの一覧に戻る

argra****@users***** argra****@users*****
2015年 2月 16日 (月) 00:55:18 JST


Index: docs/perl/5.16.1/perlxstypemap.pod
diff -u docs/perl/5.16.1/perlxstypemap.pod:1.2 docs/perl/5.16.1/perlxstypemap.pod:1.3
--- docs/perl/5.16.1/perlxstypemap.pod:1.2	Sat Dec 27 18:35:37 2014
+++ docs/perl/5.16.1/perlxstypemap.pod	Mon Feb 16 00:55:17 2015
@@ -228,8 +228,8 @@
 
 =end original
 
-Starting with ExtUtils::ParseXS version 3.13_01 (comes with perl 5.16
-and better), it is rather easy to share typemap code between multiple
+(perl 5.16 以降に同梱されている) ExtUtils::ParseXS バージョン 3.13_01 から、
+it is rather easy to share typemap code between multiple
 CPAN distributions. The general idea is to share it as a module that
 offers a certain API and have the dependent modules declare that as a
 built-time requirement and import the typemap into the XS. An example
@@ -250,10 +250,10 @@
 
 =end original
 
-Declare C<ExtUtils::Typemaps::Basic> as a build-time dependency
-in C<Makefile.PL> (use C<BUILD_REQUIRES>), or in your C<Build.PL>
-(use C<build_requires>).
-(TBT)
+
+C<Makefile.PL> (C<BUILD_REQUIRES> を使う) または C<Build.PL>
+(C<build_requires> を使う) で、ビルド時依存として
+C<ExtUtils::Typemaps::Basic> を宣言する。
 
 =item *
 
@@ -264,9 +264,8 @@
 
 =end original
 
-Include the following line in the XS section of your XS file:
-(don't break the line)
-(TBT)
+XS ファイルの XS 節に以下の行を含めてください:
+(行は分割しないでください)
 
   INCLUDE_COMMAND: $^X -MExtUtils::Typemaps::Cmd
                    -e "print embeddable_typemap(q{Basic})"
@@ -285,10 +284,9 @@
 
 =end original
 
-Each INPUT or OUTPUT typemap entry is a double-quoted Perl string that
-will be evaluated in the presence of certain variables to get the
-final C code for mapping a certain C type.
-(TBT)
+それぞれの INPUT または OUTPUT typemap エントリは、特定の C 型に
+マッピングするための最終的な C コードを得るために、特定の変数の存在が
+評価される、ダブルクォートで囲まれた Perl 文字列です。
 
 =begin original
 
@@ -300,12 +298,11 @@
 
 =end original
 
-This means that you can embed Perl code in your typemap (C) code using
-constructs such as
-C<${ perl code that evaluates to scalar reference here }>. A common
-use case is to generate error messages that refer to the true function
-name even when using the ALIAS XS feature:
-(TBT)
+つまり、C<${ ここにスカラリファレンスに評価される perl コード }> のような
+構文を使って、typemap (C) コードの中に Perl コードを
+組み込めるということです。
+一般的な使用法は、ALIAS XS 機能を使っているときでも、真の関数名を参照する
+エラーメッセージを生成することです:
 
   ${ $ALIAS ? \q[GvNAME(CvGV(cv))] : \qq[\"$pname\"] }
 
@@ -316,9 +313,8 @@
 
 =end original
 
-For many typemap examples, refer to the core typemap file that can be
-found in the perl source tree at F<lib/ExtUtils/typemap>.
-(TBT)
+多くの typemap の例で、perl ソースツリーの F<lib/ExtUtils/typemap> にある
+コア typemap ファイルを参照しています。
 
 =begin original
 
@@ -327,9 +323,7 @@
 
 =end original
 
-The Perl variables that are available for interpolation into typemaps
-are the following:
-(TBT)
+typemap へ展開可能な Perl 変数は以下のものです:
 
 =over 4
 
@@ -342,9 +336,7 @@
 
 =end original
 
-I<$var> - the name of the input or output variable, eg. RETVAL for
-return values.
-(TBT)
+I<$var> - 入力または出力の変数名; 例えば返り値の RETVAL。
 
 =item *
 
@@ -355,9 +347,7 @@
 
 =end original
 
-I<$type> - the raw C type of the parameter, any C<:> replaced with
-C<_>.
-(TBT)
+I<$type> - 引数の生の C 型; C<:> は C<_> に置換されます。
 
 =item *
 
@@ -368,9 +358,8 @@
 
 =end original
 
-I<$ntype> - the supplied type with C<*> replaced with C<Ptr>.
-e.g. for a type of C<Foo::Bar>, I<$ntype> is C<Foo::Bar>
-(TBT)
+I<$ntype> - 提供された型 ; C<*> は C<Ptr> に置換されます。
+例えば C<Foo::Bar> の型では、I<$ntype> は C<Foo::Bar> です。
 
 =item *
 
@@ -381,9 +370,7 @@
 
 =end original
 
-I<$arg> - the stack entry, that the parameter is input from or output
-to, e.g. C<ST(0)>
-(TBT)
+I<$arg> - スタックエントリ; 引数は入力または出力; 例えば C<ST(0)>
 
 =item *
 
@@ -394,9 +381,8 @@
 
 =end original
 
-I<$argoff> - the argument stack offset of the argument.  ie. 0 for the
-first argument, etc.
-(TBT)
+I<$argoff> - 引数の引数スタックオフセット。
+つまり、最初の引数は 0、など。
 
 =item *
 
@@ -407,9 +393,8 @@
 
 =end original
 
-I<$pname> - the full name of the XSUB, with including the C<PACKAGE>
-name, with any C<PREFIX> stripped.  This is the non-ALIAS name.
-(TBT)
+I<$pname> - XSUB 完全名; C<PACKAGE> 名を含み、C<PREFIX> は除去されます。
+これは非-ALIAS 名です。
 
 =item *
 
@@ -420,9 +405,7 @@
 
 =end original
 
-I<$Package> - the package specified by the most recent C<PACKAGE>
-keyword.
-(TBT)
+I<$Package> - もっとも最近の C<PACKAGE> キーワードで指定されたパッケージ。
 
 =item *
 
@@ -433,9 +416,7 @@
 
 =end original
 
-I<$ALIAS> - non-zero if the current XSUB has any aliases declared with
-C<ALIAS>.
-(TBT)
+I<$ALIAS> - 現在の XSUB が C<ALIAS> で宣言された別名を持っていれば非 0。
 
 =back
 
@@ -483,8 +464,7 @@
 
 =end original
 
-Used to pass in and return a reference to an SV.
-(TBT)
+SV へのリファレンスを渡したり返したりするために使われます。
 
 =begin original
 
@@ -525,9 +505,8 @@
 
 =end original
 
-From the perl level this is a reference to a perl array.
-From the C level this is a pointer to an AV.
-(TBT)
+perl レベルでは perl 配列へのリファレンスです。
+C レベルでは AV へのポインタです。
 
 =begin original
 
@@ -536,9 +515,9 @@
 
 =end original
 
-Note that this typemap does not decrement the reference count
-when returning an AV*. See also: T_AVREF_REFCOUNT_FIXED
-(TBT)
+この typemap は AV* を返すときに参照カウントをデクリメントしないことに
+注意してください。
+T_AVREF_REFCOUNT_FIXED も参照してください。
 
 =item T_AVREF_REFCOUNT_FIXED
 
@@ -692,8 +671,7 @@
 
 =end original
 
-The L<POSIX|POSIX> module makes extensive use of this type.
-(TBT)
+L<POSIX|POSIX> モジュールはこの型を広範囲に使います。
 
 =item T_UV
 
@@ -703,8 +681,7 @@
 
 =end original
 
-An unsigned integer.
-(TBT)
+符号なし整数。
 
 =item T_IV
 
@@ -715,7 +692,8 @@
 
 =end original
 
-A signed integer. This is cast to the required integer type when
+符号付き整数。
+This is cast to the required integer type when
 passed to C and converted to an IV when passed back to Perl.
 (TBT)
 
@@ -729,7 +707,8 @@
 
 =end original
 
-A signed integer. This typemap converts the Perl value to a native
+符号付き整数。
+This typemap converts the Perl value to a native
 integer type (the C<int> type on the current platform). When returning
 the value to perl it is processed in the same way as for T_IV.
 (TBT)
@@ -740,8 +719,7 @@
 
 =end original
 
-Its behaviour is identical to using an C<int> type in XS with T_IV.
-(TBT)
+この振る舞いは XS で T_IV 付きで C<int> を使うのと同じです。
 
 =item T_ENUM
 
@@ -753,10 +731,10 @@
 
 =end original
 
-An enum value. Used to transfer an enum component
-from C. There is no reason to pass an enum value to C since
-it is stored as an IV inside perl.
-(TBT)
+列挙値。
+C から列挙要素を転送するために使われます。
+C に列挙値を渡す理由はありません; perl の内部では IV として
+保管されているからです。
 
 =item T_BOOL
 
@@ -767,9 +745,8 @@
 
 =end original
 
-A boolean type. This can be used to pass true and false values to and
-from C.
-(TBT)
+真偽値型。
+これは C との間で真と偽の値を渡すために使えます。
 
 =item T_U_INT
 
@@ -781,7 +758,8 @@
 
 =end original
 
-This is for unsigned integers. It is equivalent to using T_UV
+これは符号なし整数のためのものです。
+It is equivalent to using T_UV
 but explicitly casts the variable to type C<unsigned int>.
 The default type for C<unsigned int> is T_UV.
 (TBT)
@@ -796,7 +774,8 @@
 
 =end original
 
-Short integers. This is equivalent to T_IV but explicitly casts
+short 整数。
+This is equivalent to T_IV but explicitly casts
 the return to type C<short>. The default typemap for C<short>
 is T_IV.
 (TBT)
@@ -811,7 +790,8 @@
 
 =end original
 
-Unsigned short integers. This is equivalent to T_UV but explicitly
+符号なし short 整数。
+This is equivalent to T_UV but explicitly
 casts the return to type C<unsigned short>. The default typemap for
 C<unsigned short> is T_UV.
 (TBT)
@@ -822,8 +802,7 @@
 
 =end original
 
-T_U_SHORT is used for type C<U16> in the standard typemap.
-(TBT)
+T_U_SHORT は標準 typemap での C<U16> 型で使われます。
 
 =item T_LONG
 
@@ -835,7 +814,8 @@
 
 =end original
 
-Long integers. This is equivalent to T_IV but explicitly casts
+long 整数。
+This is equivalent to T_IV but explicitly casts
 the return to type C<long>. The default typemap for C<long>
 is T_IV.
 (TBT)
@@ -850,7 +830,8 @@
 
 =end original
 
-Unsigned long integers. This is equivalent to T_UV but explicitly
+符号なし long 整数。
+This is equivalent to T_UV but explicitly
 casts the return to type C<unsigned long>. The default typemap for
 C<unsigned long> is T_UV.
 (TBT)
@@ -861,8 +842,7 @@
 
 =end original
 
-T_U_LONG is used for type C<U32> in the standard typemap.
-(TBT)
+T_U_LONG は標準 typemap での C<U32> 型で使われます。
 
 =item T_CHAR
 
@@ -872,8 +852,7 @@
 
 =end original
 
-Single 8-bit characters.
-(TBT)
+単一の 8 ビット文字。
 
 =item T_U_CHAR
 
@@ -883,8 +862,7 @@
 
 =end original
 
-An unsigned byte.
-(TBT)
+符号なしバイト。
 
 =item T_FLOAT
 
@@ -895,9 +873,8 @@
 
 =end original
 
-A floating point number. This typemap guarantees to return a variable
-cast to a C<float>.
-(TBT)
+浮動小数点数。
+この typemap は C<float> にキャストした変数を返すことを保証します。
 
 =item T_NV
 
@@ -909,7 +886,8 @@
 
 =end original
 
-A Perl floating point number. Similar to T_IV and T_UV in that the
+Perl の浮動小数点数。
+Similar to T_IV and T_UV in that the
 return type is cast to the requested numeric type rather than
 to a specific type.
 (TBT)
@@ -923,7 +901,8 @@
 
 =end original
 
-A double precision floating point number. This typemap guarantees to
+倍精度浮動小数点数。
+This typemap guarantees to
 return a variable cast to a C<double>.
 (TBT)
 
@@ -935,8 +914,7 @@
 
 =end original
 
-A string (char *).
-(TBT)
+文字列 (char *)。
 
 =item T_PTR
 
@@ -947,9 +925,8 @@
 
 =end original
 
-A memory address (pointer). Typically associated with a C<void *>
-type.
-(TBT)
+メモリアドレス(ポインタ)。
+典型的には C<void *> 型に結びつけられます。
 
 =item T_PTRREF
 
@@ -974,8 +951,7 @@
 
 =end original
 
-The typemap checks that a scalar reference is passed from perl to XS.
-(TBT)
+typemap はスカラリファレンスが perl から XS に渡されたことをチェックします。
 
 =item T_PTROBJ
 
@@ -1015,8 +991,7 @@
 
 =end original
 
-NOT YET
-(TBT)
+未記述
 
 =item T_REF_IV_PTR
 
@@ -1054,8 +1029,7 @@
 
 =end original
 
-NOT YET
-(TBT)
+未記述
 
 =item T_REFREF
 
@@ -1079,9 +1053,8 @@
 
 =end original
 
-Only the INPUT part of this is implemented (Perl to XSUB) and there
-are no known users in core or on CPAN.
-(TBT)
+これは INPUT 部 (Perl から XSUB) のみが実装されていて、コアや CPAN で
+使っているコードは知られていません。
 
 =item T_REFOBJ
 
@@ -1091,8 +1064,7 @@
 
 =end original
 
-NOT YET
-(TBT)
+未記述
 
 =item T_OPAQUEPTR
 
@@ -1278,9 +1250,7 @@
 
 =end original
 
-An example conversion function for a typemapped struct
-C<foo_t *> might be:
-(TBT)
+typemap された構造体 C<foo_t *> のための変換関数の例は次のようなものです:
 
   static void
   XS_pack_foo_tPtr(SV *out, foo_t *in)
@@ -1302,9 +1272,8 @@
 
 =end original
 
-The conversion from Perl to C is left as an exercise to the reader,
-but the prototype would be:
-(TBT)
+Perl から C への変換は読者の演習として残されていますが、プロトタイプは
+次のようになります:
 
   static foo_t *
   XS_unpack_foo_tPtr(SV *in);
@@ -1340,7 +1309,8 @@
 
 =end original
 
-T_PACKEDARRAY is similar to T_PACKED. In fact, the C<INPUT> (Perl
+T_PACKEDARRAY は T_PACKED に似ています。
+In fact, the C<INPUT> (Perl
 to XSUB) typemap is indentical, but the C<OUTPUT> typemap passes
 an additional argument to the C<XS_pack_$ntype> function. This
 third parameter indicates the number of elements in the output
@@ -1395,9 +1365,8 @@
 
 =end original
 
-Alternatively, using a customized typemap for your purposes in
-the first place is probably preferrable.
-(TBT)
+あるいは、最初の場所であなたの目的のためのカスタマイズされた typemap を
+使う方がおそらく好ましいです。
 
 =item T_DATAUNIT
 
@@ -1407,8 +1376,7 @@
 
 =end original
 
-NOT YET
-(TBT)
+未記述
 
 =item T_CALLBACK
 
@@ -1418,8 +1386,7 @@
 
 =end original
 
-NOT YET
-(TBT)
+未記述
 
 =item T_ARRAY
 
@@ -1442,8 +1409,7 @@
 
 =end original
 
-The usual calling signature is
-(TBT)
+この通常の呼び出しシグネチャは
 
   @out = array_func( @in );
 



perldocjp-cvs メーリングリストの案内
アーカイブの一覧に戻る