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

Skip to content

Commit 5c1ac23

Browse files
[po] auto sync
1 parent 22eecf7 commit 5c1ac23

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

extending/extending.po

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1304,13 +1304,17 @@ msgid ""
13041304
"that may be ``NULL`` is received, for example, from :c:func:`malloc` or from"
13051305
" a function that may raise an exception."
13061306
msgstr ""
1307+
"更好的做法是仅在“源头”上检测 ``NULL``,即在接收到一个可能为 ``NULL`` 的指针,例如来自 :c:func:`malloc` "
1308+
"或是一个可能引发异常的函数的时候。"
13071309

13081310
#: ../../extending/extending.rst:1106
13091311
msgid ""
13101312
"The macros :c:func:`Py_INCREF` and :c:func:`Py_DECREF` do not check for "
13111313
"``NULL`` pointers --- however, their variants :c:func:`Py_XINCREF` and "
13121314
":c:func:`Py_XDECREF` do."
13131315
msgstr ""
1316+
":c:func:`Py_INCREF` 和 :c:func:`Py_DECREF` 等宏不会检测 ``NULL`` 指针 --- 但是,它们的变种 "
1317+
":c:func:`Py_XINCREF` 和 :c:func:`Py_XDECREF` 则会检测。"
13141318

13151319
#: ../../extending/extending.rst:1110
13161320
msgid ""
@@ -1320,19 +1324,23 @@ msgid ""
13201324
"expected types, and this would generate redundant tests. There are no "
13211325
"variants with ``NULL`` checking."
13221326
msgstr ""
1327+
"用于检测特定对象类型的宏 (``Pytype_Check()``) 不会检测 ``NULL`` 指针 --- "
1328+
"同样地,有大量代码会连续调用这些宏来测试一个对象是否为几种不同预期类型之一,这将会生成冗余的测试。 不存在带有 ``NULL`` 检测的变体。"
13231329

13241330
#: ../../extending/extending.rst:1116
13251331
msgid ""
13261332
"The C function calling mechanism guarantees that the argument list passed to"
13271333
" C functions (``args`` in the examples) is never ``NULL`` --- in fact it "
13281334
"guarantees that it is always a tuple [#]_."
13291335
msgstr ""
1336+
"C 函数调用机制会保证传给 C 函数的参数列表 (本示例中为 ``args``) 绝不会为 ``NULL`` --- 实际上它会保证其总是为一个元组 "
1337+
"[#]_。"
13301338

13311339
#: ../../extending/extending.rst:1120
13321340
msgid ""
13331341
"It is a severe error to ever let a ``NULL`` pointer \"escape\" to the Python"
13341342
" user."
1335-
msgstr ""
1343+
msgstr "任何时候将 ``NULL`` 指针“泄露”给 Python 用户都会是个严重的错误。"
13361344

13371345
#: ../../extending/extending.rst:1131
13381346
msgid "Writing Extensions in C++"
@@ -1439,6 +1447,9 @@ msgid ""
14391447
"of runtime type-safety; there is no feasible way to tell one unnamed Capsule"
14401448
" from another."
14411449
msgstr ""
1450+
"无论你选择哪个方法,正确地为你的 Capsule 命名都很重要。 函数 :c:func:`PyCapsule_New` 接受一个名称形参 "
1451+
"(:c:type:`const char \\*`);允许你传入一个 ``NULL`` 作为名称,但我们强烈建议你指定一个名称。 正确地命名的 "
1452+
"Capsule 提供了一定程序的运行时类型安全;没有可行的方式能区分两个未命名的 Capsule。"
14421453

14431454
#: ../../extending/extending.rst:1200
14441455
msgid ""

library/sys.po

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,6 +1102,7 @@ msgid ""
11021102
" one higher than you might expect, because it includes the (temporary) "
11031103
"reference as an argument to :func:`getrefcount`."
11041104
msgstr ""
1105+
"返回 *object* 的引用计数。返回的计数通常比预期的多一,因为它包括了作为 :func:`getrefcount` 参数的这一次(临时)引用。"
11051106

11061107
#: ../../library/sys.rst:657
11071108
msgid ""
@@ -1110,19 +1111,21 @@ msgid ""
11101111
"causing an overflow of the C stack and crashing Python. It can be set by "
11111112
":func:`setrecursionlimit`."
11121113
msgstr ""
1114+
"返回当前的递归限制值,即 Python 解释器堆栈的最大深度。此限制可防止无限递归导致的 C 堆栈溢出和 Python 崩溃。该值可以通过 "
1115+
":func:`setrecursionlimit` 设置。"
11131116

11141117
#: ../../library/sys.rst:665
11151118
msgid ""
11161119
"Return the size of an object in bytes. The object can be any type of object."
11171120
" All built-in objects will return correct results, but this does not have to"
11181121
" hold true for third-party extensions as it is implementation specific."
1119-
msgstr ""
1122+
msgstr "返回对象的大小(以字节为单位)。该对象可以是任何类型。所有内建对象返回的结果都是正确的,但对于第三方扩展不一定正确,因为这与具体实现有关。"
11201123

11211124
#: ../../library/sys.rst:670
11221125
msgid ""
11231126
"Only the memory consumption directly attributed to the object is accounted "
11241127
"for, not the memory consumption of objects it refers to."
1125-
msgstr ""
1128+
msgstr "只计算直接分配给对象的内存消耗,不计算它所引用的对象的内存消耗。"
11261129

11271130
#: ../../library/sys.rst:673
11281131
msgid ""

0 commit comments

Comments
 (0)