@@ -15,7 +15,7 @@ msgid ""
1515msgstr ""
1616"Project-Id-Version : Python 3.13\n "
1717"Report-Msgid-Bugs-To : \n "
18- "POT-Creation-Date : 2025-01-24 14:16 +0000\n "
18+ "POT-Creation-Date : 2025-02-03 17:40 +0000\n "
1919"PO-Revision-Date : 2021-06-28 00:49+0000\n "
2020"Last-Translator : 石井明久, 2024\n "
2121"Language-Team : Japanese (https://app.transifex.com/python-doc/teams/5390/ "
@@ -749,18 +749,12 @@ msgid ""
749749msgstr ""
750750"成功すると ``0`` を返し、エラーになると例外を送出して ``-1`` を返します。"
751751
752- #: ../../c-api/module.rst:526
753- msgid ""
754- "Return ``-1`` if *value* is ``NULL``. It must be called with an exception "
755- "raised in this case."
756- msgstr ""
757-
758- #: ../../c-api/module.rst:529 ../../c-api/module.rst:576
759- #: ../../c-api/module.rst:603
752+ #: ../../c-api/module.rst:526 ../../c-api/module.rst:577
753+ #: ../../c-api/module.rst:604
760754msgid "Example usage::"
761755msgstr "使用例::"
762756
763- #: ../../c-api/module.rst:531
757+ #: ../../c-api/module.rst:528
764758msgid ""
765759"static int\n"
766760"add_spam(PyObject *module, int value)\n"
@@ -775,15 +769,22 @@ msgid ""
775769" }"
776770msgstr ""
777771
778- #: ../../c-api/module.rst:543
772+ #: ../../c-api/module.rst:540
773+ msgid ""
774+ "To be convenient, the function accepts ``NULL`` *value* with an exception "
775+ "set. In this case, return ``-1`` and just leave the raised exception "
776+ "unchanged."
777+ msgstr ""
778+
779+ #: ../../c-api/module.rst:544
779780msgid ""
780781"The example can also be written without checking explicitly if *obj* is "
781782"``NULL``::"
782783msgstr ""
783784"この例は、明示的に *obj* が ``NULL`` であることを確認せずに書くこともできま"
784785"す::"
785786
786- #: ../../c-api/module.rst:546
787+ #: ../../c-api/module.rst:547
787788msgid ""
788789"static int\n"
789790"add_spam(PyObject *module, int value)\n"
@@ -795,15 +796,15 @@ msgid ""
795796" }"
796797msgstr ""
797798
798- #: ../../c-api/module.rst:555
799+ #: ../../c-api/module.rst:556
799800msgid ""
800801"Note that ``Py_XDECREF()`` should be used instead of ``Py_DECREF()`` in this "
801802"case, since *obj* can be ``NULL``."
802803msgstr ""
803804"この場合は、 *obj* が ``NULL`` でありうるため、 ``Py_DECREF()`` の代わりに "
804805"``Py_XDECREF()`` を呼び出す必要があることに注意してください。"
805806
806- #: ../../c-api/module.rst:558
807+ #: ../../c-api/module.rst:559
807808msgid ""
808809"The number of different *name* strings passed to this function should be "
809810"kept small, usually by only using statically allocated strings as *name*. "
@@ -813,47 +814,47 @@ msgid ""
813814"internally to create a key object."
814815msgstr ""
815816
816- #: ../../c-api/module.rst:571
817+ #: ../../c-api/module.rst:572
817818msgid ""
818819"Similar to :c:func:`PyModule_AddObjectRef`, but \" steals\" a reference to "
819820"*value*. It can be called with a result of function that returns a new "
820821"reference without bothering to check its result or even saving it to a "
821822"variable."
822823msgstr ""
823824
824- #: ../../c-api/module.rst:578
825+ #: ../../c-api/module.rst:579
825826msgid ""
826827"if (PyModule_Add(module, \" spam\" , PyBytes_FromString(value)) < 0) {\n"
827828" goto error;\n"
828829"}"
829830msgstr ""
830831
831- #: ../../c-api/module.rst:587
832+ #: ../../c-api/module.rst:588
832833msgid ""
833834"Similar to :c:func:`PyModule_AddObjectRef`, but steals a reference to "
834835"*value* on success (if it returns ``0``)."
835836msgstr ""
836837
837- #: ../../c-api/module.rst:590
838+ #: ../../c-api/module.rst:591
838839msgid ""
839840"The new :c:func:`PyModule_Add` or :c:func:`PyModule_AddObjectRef` functions "
840841"are recommended, since it is easy to introduce reference leaks by misusing "
841842"the :c:func:`PyModule_AddObject` function."
842843msgstr ""
843844
844- #: ../../c-api/module.rst:597
845+ #: ../../c-api/module.rst:598
845846msgid ""
846847"Unlike other functions that steal references, ``PyModule_AddObject()`` only "
847848"releases the reference to *value* **on success**."
848849msgstr ""
849850
850- #: ../../c-api/module.rst:600
851+ #: ../../c-api/module.rst:601
851852msgid ""
852853"This means that its return value must be checked, and calling code must :c:"
853854"func:`Py_XDECREF` *value* manually on error."
854855msgstr ""
855856
856- #: ../../c-api/module.rst:605
857+ #: ../../c-api/module.rst:606
857858msgid ""
858859"PyObject *obj = PyBytes_FromString(value);\n"
859860"if (PyModule_AddObject(module, \" spam\" , obj) < 0) {\n"
@@ -867,59 +868,59 @@ msgid ""
867868"// Py_XDECREF(obj) is not needed here."
868869msgstr ""
869870
870- #: ../../c-api/module.rst:618
871+ #: ../../c-api/module.rst:619
871872msgid ":c:func:`PyModule_AddObject` is :term:`soft deprecated`."
872873msgstr ""
873874
874- #: ../../c-api/module.rst:623
875+ #: ../../c-api/module.rst:624
875876msgid ""
876877"Add an integer constant to *module* as *name*. This convenience function "
877878"can be used from the module's initialization function. Return ``-1`` with an "
878879"exception set on error, ``0`` on success."
879880msgstr ""
880881
881- #: ../../c-api/module.rst:627
882+ #: ../../c-api/module.rst:628
882883msgid ""
883884"This is a convenience function that calls :c:func:`PyLong_FromLong` and :c:"
884885"func:`PyModule_AddObjectRef`; see their documentation for details."
885886msgstr ""
886887
887- #: ../../c-api/module.rst:633
888+ #: ../../c-api/module.rst:634
888889msgid ""
889890"Add a string constant to *module* as *name*. This convenience function can "
890891"be used from the module's initialization function. The string *value* must "
891892"be ``NULL``-terminated. Return ``-1`` with an exception set on error, ``0`` "
892893"on success."
893894msgstr ""
894895
895- #: ../../c-api/module.rst:638
896+ #: ../../c-api/module.rst:639
896897msgid ""
897898"This is a convenience function that calls :c:func:"
898899"`PyUnicode_InternFromString` and :c:func:`PyModule_AddObjectRef`; see their "
899900"documentation for details."
900901msgstr ""
901902
902- #: ../../c-api/module.rst:645
903+ #: ../../c-api/module.rst:646
903904msgid ""
904905"Add an int constant to *module*. The name and the value are taken from "
905906"*macro*. For example ``PyModule_AddIntMacro(module, AF_INET)`` adds the int "
906907"constant *AF_INET* with the value of *AF_INET* to *module*. Return ``-1`` "
907908"with an exception set on error, ``0`` on success."
908909msgstr ""
909910
910- #: ../../c-api/module.rst:653
911+ #: ../../c-api/module.rst:654
911912msgid "Add a string constant to *module*."
912913msgstr "文字列定数を *module* に追加します。"
913914
914- #: ../../c-api/module.rst:657
915+ #: ../../c-api/module.rst:658
915916msgid ""
916917"Add a type object to *module*. The type object is finalized by calling "
917918"internally :c:func:`PyType_Ready`. The name of the type object is taken from "
918919"the last component of :c:member:`~PyTypeObject.tp_name` after dot. Return "
919920"``-1`` with an exception set on error, ``0`` on success."
920921msgstr ""
921922
922- #: ../../c-api/module.rst:667
923+ #: ../../c-api/module.rst:668
923924msgid ""
924925"Indicate that *module* does or does not support running without the global "
925926"interpreter lock (GIL), using one of the values from :c:macro:`Py_mod_gil`. "
@@ -930,11 +931,11 @@ msgid ""
930931"Return ``-1`` with an exception set on error, ``0`` on success."
931932msgstr ""
932933
933- #: ../../c-api/module.rst:680
934+ #: ../../c-api/module.rst:681
934935msgid "Module lookup"
935936msgstr "モジュール検索"
936937
937- #: ../../c-api/module.rst:682
938+ #: ../../c-api/module.rst:683
938939msgid ""
939940"Single-phase initialization creates singleton modules that can be looked up "
940941"in the context of the current interpreter. This allows the module object to "
@@ -945,7 +946,7 @@ msgstr ""
945946"これによって、後からモジュール定義への参照だけでモジュールオブジェクトが取得"
946947"できます。"
947948
948- #: ../../c-api/module.rst:686
949+ #: ../../c-api/module.rst:687
949950msgid ""
950951"These functions will not work on modules created using multi-phase "
951952"initialization, since multiple such modules can be created from a single "
@@ -954,7 +955,7 @@ msgstr ""
954955"多段階初期化を使うと単一の定義から複数のモジュールが作成できるので、これらの"
955956"関数は多段階初期化を使って作成されたモジュールには使えません。"
956957
957- #: ../../c-api/module.rst:691
958+ #: ../../c-api/module.rst:692
958959msgid ""
959960"Returns the module object that was created from *def* for the current "
960961"interpreter. This method requires that the module object has been attached "
@@ -968,7 +969,7 @@ msgstr ""
968969"ジュールオブジェクトが見付からない、もしくは事前にインタプリタの state に連結"
969970"されていない場合は、 ``NULL`` を返します。"
970971
971- #: ../../c-api/module.rst:698
972+ #: ../../c-api/module.rst:699
972973msgid ""
973974"Attaches the module object passed to the function to the interpreter state. "
974975"This allows the module object to be accessible via :c:func:"
@@ -978,11 +979,11 @@ msgstr ""
978979"の関数を使うことで :c:func:`PyState_FindModule` からモジュールオブジェクトに"
979980"アクセスできるようになります。"
980981
981- #: ../../c-api/module.rst:701
982+ #: ../../c-api/module.rst:702
982983msgid "Only effective on modules created using single-phase initialization."
983984msgstr "一段階初期化を使って作成されたモジュールにのみ有効です。"
984985
985- #: ../../c-api/module.rst:703
986+ #: ../../c-api/module.rst:704
986987msgid ""
987988"Python calls ``PyState_AddModule`` automatically after importing a module, "
988989"so it is unnecessary (but harmless) to call it from module initialization "
@@ -993,15 +994,15 @@ msgid ""
993994"state updates)."
994995msgstr ""
995996
996- #: ../../c-api/module.rst:711 ../../c-api/module.rst:722
997+ #: ../../c-api/module.rst:712 ../../c-api/module.rst:723
997998msgid "The caller must hold the GIL."
998999msgstr "呼び出し側はGILを獲得しなければなりません。"
9991000
1000- #: ../../c-api/module.rst:713
1001+ #: ../../c-api/module.rst:714
10011002msgid "Return ``-1`` with an exception set on error, ``0`` on success."
10021003msgstr ""
10031004
1004- #: ../../c-api/module.rst:719
1005+ #: ../../c-api/module.rst:720
10051006msgid ""
10061007"Removes the module object created from *def* from the interpreter state. "
10071008"Return ``-1`` with an exception set on error, ``0`` on success."
0 commit comments