7
7
# Fw[a]rd <howard.main@outlook.com>, 2021
8
8
# ppcfish <ppcfish@gmail.com>, 2023
9
9
# Freesand Leo <yuqinju@163.com>, 2025
10
+ # 汇民 王 <whuim@qq.com>, 2025
10
11
#
11
12
#, fuzzy
12
13
msgid ""
@@ -15,7 +16,7 @@ msgstr ""
15
16
"Report-Msgid-Bugs-To : \n "
16
17
"POT-Creation-Date : 2025-07-11 14:21+0000\n "
17
18
"PO-Revision-Date : 2021-06-28 00:50+0000\n "
18
- "Last-Translator : Freesand Leo <yuqinju@163 .com>, 2025\n "
19
+ "Last-Translator : 汇民 王 <whuim@qq .com>, 2025\n "
19
20
"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
20
21
"MIME-Version : 1.0\n "
21
22
"Content-Type : text/plain; charset=UTF-8\n "
@@ -61,55 +62,63 @@ msgid ""
61
62
"declared to be a :c:type:`PyObject`, but every pointer to a Python object "
62
63
"can be cast to a :c:expr:`PyObject*`."
63
64
msgstr ""
65
+ "所有对象类型都是此类型的扩展。这是一个包含Python需要将对象指针视为对象所需信息的类型。在正常的“发布”构建版本中,它仅包含对象的引用计数和指向相应类型对象的指针。虽然没有任何内容被显式声明为"
66
+ " :c:type:`PyObject` 类型,但所有指向Python对象的指针都可以被强制转换为 :c:expr:`PyObject*` 类型。"
64
67
65
68
#: ../../c-api/structures.rst:33
66
69
msgid ""
67
70
"The members must not be accessed directly; instead use macros such as "
68
71
":c:macro:`Py_REFCNT` and :c:macro:`Py_TYPE`."
69
- msgstr ""
72
+ msgstr "成员不得直接访问;而应使用诸如 :c:macro:`Py_REFCNT` 和 :c:macro:`Py_TYPE` 之类的宏。 "
70
73
71
74
#: ../../c-api/structures.rst:38
72
75
msgid ""
73
76
"The object's reference count, as returned by :c:macro:`Py_REFCNT`. Do not "
74
77
"use this field directly; instead use functions and macros such as "
75
78
":c:macro:`!Py_REFCNT`, :c:func:`Py_INCREF` and :c:func:`Py_DecRef`."
76
79
msgstr ""
80
+ "对象的引用计数,由 :c:macro:`Py_REFCNT` 返回。不要直接使用此字段;而应使用函数和宏,如 "
81
+ ":c:macro:`!Py_REFCNT`,:c:func:`Py_INCREF` 和 :c:func:`Py_DecRef`。"
77
82
78
83
#: ../../c-api/structures.rst:42
79
84
msgid ""
80
85
"The field type may be different from ``Py_ssize_t``, depending on build "
81
86
"configuration and platform."
82
- msgstr ""
87
+ msgstr "字段类型可能不同于 ``Py_ssize_t``,具体取决于构建配置和平台。 "
83
88
84
89
#: ../../c-api/structures.rst:47
85
90
msgid ""
86
91
"The object's type. Do not use this field directly; use :c:macro:`Py_TYPE` "
87
92
"and :c:func:`Py_SET_TYPE` instead."
88
- msgstr ""
93
+ msgstr "对象的类型。不要直接使用此字段;而应使用 :c:macro:`Py_TYPE` 和 :c:func:`Py_SET_TYPE`。 "
89
94
90
95
#: ../../c-api/structures.rst:54
91
96
msgid ""
92
97
"An extension of :c:type:`PyObject` that adds the "
93
98
":c:member:`~PyVarObject.ob_size` field. This is intended for objects that "
94
99
"have some notion of *length*."
95
100
msgstr ""
101
+ ":c:type:`PyObject` 的扩展,添加了 :c:member:`~PyVarObject.ob_size` 字段。这适用于具有某种 *长度*"
102
+ " 概念的对象。"
96
103
97
104
#: ../../c-api/structures.rst:58
98
105
msgid ""
99
106
"As with :c:type:`!PyObject`, the members must not be accessed directly; "
100
107
"instead use macros such as :c:macro:`Py_SIZE`, :c:macro:`Py_REFCNT` and "
101
108
":c:macro:`Py_TYPE`."
102
109
msgstr ""
110
+ "与 :c:type:`!PyObject` 一样,成员不得直接访问;而应使用诸如 "
111
+ ":c:macro:`Py_SIZE`,:c:macro:`Py_REFCNT` 和 :c:macro:`Py_TYPE` 之类的宏。"
103
112
104
113
#: ../../c-api/structures.rst:64
105
114
msgid ""
106
115
"A size field, whose contents should be considered an object's internal "
107
116
"implementation detail."
108
- msgstr ""
117
+ msgstr "一个大小字段,其内容应被视为对象的内部实现细节。 "
109
118
110
119
#: ../../c-api/structures.rst:67
111
120
msgid "Do not use this field directly; use :c:macro:`Py_SIZE` instead."
112
- msgstr ""
121
+ msgstr "不要直接使用此字段;而应使用 :c:macro:`Py_SIZE`。 "
113
122
114
123
#: ../../c-api/structures.rst:69
115
124
msgid ""
@@ -118,18 +127,22 @@ msgid ""
118
127
"arbitrary values can be stored in :c:member:`!ob_size` using "
119
128
":c:macro:`Py_SET_SIZE`."
120
129
msgstr ""
130
+ "对象创建函数,如 :c:func:`PyObject_NewVar`,通常会将此字段设置为请求的大小(条目数)。创建后,可以使用 "
131
+ ":c:macro:`Py_SET_SIZE` 在 :c:member:`!ob_size` 中存储任意值。"
121
132
122
133
#: ../../c-api/structures.rst:74
123
134
msgid ""
124
135
"To get an object's publicly exposed length, as returned by the Python "
125
136
"function :py:func:`len`, use :c:func:`PyObject_Length` instead."
126
137
msgstr ""
138
+ "若需获取对象公开暴露的长度(即Python内置函数 :py:func:`len` 所返回的值),应使用 "
139
+ ":c:func:`PyObject_Length` 接口。"
127
140
128
141
#: ../../c-api/structures.rst:81
129
142
msgid ""
130
143
"This is a macro used when declaring new types which represent objects "
131
144
"without a varying length. The PyObject_HEAD macro expands to::"
132
- msgstr "这是一个在声明代表无可变长度对象的新类型时所使用的宏。 PyObject_HEAD 宏被扩展为:: "
145
+ msgstr "这是一个在声明新类型时使用的宏,用于表示不包含可变长度成员的对象。PyObject_HEAD宏展开后为: "
133
146
134
147
#: ../../c-api/structures.rst:84
135
148
msgid "PyObject ob_base;"
@@ -191,6 +204,8 @@ msgid ""
191
204
"The returned reference is :term:`borrowed <borrowed reference>` from *o*. Do"
192
205
" not release it with :c:func:`Py_DECREF` or similar."
193
206
msgstr ""
207
+ "返回的引用是从 *o* :term:`借用的 <borrowed reference>`。不要使用 :c:func:`Py_DECREF` "
208
+ "或类似方法释放它。"
194
209
195
210
#: ../../c-api/structures.rst:143
196
211
msgid ""
@@ -208,30 +223,34 @@ msgstr "如果对象 *o* 的类型为 *type* 则返回非零值。 否则返回
208
223
msgid ""
209
224
"Set the type of object *o* to *type*, without any checking or reference "
210
225
"counting."
211
- msgstr ""
226
+ msgstr "将对象 *o* 的类型设置为 *type*,不进行任何检查或引用计数。 "
212
227
213
228
#: ../../c-api/structures.rst:161
214
229
msgid ""
215
230
"This is a very low-level operation. Consider instead setting the Python "
216
231
"attribute :attr:`~object.__class__` using :c:func:`PyObject_SetAttrString` "
217
232
"or similar."
218
233
msgstr ""
234
+ "这是一个非常低级的操作。建议改为使用 :c:func:`PyObject_SetAttrString` 或类似方法设置 Python 属性 "
235
+ ":attr:`~object.__class__`。"
219
236
220
237
#: ../../c-api/structures.rst:165
221
238
msgid ""
222
239
"Note that assigning an incompatible type can lead to undefined behavior."
223
- msgstr ""
240
+ msgstr "请注意,分配不兼容的类型可能会导致未定义行为。 "
224
241
225
242
#: ../../c-api/structures.rst:167
226
243
msgid ""
227
244
"If *type* is a :ref:`heap type <heap-types>`, the caller must create a new "
228
245
"reference to it. Similarly, if the old type of *o* is a heap type, the "
229
246
"caller must release a reference to that type."
230
247
msgstr ""
248
+ "如果 *type* 是一个 :ref:`堆类型 <heap-types>`,调用者必须为其创建一个新的引用。同样地,如果 *o* "
249
+ "的旧类型是堆类型,调用者必须释放对该类型的引用。"
231
250
232
251
#: ../../c-api/structures.rst:177
233
252
msgid "Get the :c:member:`~PyVarObject.ob_size` field of *o*."
234
- msgstr ""
253
+ msgstr "获取 *o* 的 :c:member:`~PyVarObject.ob_size` 字段。 "
235
254
236
255
#: ../../c-api/structures.rst:179
237
256
msgid ""
@@ -242,7 +261,7 @@ msgstr ""
242
261
243
262
#: ../../c-api/structures.rst:186
244
263
msgid "Set the :c:member:`~PyVarObject.ob_size` field of *o* to *size*."
245
- msgstr ""
264
+ msgstr "将 *o* 的 :c:member:`~PyVarObject.ob_size` 字段设置为 *size*。 "
246
265
247
266
#: ../../c-api/structures.rst:193
248
267
msgid ""
0 commit comments