Skip to content

Commit 392c6d5

Browse files
github-actions[bot]mattwang44
authored andcommitted
sync with cpython aa2ecef2
1 parent 1e9aa1f commit 392c6d5

15 files changed

+1999
-1903
lines changed

c-api/allocation.po

+11-9
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ msgid ""
1010
msgstr ""
1111
"Project-Id-Version: Python 3.12\n"
1212
"Report-Msgid-Bugs-To: \n"
13-
"POT-Creation-Date: 2023-07-29 00:03+0000\n"
13+
"POT-Creation-Date: 2023-08-09 00:03+0000\n"
1414
"PO-Revision-Date: 2022-10-16 15:35+0800\n"
1515
"Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
1616
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -47,19 +47,21 @@ msgstr ""
4747
"度資訊。"
4848

4949
#: ../../c-api/allocation.rst:32
50+
#, fuzzy
5051
msgid ""
5152
"Allocate a new Python object using the C structure type *TYPE* and the "
5253
"Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the "
53-
"Python object header are not initialized; the object's reference count will "
54-
"be one. The size of the memory allocation is determined from the :c:member:"
55-
"`~PyTypeObject.tp_basicsize` field of the type object."
54+
"Python object header are not initialized. The caller will own the only "
55+
"reference to the object (i.e. its reference count will be one). The size of "
56+
"the memory allocation is determined from the :c:member:`~PyTypeObject."
57+
"tp_basicsize` field of the type object."
5658
msgstr ""
5759
"使用 C 結構型別 *TYPE* 和 Python 型別物件 *typeobj* (``PyTypeObject*``) 分配"
5860
"一個新的 Python 物件。未在該 Python 物件標頭 (header) 中定義的欄位不會被初始"
5961
"化;物件的參照計數將為一。記憶體分配大小由 type 物件的 :c:member:"
6062
"`~PyTypeObject.tp_basicsize` 欄位來指定。"
6163

62-
#: ../../c-api/allocation.rst:42
64+
#: ../../c-api/allocation.rst:43
6365
msgid ""
6466
"Allocate a new Python object using the C structure type *TYPE* and the "
6567
"Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the "
@@ -78,7 +80,7 @@ msgstr ""
7880
"於實現如 tuple 這種能夠在建立期間決定自己大小的物件是很實用的。將欄位的陣列嵌"
7981
"入到相同的記憶體分配中可以減少記憶體分配的次數,這提高了記憶體管理的效率。"
8082

81-
#: ../../c-api/allocation.rst:56
83+
#: ../../c-api/allocation.rst:57
8284
msgid ""
8385
"Releases memory allocated to an object using :c:macro:`PyObject_New` or :c:"
8486
"macro:`PyObject_NewVar`. This is normally called from the :c:member:"
@@ -91,7 +93,7 @@ msgstr ""
9193
"handler 中呼叫。呼叫這個函式以後,物件的各欄位都不可以被存取,因為原本分配的"
9294
"記憶體已不再是一個有效的 Python 物件。"
9395

94-
#: ../../c-api/allocation.rst:65
96+
#: ../../c-api/allocation.rst:66
9597
msgid ""
9698
"Object which is visible in Python as ``None``. This should only be accessed "
9799
"using the :c:macro:`Py_None` macro, which evaluates to a pointer to this "
@@ -100,10 +102,10 @@ msgstr ""
100102
"這個物件像是 Python 中的 ``None``。它只應該透過 :c:macro:`Py_None` 巨集來存"
101103
"取,該巨集的拿到指向該物件的指標。"
102104

103-
#: ../../c-api/allocation.rst:72
105+
#: ../../c-api/allocation.rst:73
104106
msgid ":c:func:`PyModule_Create`"
105107
msgstr ":c:func:`PyModule_Create`"
106108

107-
#: ../../c-api/allocation.rst:73
109+
#: ../../c-api/allocation.rst:74
108110
msgid "To allocate and create extension modules."
109111
msgstr "分配記憶體和建立擴充模組。"

0 commit comments

Comments
 (0)