@@ -22,11 +22,9 @@ msgstr ""
2222"Content-Transfer-Encoding : 8bit\n "
2323"Plural-Forms : nplurals=1; plural=0;\n "
2424
25- #: ../../c-api/allocation.rst:6
2625msgid "Allocating objects on the heap"
27- msgstr ""
26+ msgstr "ヒープ上でのオブジェクトの割り当て "
2827
29- #: ../../c-api/allocation.rst:17
3028msgid ""
3129"Initialize a newly allocated object *op* with its type and initial "
3230"reference. Returns the initialized object. Other fields of the object are "
@@ -35,20 +33,32 @@ msgid ""
3533"slot). Specifically, this function does **not** call the object's :meth:`!"
3634"__init__` method."
3735msgstr ""
36+ "新しく割り当てたオブジェクト *op* の型と初期の参照を設定し、初期化したオブ"
37+ "ジェクトを返します。\n"
38+ "オブジェクトの他のフィールドは初期化しません。\n"
39+ "名前に反して、この関数はオブジェクトの :meth:`~object.__init__` メソッド (:c:"
40+ "member:`~PyTypeObject.tp_init` スロット) とは無関係です。\n"
41+ "特に、この関数はオブジェクトの :meth:`!__init__` メソッドを呼び出し **ません"
42+ "**。"
3843
39- #: ../../c-api/allocation.rst:24
4044msgid ""
4145"In general, consider this function to be a low-level routine. Use :c:member:"
4246"`~PyTypeObject.tp_alloc` where possible. For implementing :c:member:`!"
4347"tp_alloc` for your type, prefer :c:func:`PyType_GenericAlloc` or :c:func:"
4448"`PyObject_New`."
4549msgstr ""
50+ "一般に、この関数は低レベルのルーチンとして扱ってください。\n"
51+ "可能な場合は :c:member:`~PyTypeObject.tp_alloc` を使ってください。\n"
52+ "自分の型の :c:member:`!tp_alloc` を実装する場合は、:c:func:"
53+ "`PyType_GenericAlloc` または :c:func:`PyObject_New` を優先してください。"
4654
47- #: ../../c-api/allocation.rst:31
4855msgid ""
4956"This function only initializes the object's memory corresponding to the "
5057"initial :c:type:`PyObject` structure. It does not zero the rest."
5158msgstr ""
59+ "この関数が初期化するのは、オブジェクトのメモリのうち先頭の :c:type:"
60+ "`PyObject` 構造体に対応する部分だけです。\n"
61+ "残りの部分をゼロで埋めることはありません。"
5262
5363#: ../../c-api/allocation.rst:37
5464msgid ""
@@ -58,132 +68,155 @@ msgstr ""
5868":c:func:`PyObject_Init` の全ての処理を行い、可変サイズオブジェクトの場合には"
5969"長さ情報も初期化します。"
6070
61- #: ../../c-api/allocation.rst:42
6271msgid ""
6372"This function only initializes some of the object's memory. It does not "
6473"zero the rest."
6574msgstr ""
75+ "この関数が初期化するのは、オブジェクトのメモリの一部だけです。\n"
76+ "残りの部分をゼロで埋めることはありません。"
6677
67- #: ../../c-api/allocation.rst:48
6878msgid ""
6979"Allocates a new Python object using the C structure type *TYPE* and the "
7080"Python type object *typeobj* (``PyTypeObject*``) by calling :c:func:"
7181"`PyObject_Malloc` to allocate memory and initializing it like :c:func:"
7282"`PyObject_Init`. The caller will own the only reference to the object (i.e. "
7383"its reference count will be one)."
7484msgstr ""
85+ "C の構造体型 *TYPE* と Python の型オブジェクト *typeobj* (``PyTypeObject*``) "
86+ "を使って、新しい Python オブジェクトを割り当てます。\n"
87+ ":c:func:`PyObject_Malloc` を呼び出してメモリを割り当て、:c:func:"
88+ "`PyObject_Init` と同じように初期化します。\n"
89+ "呼び出し側がオブジェクトへの唯一の参照を所有します (つまり参照カウントは 1 に"
90+ "なります)。"
7591
76- #: ../../c-api/allocation.rst:54 ../../c-api/allocation.rst:107
7792msgid ""
7893"Avoid calling this directly to allocate memory for an object; call the "
7994"type's :c:member:`~PyTypeObject.tp_alloc` slot instead."
8095msgstr ""
96+ "オブジェクトのメモリを割り当てるためにこれを直接呼び出すのは避け、代わりに型"
97+ "の :c:member:`~PyTypeObject.tp_alloc` スロットを呼び出してください。"
8198
82- #: ../../c-api/allocation.rst:57 ../../c-api/allocation.rst:110
8399msgid ""
84100"When populating a type's :c:member:`~PyTypeObject.tp_alloc` slot, :c:func:"
85101"`PyType_GenericAlloc` is preferred over a custom function that simply calls "
86102"this macro."
87103msgstr ""
104+ "型の :c:member:`~PyTypeObject.tp_alloc` スロットには、このマクロを呼び出すだ"
105+ "けの独自の関数よりも :c:func:`PyType_GenericAlloc` を設定することが推奨されま"
106+ "す。"
88107
89- #: ../../c-api/allocation.rst:61
90108msgid ""
91109"This macro does not call :c:member:`~PyTypeObject.tp_alloc`, :c:member:"
92110"`~PyTypeObject.tp_new` (:meth:`~object.__new__`), or :c:member:"
93111"`~PyTypeObject.tp_init` (:meth:`~object.__init__`)."
94112msgstr ""
113+ "このマクロは :c:member:`~PyTypeObject.tp_alloc`、:c:member:`~PyTypeObject."
114+ "tp_new` (:meth:`~object.__new__`)、:c:member:`~PyTypeObject.tp_init` (:meth:"
115+ "`~object.__init__`) を呼び出しません。"
95116
96- #: ../../c-api/allocation.rst:65
97117msgid ""
98118"This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set in :c:"
99119"member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_New` instead."
100120msgstr ""
121+ ":c:member:`~PyTypeObject.tp_flags` に :c:macro:`Py_TPFLAGS_HAVE_GC` が設定さ"
122+ "れたオブジェクトには使えません。\n"
123+ "代わりに :c:macro:`PyObject_GC_New` を使ってください。"
101124
102- #: ../../c-api/allocation.rst:68
103125msgid ""
104126"Memory allocated by this macro must be freed with :c:func:`PyObject_Free` "
105127"(usually called via the object's :c:member:`~PyTypeObject.tp_free` slot)."
106128msgstr ""
129+ "このマクロで割り当てたメモリは :c:func:`PyObject_Free` で解放しなければなりま"
130+ "せん (通常はオブジェクトの :c:member:`~PyTypeObject.tp_free` スロットを介して"
131+ "呼び出します)。"
107132
108- #: ../../c-api/allocation.rst:73 ../../c-api/allocation.rst:123
109133msgid ""
110134"The returned memory is not guaranteed to have been completely zeroed before "
111135"it was initialized."
112- msgstr ""
136+ msgstr "返されるメモリが初期化前にすべてゼロで埋められているとは限りません。 "
113137
114- #: ../../c-api/allocation.rst:78 ../../c-api/allocation.rst:128
115138msgid ""
116139"This macro does not construct a fully initialized object of the given type; "
117140"it merely allocates memory and prepares it for further initialization by :c:"
118141"member:`~PyTypeObject.tp_init`. To construct a fully initialized object, "
119142"call *typeobj* instead. For example::"
120143msgstr ""
144+ "このマクロは指定された型の完全に初期化されたオブジェクトを構築するものではあ"
145+ "りません。\n"
146+ "メモリを割り当て、:c:member:`~PyTypeObject.tp_init` によるさらなる初期化の準"
147+ "備をするだけです。\n"
148+ "完全に初期化されたオブジェクトを構築するには、代わりに *typeobj* を呼び出して"
149+ "ください。\n"
150+ "例えば次のようにします。 ::"
121151
122- #: ../../c-api/allocation.rst:83
123152msgid "PyObject *foo = PyObject_CallNoArgs((PyObject *)&PyFoo_Type);"
124- msgstr ""
153+ msgstr "PyObject *foo = PyObject_CallNoArgs((PyObject *)&PyFoo_Type); "
125154
126155#: ../../c-api/allocation.rst:87 ../../c-api/allocation.rst:137
127156#: ../../c-api/allocation.rst:184 ../../c-api/allocation.rst:186
128157#: ../../c-api/allocation.rst:188
129158msgid ":c:func:`PyObject_Free`"
130159msgstr ":c:func:`PyObject_Free`"
131160
132- #: ../../c-api/allocation.rst:88
133161msgid ":c:macro:`PyObject_GC_New`"
134- msgstr ""
162+ msgstr ":c:macro:`PyObject_GC_New` "
135163
136- #: ../../c-api/allocation.rst:89 ../../c-api/allocation.rst:139
137164msgid ":c:func:`PyType_GenericAlloc`"
138- msgstr ""
165+ msgstr ":c:func:`PyType_GenericAlloc` "
139166
140167#: ../../c-api/allocation.rst:90 ../../c-api/allocation.rst:140
141168msgid ":c:member:`~PyTypeObject.tp_alloc`"
142169msgstr ":c:member:`~PyTypeObject.tp_alloc`"
143170
144- #: ../../c-api/allocation.rst:95
145171msgid "Like :c:macro:`PyObject_New` except:"
146- msgstr ""
172+ msgstr ":c:macro:`PyObject_New` と同じですが、次の点が異なります。 "
147173
148- #: ../../c-api/allocation.rst:97
149174msgid ""
150175"It allocates enough memory for the *TYPE* structure plus *size* "
151176"(``Py_ssize_t``) fields of the size given by the :c:member:`~PyTypeObject."
152177"tp_itemsize` field of *typeobj*."
153178msgstr ""
179+ "*TYPE* 構造体に加え、*typeobj* の :c:member:`~PyTypeObject.tp_itemsize` "
180+ "フィールドが指定するサイズのフィールド *size* 個分 (``Py_ssize_t``) のメモリ"
181+ "を割り当てます。"
154182
155- #: ../../c-api/allocation.rst:100
156183msgid "The memory is initialized like :c:func:`PyObject_InitVar`."
157- msgstr ""
184+ msgstr "メモリは :c:func:`PyObject_InitVar` と同じように初期化されます。 "
158185
159- #: ../../c-api/allocation.rst:102
160186msgid ""
161187"This is useful for implementing objects like tuples, which are able to "
162188"determine their size at construction time. Embedding the array of fields "
163189"into the same allocation decreases the number of allocations, improving the "
164190"memory management efficiency."
165191msgstr ""
192+ "これはタプルのように構築時にサイズを決定できるオブジェクトの実装に役立ちま"
193+ "す。\n"
194+ "フィールドの配列を同じ割り当て領域に埋め込むことで、割り当て回数を減らし、メ"
195+ "モリ管理の効率を高められます。"
166196
167- #: ../../c-api/allocation.rst:114
168197msgid ""
169198"This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set in :c:"
170199"member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_NewVar` instead."
171200msgstr ""
201+ ":c:member:`~PyTypeObject.tp_flags` に :c:macro:`Py_TPFLAGS_HAVE_GC` が設定さ"
202+ "れたオブジェクトには使えません。\n"
203+ "代わりに :c:macro:`PyObject_GC_NewVar` を使ってください。"
172204
173- #: ../../c-api/allocation.rst:118
174205msgid ""
175206"Memory allocated by this function must be freed with :c:func:`PyObject_Free` "
176207"(usually called via the object's :c:member:`~PyTypeObject.tp_free` slot)."
177208msgstr ""
209+ "この関数で割り当てたメモリは :c:func:`PyObject_Free` で解放しなければなりませ"
210+ "ん (通常はオブジェクトの :c:member:`~PyTypeObject.tp_free` スロットを介して呼"
211+ "び出します)。"
178212
179- #: ../../c-api/allocation.rst:133
180213msgid ""
181214"PyObject *list_instance = PyObject_CallNoArgs((PyObject *)&PyList_Type);"
182215msgstr ""
216+ "PyObject *list_instance = PyObject_CallNoArgs((PyObject *)&PyList_Type);"
183217
184- #: ../../c-api/allocation.rst:138
185218msgid ":c:macro:`PyObject_GC_NewVar`"
186- msgstr ""
219+ msgstr ":c:macro:`PyObject_GC_NewVar` "
187220
188221#: ../../c-api/allocation.rst:145
189222msgid ""
@@ -195,47 +228,41 @@ msgstr ""
195228"ブジェクトへのポインタを評価する :c:macro:`Py_None` マクロを使わなければなり"
196229"ません。"
197230
198- #: ../../c-api/allocation.rst:152
199231msgid ":ref:`moduleobjects`"
200- msgstr ""
232+ msgstr ":ref:`moduleobjects` "
201233
202234#: ../../c-api/allocation.rst:153
203235msgid "To allocate and create extension modules."
204236msgstr "拡張モジュールのアロケートと生成。"
205237
206- #: ../../c-api/allocation.rst:157
207238msgid "Soft-deprecated aliases"
208- msgstr ""
239+ msgstr "緩やかに非推奨となった別名 "
209240
210- #: ../../c-api/allocation.rst:161
211241msgid ""
212242"These are aliases to existing functions and macros. They exist solely for "
213243"backwards compatibility."
214244msgstr ""
245+ "これらは既存の関数やマクロの別名です。\n"
246+ "後方互換性のためだけに残されています。"
215247
216- #: ../../c-api/allocation.rst:169
217248msgid "Soft-deprecated alias"
218- msgstr ""
249+ msgstr "緩やかに非推奨となった別名 "
219250
220251#: ../../c-api/allocation.rst:170
221252msgid "Function"
222253msgstr "関数"
223254
224- #: ../../c-api/allocation.rst:172
225255msgid ":c:macro:`PyObject_New`"
226- msgstr ""
256+ msgstr ":c:macro:`PyObject_New` "
227257
228- #: ../../c-api/allocation.rst:174
229258msgid ":c:macro:`PyObject_NewVar`"
230- msgstr ""
259+ msgstr ":c:macro:`PyObject_NewVar` "
231260
232- #: ../../c-api/allocation.rst:176
233261msgid ":c:func:`PyObject_Init`"
234- msgstr ""
262+ msgstr ":c:func:`PyObject_Init` "
235263
236- #: ../../c-api/allocation.rst:178
237264msgid ":c:func:`PyObject_InitVar`"
238- msgstr ""
265+ msgstr ":c:func:`PyObject_InitVar` "
239266
240267#: ../../c-api/allocation.rst:180
241268msgid ":c:func:`PyObject_Malloc`"
0 commit comments