Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6cce1dd

Browse files
committed
[po] auto sync bot
1 parent 4e67aeb commit 6cce1dd

1 file changed

Lines changed: 21 additions & 11 deletions

File tree

c-api/intro.po

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ msgid ""
5353
"applications since its early existence, the process of embedding Python is "
5454
"less straightforward than writing an extension."
5555
msgstr ""
56-
"编写扩展模块的过程相对来说更易于理解,可以以“菜谱”的形式分步骤介绍。使用某些工具可在一定程度上自动化这一过程。虽然人们在其他应用中嵌入 Python "
57-
"的做法早已有之,但嵌入 Python 的过程没有编写扩展模块那样方便直观。"
56+
"编写扩展模块的过程相对来说更易于理解,可以通过“菜谱”的形式分步骤介绍。使用某些工具可在一定程度上自动化这一过程。虽然人们在其他应用中嵌入 Python"
57+
" 的做法早已有之,但嵌入 Python 的过程没有编写扩展模块那样方便直观。"
5858

5959
#: ../../c-api/intro.rst:26
6060
msgid ""
@@ -174,7 +174,7 @@ msgstr ""
174174

175175
#: ../../c-api/intro.rst:95
176176
msgid "Useful macros"
177-
msgstr ""
177+
msgstr "有用的宏"
178178

179179
#: ../../c-api/intro.rst:97
180180
msgid ""
@@ -183,6 +183,8 @@ msgid ""
183183
"Others of a more general utility are defined here. This is not necessarily "
184184
"a complete listing."
185185
msgstr ""
186+
"Python 头文件中定义了一些有用的宏。许多是在靠近它们被使用的地方定义的(例如 "
187+
":c:macro:`Py_RETURN_NONE`)。其他更为通用的则定义在这里。这里所显示的并不是一个完整的列表。"
186188

187189
#: ../../c-api/intro.rst:104
188190
msgid ""
@@ -191,46 +193,54 @@ msgid ""
191193
" possible values are covered in ``case`` statements. Use this in places "
192194
"where you might be tempted to put an ``assert(0)`` or ``abort()`` call."
193195
msgstr ""
196+
"这个可以在你有一个不打算被触及的代码路径时使用。例如,当一个 ``switch`` 语句中所有可能的值都已被 ``case`` 子句覆盖了,就可将其用在"
197+
" ``default:`` 子句中。当你非常想在某个位置放一个 ``assert(0)`` 或 ``abort()`` 调用时也可以用这个。"
194198

195199
#: ../../c-api/intro.rst:113
196200
msgid "Return the absolute value of ``x``."
197-
msgstr ""
201+
msgstr "返回 ``x`` 的绝对值。"
198202

199203
#: ../../c-api/intro.rst:119
200204
msgid "Return the minimum value between ``x`` and ``y``."
201-
msgstr ""
205+
msgstr "返回 ``x`` 和 ``y`` 当中的最小值。"
202206

203207
#: ../../c-api/intro.rst:125
204208
msgid "Return the maximum value between ``x`` and ``y``."
205-
msgstr ""
209+
msgstr "返回 ``x`` 和 ``y`` 当中的最大值。"
206210

207211
#: ../../c-api/intro.rst:131
208212
msgid ""
209213
"Convert ``x`` to a C string. E.g. ``Py_STRINGIFY(123)`` returns "
210214
"``\"123\"``."
211-
msgstr ""
215+
msgstr "将 ``x`` 转换为 C 字符串。例如 ``Py_STRINGIFY(123)`` 返回 ``\"123\"``。"
212216

213217
#: ../../c-api/intro.rst:138
214218
msgid "Return the size of a structure (``type``) ``member`` in bytes."
215-
msgstr ""
219+
msgstr "返回结构 (``type``) ``member`` 的大小,以字节表示。"
216220

217221
#: ../../c-api/intro.rst:144
218222
msgid ""
219223
"Argument must be a character or an integer in the range [-128, 127] or [0, "
220224
"255]. This macro returns ``c`` cast to an ``unsigned char``."
221225
msgstr ""
226+
"参数必须为 [-128, 127] 或 [0, 255] 范围内的字符或整数类型。这个宏将 ``c`` 强制转换为 ``unsigned char`` "
227+
"返回。"
222228

223229
#: ../../c-api/intro.rst:149
224230
msgid ""
225231
"Like ``getenv(s)``, but returns *NULL* if :option:`-E` was passed on the "
226232
"command line (i.e. if ``Py_IgnoreEnvironmentFlag`` is set)."
227233
msgstr ""
234+
"类似 ``getenv(s)``,但是会在通过命令行传入 :option:`-E` 时返回 *NULL*(即设置了 "
235+
"``Py_IgnoreEnvironmentFlag``)。"
228236

229237
#: ../../c-api/intro.rst:154
230238
msgid ""
231239
"Use this for unused arguments in a function definition to silence compiler "
232240
"warnings, e.g. ``PyObject* func(PyObject *Py_UNUSED(ignored))``."
233241
msgstr ""
242+
"这个可用于函数定义中未使用的参数以消除编译器警告,例如 ``PyObject* func(PyObject "
243+
"*Py_UNUSED(ignored))``。"
234244

235245
#: ../../c-api/intro.rst:163
236246
msgid "Objects, Types and Reference Counts"
@@ -267,9 +277,9 @@ msgid ""
267277
"``PyList_Check(a)`` is true if (and only if) the object pointed to by *a* is"
268278
" a Python list."
269279
msgstr ""
270-
"所有Python对象(甚至Python整数)都有一个 :dfn:`type` 和一个 :dfn:`reference "
271-
"count`。对象的类型确定它是什么类型的对象(例如,整数,列表或用户定义的函数;还有更多,如 :ref:`types` "
272-
"中所述)。对于每个众所周知的类型,都有一个宏来检查对象是否属于该类型;例如,如果(且仅当) *a* 指向的对象是Python列表,则 "
280+
"所有 Python 对象(甚至 Python 整数)都有一个 :dfn:`type` 和一个 :dfn:`reference "
281+
"count`。对象的类型确定它是什么类型的对象(例如整数、列表或用户定义函数;还有更多,如 :ref:`types` "
282+
"中所述)。对于每个众所周知的类型,都有一个宏来检查对象是否属于该类型;例如,(且仅当) *a* 所指的对象是 Python 列表时 "
273283
"``PyList_Check(a)`` 为真。"
274284

275285
#: ../../c-api/intro.rst:189

0 commit comments

Comments
 (0)