Skip to content

Commit 52ecbc1

Browse files
github-actions[bot]mattwang44
authored andcommitted
sync with cpython a8b27305
1 parent 4966bd5 commit 52ecbc1

File tree

6 files changed

+891
-622
lines changed

6 files changed

+891
-622
lines changed

c-api/allocation.po

Lines changed: 89 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ msgid ""
99
msgstr ""
1010
"Project-Id-Version: Python 3.14\n"
1111
"Report-Msgid-Bugs-To: \n"
12-
"POT-Creation-Date: 2025-09-08 15:25+0800\n"
12+
"POT-Creation-Date: 2025-11-09 17:02+0000\n"
1313
"PO-Revision-Date: 2022-10-16 15:35+0800\n"
1414
"Last-Translator: Matt Wang <[email protected]>\n"
1515
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -37,10 +37,10 @@ msgstr ""
3737

3838
#: ../../c-api/allocation.rst:24
3939
msgid ""
40-
"In general, consider this function to be a low-level routine. "
41-
"Use :c:member:`~PyTypeObject.tp_alloc` where possible. For "
42-
"implementing :c:member:`!tp_alloc` for your type, "
43-
"prefer :c:func:`PyType_GenericAlloc` or :c:func:`PyObject_New`."
40+
"In general, consider this function to be a low-level routine. Use :c:member:"
41+
"`~PyTypeObject.tp_alloc` where possible. For implementing :c:member:`!"
42+
"tp_alloc` for your type, prefer :c:func:`PyType_GenericAlloc` or :c:func:"
43+
"`PyObject_New`."
4444
msgstr ""
4545

4646
#: ../../c-api/allocation.rst:31
@@ -66,15 +66,15 @@ msgstr ""
6666
#: ../../c-api/allocation.rst:48
6767
msgid ""
6868
"Allocates a new Python object using the C structure type *TYPE* and the "
69-
"Python type object *typeobj* (``PyTypeObject*``) by "
70-
"calling :c:func:`PyObject_Malloc` to allocate memory and initializing it "
71-
"like :c:func:`PyObject_Init`. The caller will own the only reference to the "
72-
"object (i.e. its reference count will be one)."
69+
"Python type object *typeobj* (``PyTypeObject*``) by calling :c:func:"
70+
"`PyObject_Malloc` to allocate memory and initializing it like :c:func:"
71+
"`PyObject_Init`. The caller will own the only reference to the object (i.e. "
72+
"its reference count will be one)."
7373
msgstr ""
7474
"使用 C 結構型別 *TYPE* 和 Python 型別物件 *typeobj* (``PyTypeObject*``) 分配"
75-
"一個新的 Python 物件。它會呼叫 :c:func:`PyObject_Malloc` 來分配記憶體,"
76-
"並且會像 :c:func:`PyObject_Init` 一樣初始化它。呼叫者會擁有該物件的唯一參照"
77-
"(也就是它的參照計數會是 1)。"
75+
"一個新的 Python 物件。它會呼叫 :c:func:`PyObject_Malloc` 來分配記憶體,並且會"
76+
" :c:func:`PyObject_Init` 一樣初始化它。呼叫者會擁有該物件的唯一參照(也就是"
77+
"它的參照計數會是 1)。"
7878

7979
#: ../../c-api/allocation.rst:54 ../../c-api/allocation.rst:107
8080
msgid ""
@@ -84,30 +84,28 @@ msgstr ""
8484

8585
#: ../../c-api/allocation.rst:57 ../../c-api/allocation.rst:110
8686
msgid ""
87-
"When populating a type's :c:member:`~PyTypeObject.tp_alloc` "
88-
"slot, :c:func:`PyType_GenericAlloc` is preferred over a custom function that "
89-
"simply calls this macro."
87+
"When populating a type's :c:member:`~PyTypeObject.tp_alloc` slot, :c:func:"
88+
"`PyType_GenericAlloc` is preferred over a custom function that simply calls "
89+
"this macro."
9090
msgstr ""
9191

