@@ -10,7 +10,7 @@ msgstr ""
10
10
"Report-Msgid-Bugs-To : \n "
11
11
"POT-Creation-Date : 2018-06-30 05:56+0900\n "
12
12
"PO-Revision-Date : YEAR-MO-DA HO:MI+ZONE\n "
13
- "Last-Translator : Nozomu Kaneko <nozom.kaneko @gmail.com>, 2017\n "
13
+ "Last-Translator : TAKAHASHI Shuuji <shuuji3 @gmail.com>, 2017\n "
14
14
"Language-Team : Japanese (https://www.transifex.com/python-doc/teams/5390/ja/)\n "
15
15
"MIME-Version : 1.0\n "
16
16
"Content-Type : text/plain; charset=UTF-8\n "
@@ -48,7 +48,7 @@ msgstr ""
48
48
msgid ""
49
49
"The compilation of an extension module depends on its intended use as well "
50
50
"as on your system setup; details are given in later chapters."
51
- msgstr "拡張モジュールのコンパイル方法は、モジュールの用途やシステムの設定方法に依存します; 詳細は後の章で説明します。"
51
+ msgstr "拡張モジュールのコンパイル方法は、モジュールの用途やシステムの設定方法に依存します。 詳細は後の章で説明します。"
52
52
53
53
#: ../../extending/extending.rst:25
54
54
msgid ""
@@ -62,6 +62,12 @@ msgid ""
62
62
"with C code and are more portable between implementations of Python than "
63
63
"writing and compiling a C extension module."
64
64
msgstr ""
65
+ "C 拡張のインターフェイスは CPython に固有のものであり、これによる拡張モジュールはほかの Python 実装では動作しません。多くの場合、C "
66
+ "拡張を書くことを避けてほかの Python 実装のために移植性を確保することは可能です。たとえば、あなたがしたいことが C "
67
+ "ライブラリの関数やシステムコールを呼び出すことである場合、 :mod:`ctypes` あるいは `cffi "
68
+ "<https://cffi.readthedocs.io/>`_ ライブラリの利用を検討すべきです。これらのモジュールは C "
69
+ "コードとインターフェイスし、C 拡張を書いてコンパイルするのに較べて Python 実装間のより高い移植性をもった Python "
70
+ "コードを書かせてくれます。"
65
71
66
72
#: ../../extending/extending.rst:40
67
73
msgid "A Simple Example"
@@ -75,6 +81,9 @@ msgid ""
75
81
"terminated character string as argument and returns an integer. We want "
76
82
"this function to be callable from Python as follows:"
77
83
msgstr ""
84
+ "``spam`` (Monty Python ファンの好物ですね) という名の拡張モジュールを作成することにして、C ライブラリ関数 "
85
+ ":c:func:`system` に対する Python インターフェイスを作成したいとします。 [#]_ この関数は null "
86
+ "で終端されたキャラクタ文字列を引数にとり、整数を返します。この関数を以下のようにして Python から呼び出せるようにしたいとします。"
78
87
79
88
#: ../../extending/extending.rst:53
80
89
msgid ""
@@ -649,6 +658,10 @@ msgid ""
649
658
"the :file:`Modules/` directory of an unpacked source distribution, add a "
650
659
"line to the file :file:`Modules/Setup.local` describing your file:"
651
660
msgstr ""
661
+ "動的読み込みを使えなかったり、モジュールを常時 Python "
662
+ "インタプリタの一部にしておきたい場合には、インタプリタのビルド設定を変更して再ビルドしなければならなくなるでしょう。Unixでは、幸運なことにこの作業はとても単純です:"
663
+ " 単に自作のモジュールファイル (例えば :file:`spammodule.c`) を展開したソース配布物の :file:`Modules/` "
664
+ "ディレクトリに置き、 :file:`Modules/Setup.local` に自分のファイルを説明する以下の一行:"
652
665
653
666
#: ../../extending/extending.rst:450
654
667
msgid ""
@@ -667,7 +680,7 @@ msgstr ""
667
680
msgid ""
668
681
"If your module requires additional libraries to link with, these can be "
669
682
"listed on the line in the configuration file as well, for instance:"
670
- msgstr ""
683
+ msgstr "モジュールが別のライブラリとリンクされている必要がある場合、ライブラリも設定ファイルに列挙できます。例えば以下のようにします。 "
671
684
672
685
#: ../../extending/extending.rst:467
673
686
msgid "Calling Python Functions from C"
@@ -1154,6 +1167,9 @@ msgid ""
1154
1167
"borrowed. Using a borrowed reference after the owner has disposed of it "
1155
1168
"risks using freed memory and should be avoided completely [#]_."
1156
1169
msgstr ""
1170
+ "オブジェクトに対する参照は、借用 (:dfn:`borrow`) も可能です。 [#]_ 参照の借用者は、 :c:func:`Py_DECREF` "
1171
+ "を呼んではなりません。借用者は、参照の所有者から借用した期間を超えて参照を保持し続けてはなりません。所有者が参照を放棄した後で借用参照を使うと、解放済みメモリを使用してしまう危険があるので、絶対に避けねばなりません。"
1172
+ " [#]_"
1157
1173
1158
1174
#: ../../extending/extending.rst:929
1159
1175
msgid ""
@@ -1418,6 +1434,8 @@ msgid ""
1418
1434
" C functions (``args`` in the examples) is never *NULL* --- in fact it "
1419
1435
"guarantees that it is always a tuple [#]_."
1420
1436
msgstr ""
1437
+ "Python から C 関数を呼び出す機構は、C 関数に渡される引数リスト (例でいうところの ``args``) が決して *NULL* "
1438
+ "にならないよう保証しています --- 実際には、常にタプル型になるよう保証しています。[#]_"
1421
1439
1422
1440
#: ../../extending/extending.rst:1100
1423
1441
msgid ""
0 commit comments