@@ -15,7 +15,7 @@ msgid ""
1515msgstr ""
1616"Project-Id-Version : Python 3.8\n "
1717"Report-Msgid-Bugs-To : \n "
18- "POT-Creation-Date : 2019-09-01 14:24 +0000\n "
18+ "POT-Creation-Date : 2019-09-13 11:25 +0000\n "
1919"PO-Revision-Date : 2017-02-16 17:37+0000\n "
2020"Last-Translator : tomo, 2019\n "
2121"Language-Team : Japanese (https://www.transifex.com/python-doc/teams/5390/ja/)\n "
@@ -589,23 +589,31 @@ msgstr ""
589589msgid ""
590590"Add an object to *module* as *name*. This is a convenience function which "
591591"can be used from the module's initialization function. This steals a "
592- "reference to *value*. Return ``-1`` on error, ``0`` on success."
592+ "reference to *value* on success . Return ``-1`` on error, ``0`` on success."
593593msgstr ""
594- "*module* にオブジェクトを *name* として追加します。\n"
595- "この関数はモジュールの初期化関数から利用される便利関数です。\n"
596- "これは *value* への参照を盗みます。\n"
597- "エラーのときには ``-1`` を、成功したときには ``0`` を返します。"
598594
599595#: ../../c-api/module.rst:424
600596msgid ""
597+ "Unlike other functions that steal references, ``PyModule_AddObject()`` only "
598+ "decrements the reference count of *value* **on success**."
599+ msgstr ""
600+
601+ #: ../../c-api/module.rst:427
602+ msgid ""
603+ "This means that its return value must be checked, and calling code must "
604+ ":c:func:`Py_DECREF` *value* manually on error. Example usage::"
605+ msgstr ""
606+
607+ #: ../../c-api/module.rst:439
608+ msgid ""
601609"Add an integer constant to *module* as *name*. This convenience function "
602610"can be used from the module's initialization function. Return ``-1`` on "
603611"error, ``0`` on success."
604612msgstr ""
605613"*module* に整数定数を *name* として追加します。この便宜関数はモジュールの初期化関数から利用されています。エラーのときには ``-1``"
606614" を、成功したときには ``0`` を返します。"
607615
608- #: ../../c-api/module.rst:431
616+ #: ../../c-api/module.rst:446
609617msgid ""
610618"Add a string constant to *module* as *name*. This convenience function can "
611619"be used from the module's initialization function. The string *value* must "
@@ -616,7 +624,7 @@ msgstr ""
616624"文字列 *value* は *NULL* 終端されていなければなりません。\n"
617625"エラーのときには ``-1`` を、成功したときには ``0`` を返します。"
618626
619- #: ../../c-api/module.rst:438
627+ #: ../../c-api/module.rst:453
620628msgid ""
621629"Add an int constant to *module*. The name and the value are taken from "
622630"*macro*. For example ``PyModule_AddIntMacro(module, AF_INET)`` adds the int "
@@ -627,15 +635,15 @@ msgstr ""
627635"``PyModule_AddIntMacro(module, AF_INET)`` とすると、 *AF_INET* という名前の int 型定数を "
628636"*AF_INET* の値で *module* に追加します。エラー時には ``-1`` を、成功時には ``0`` を返します。"
629637
630- #: ../../c-api/module.rst:446
638+ #: ../../c-api/module.rst:461
631639msgid "Add a string constant to *module*."
632640msgstr "文字列定数を *module* に追加します。"
633641
634- #: ../../c-api/module.rst:450
642+ #: ../../c-api/module.rst:465
635643msgid "Module lookup"
636644msgstr "モジュール検索"
637645
638- #: ../../c-api/module.rst:452
646+ #: ../../c-api/module.rst:467
639647msgid ""
640648"Single-phase initialization creates singleton modules that can be looked up "
641649"in the context of the current interpreter. This allows the module object to "
@@ -644,14 +652,14 @@ msgstr ""
644652"一段階初期化は、現在のインタプリタのコンテキストから探せるシングルトンのモジュールを生成します。\n"
645653"これによって、後からモジュール定義への参照だけでモジュールオブジェクトが取得できます。"
646654
647- #: ../../c-api/module.rst:456
655+ #: ../../c-api/module.rst:471
648656msgid ""
649657"These functions will not work on modules created using multi-phase "
650658"initialization, since multiple such modules can be created from a single "
651659"definition."
652660msgstr "多段階初期化を使うと単一の定義から複数のモジュールが作成できるので、これらの関数は多段階初期化を使って作成されたモジュールには使えません。"
653661
654- #: ../../c-api/module.rst:461
662+ #: ../../c-api/module.rst:476
655663msgid ""
656664"Returns the module object that was created from *def* for the current "
657665"interpreter. This method requires that the module object has been attached "
@@ -664,7 +672,7 @@ msgstr ""
664672"にモジュールオブジェクトを連結しておくことを要求します。対応するモジュールオブジェクトが見付からない、もしくは事前にインタプリタの state "
665673"に連結されていない場合は、 *NULL* を返します。"
666674
667- #: ../../c-api/module.rst:468
675+ #: ../../c-api/module.rst:483
668676msgid ""
669677"Attaches the module object passed to the function to the interpreter state. "
670678"This allows the module object to be accessible via "
@@ -673,11 +681,11 @@ msgstr ""
673681"関数に渡されたモジュールオブジェクトを、インタプリタの state に連結します。この関数を使うことで "
674682":c:func:`PyState_FindModule` からモジュールオブジェクトにアクセスできるようになります。"
675683
676- #: ../../c-api/module.rst:471
684+ #: ../../c-api/module.rst:486
677685msgid "Only effective on modules created using single-phase initialization."
678686msgstr "一段階初期化を使って作成されたモジュールにのみ有効です。"
679687
680- #: ../../c-api/module.rst:477
688+ #: ../../c-api/module.rst:492
681689msgid ""
682690"Removes the module object created from *def* from the interpreter state."
683691msgstr "*def* から作られたモジュールオブジェクトをインタプリタ state から削除します。"
0 commit comments