9292
#: ../../c-api/allocation.rst:61
9393
msgid ""
94-
"This macro does not "
95-
"call :c:member:`~PyTypeObject.tp_alloc`, :c:member:`~PyTypeObject.tp_new` "
96-
"(:meth:`~object.__new__`), or :c:member:`~PyTypeObject.tp_init` "
97-
"(:meth:`~object.__init__`)."
94+
"This macro does not call :c:member:`~PyTypeObject.tp_alloc`, :c:member:"
95+
"`~PyTypeObject.tp_new` (:meth:`~object.__new__`), or :c:member:"
96+
"`~PyTypeObject.tp_init` (:meth:`~object.__init__`)."
9897
msgstr ""
99-
"這個巨集不會呼叫 :c:member:`~PyTypeObject.tp_alloc`、:c:member:`~PyTypeObject.tp_new` "
100-
"(:meth:`~object.__new__`)、或 :c:member:`~PyTypeObject.tp_init` "
101-
"(:meth:`~object.__init__`)。"
98+
"這個巨集不會呼叫 :c:member:`~PyTypeObject.tp_alloc`、:c:member:"
99+
"`~PyTypeObject.tp_new` (:meth:`~object.__new__`)、或 :c:member:"
100+
"`~PyTypeObject.tp_init` (:meth:`~object.__init__`)。"
102101

103102
#: ../../c-api/allocation.rst:65
104103
msgid ""
105-
"This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set "
106-
"in :c:member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_New` "
107-
"instead."
104+
"This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set in :c:"
105+
"member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_New` instead."
108106
msgstr ""
109-
"這不能用於有在 :c:member:`~PyTypeObject.tp_flags` 中設定 "
110-
":c:macro:`Py_TPFLAGS_HAVE_GC` 的物件;請改用 :c:macro:`PyObject_GC_New`。"
107+
"這不能用於有在 :c:member:`~PyTypeObject.tp_flags` 中設定 :c:macro:"
108+
"`Py_TPFLAGS_HAVE_GC` 的物件;請改用 :c:macro:`PyObject_GC_New`。"
111109

112110
#: ../../c-api/allocation.rst:68
113111
msgid ""
@@ -124,16 +122,18 @@ msgstr ""
124122
#: ../../c-api/allocation.rst:78 ../../c-api/allocation.rst:128
125123
msgid ""
126124
"This macro does not construct a fully initialized object of the given type; "
127-
"it merely allocates memory and prepares it for further initialization "
128-
"by :c:member:`~PyTypeObject.tp_init`. To construct a fully initialized "
129-
"object, call *typeobj* instead. For example::"
125+
"it merely allocates memory and prepares it for further initialization by :c:"
126+
"member:`~PyTypeObject.tp_init`. To construct a fully initialized object, "
127+
"call *typeobj* instead. For example::"
130128
msgstr ""
131129

132130
#: ../../c-api/allocation.rst:83
133131
msgid "PyObject *foo = PyObject_CallNoArgs((PyObject *)&PyFoo_Type);"
134132
msgstr "PyObject *foo = PyObject_CallNoArgs((PyObject *)&PyFoo_Type);"
135133

136134
#: ../../c-api/allocation.rst:87 ../../c-api/allocation.rst:137
135+
#: ../../c-api/allocation.rst:182 ../../c-api/allocation.rst:184
136+
#: ../../c-api/allocation.rst:186
137137
msgid ":c:func:`PyObject_Free`"
138138
msgstr ":c:func:`PyObject_Free`"
139139

@@ -156,8 +156,8 @@ msgstr "和 :c:macro:`PyObject_New` 類似,但有以下差異:"
156156
#: ../../c-api/allocation.rst:97
157157
msgid ""
158158
"It allocates enough memory for the *TYPE* structure plus *size* "
159-
"(``Py_ssize_t``) fields of the size given by "
160-
"the :c:member:`~PyTypeObject.tp_itemsize` field of *typeobj*."
159+
"(``Py_ssize_t``) fields of the size given by the :c:member:`~PyTypeObject."
160+
"tp_itemsize` field of *typeobj*."
161161
msgstr ""
162162

163163
#: ../../c-api/allocation.rst:100
@@ -174,12 +174,11 @@ msgstr ""
174174

175175
#: ../../c-api/allocation.rst:114
176176
msgid ""
177-
"This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set "
178-
"in :c:member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_NewVar` "
179-
"instead."
177+
"This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set in :c:"
178+
"member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_NewVar` instead."
180179
msgstr ""
181-
"這不能用於有在 :c:member:`~PyTypeObject.tp_flags` 中設定 "
182-
":c:macro:`Py_TPFLAGS_HAVE_GC` 的物件;請改用 :c:macro:`PyObject_GC_NewVar`。"
180+
"這不能用於有在 :c:member:`~PyTypeObject.tp_flags` 中設定 :c:macro:"
181+
"`Py_TPFLAGS_HAVE_GC` 的物件;請改用 :c:macro:`PyObject_GC_NewVar`。"
183182

184183
#: ../../c-api/allocation.rst:118
185184
msgid ""
@@ -198,10 +197,6 @@ msgid ":c:macro:`PyObject_GC_NewVar`"
198197
msgstr ":c:macro:`PyObject_GC_NewVar`"
199198

200199
#: ../../c-api/allocation.rst:145
201-
msgid "Same as :c:func:`PyObject_Free`."
202-
msgstr "和 :c:func:`PyObject_Free` 相同。"
203-
204-
#: ../../c-api/allocation.rst:149
205200
msgid ""
206201
"Object which is visible in Python as ``None``. This should only be accessed "
207202
"using the :c:macro:`Py_None` macro, which evaluates to a pointer to this "
@@ -210,10 +205,61 @@ msgstr ""
210205
"這個物件像是 Python 中的 ``None``。它只應該透過 :c:macro:`Py_None` 巨集來存"
211206
"取,該巨集的拿到指向該物件的指標。"
212207

213-
#: ../../c-api/allocation.rst:156
208+
#: ../../c-api/allocation.rst:152
214209
msgid ":ref:`moduleobjects`"
215210
msgstr ":ref:`moduleobjects`"
216211

217-
#: ../../c-api/allocation.rst:157
212+
#: ../../c-api/allocation.rst:153
218213
msgid "To allocate and create extension modules."
219214
msgstr "分配記憶體和建立擴充模組。"
215+
216+
#: ../../c-api/allocation.rst:157
217+
msgid "Deprecated aliases"
218+
msgstr ""
219+
220+
#: ../../c-api/allocation.rst:159
221+
msgid ""
222+
"These are :term:`soft deprecated` aliases to existing functions and macros. "
223+
"They exist solely for backwards compatibility."
224+
msgstr ""
225+
226+
#: ../../c-api/allocation.rst:167
227+
msgid "Deprecated alias"
228+
msgstr ""
229+
230+
#: ../../c-api/allocation.rst:168
231+
msgid "Function"
232+
msgstr ""
233+
234+
#: ../../c-api/allocation.rst:170
235+
#, fuzzy
236+
msgid ":c:macro:`PyObject_New`"
237+
msgstr ":c:macro:`PyObject_GC_New`"
238+
239+
#: ../../c-api/allocation.rst:172
240+
#, fuzzy
241+
msgid ":c:macro:`PyObject_NewVar`"
242+
msgstr ":c:macro:`PyObject_GC_NewVar`"
243+
244+
#: ../../c-api/allocation.rst:174
245+
#, fuzzy
246+
msgid ":c:func:`PyObject_Init`"
247+
msgstr ":c:func:`PyObject_Free`"
248+
249+
#: ../../c-api/allocation.rst:176
250+
#, fuzzy
251+
msgid ":c:func:`PyObject_InitVar`"
252+
msgstr ":c:func:`PyObject_Free`"
253+
254+
#: ../../c-api/allocation.rst:178
255+
#, fuzzy
256+
msgid ":c:func:`PyObject_Malloc`"
257+
msgstr ":c:func:`PyObject_Free`"
258+
259+
#: ../../c-api/allocation.rst:180
260+
#, fuzzy
261+
msgid ":c:func:`PyObject_Realloc`"
262+
msgstr ":c:func:`PyObject_Free`"
263+
264+
#~ msgid "Same as :c:func:`PyObject_Free`."
265+
#~ msgstr "和 :c:func:`PyObject_Free` 相同。"

c-api/concrete.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.14\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2023-05-09 00:15+0000\n"
10+
"POT-Creation-Date: 2025-11-09 17:02+0000\n"
1111
"PO-Revision-Date: 2022-11-13 20:37+0800\n"
1212
"Last-Translator: Matt Wang <[email protected]>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -86,6 +86,10 @@ msgstr "函式物件"
8686
msgid "Other Objects"
8787
msgstr "其他物件"
8888

89+
#: ../../c-api/concrete.rst:122
90+
msgid "C API for extension modules"
91+
msgstr ""
92+
8993
#: ../../c-api/concrete.rst:43 ../../c-api/concrete.rst:58
9094
#: ../../c-api/concrete.rst:80
9195
msgid "object"

0 commit comments

Comments
 (0)