Skip to content

Commit c317984

Browse files
[po] auto sync
1 parent 2c7e956 commit c317984

File tree

18 files changed

+192
-118
lines changed

18 files changed

+192
-118
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "89.57%", "updated_at": "2023-08-12T15:33:13Z"}
1+
{"translation": "89.63%", "updated_at": "2023-08-19T09:32:13Z"}

c-api/arg.po

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.10\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2023-08-11 15:16+0000\n"
14+
"POT-Creation-Date: 2023-08-18 15:12+0000\n"
1515
"PO-Revision-Date: 2022-11-05 17:21+0000\n"
1616
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2023\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -716,6 +716,8 @@ msgid ""
716716
":term:`strong reference` to the object is not created (i.e. its reference "
717717
"count is not increased). The pointer stored is not ``NULL``."
718718
msgstr ""
719+
"将 Python 对象(未经任何转换)存储到一个 C 对象指针中。 这样 C 程序就能接收到实际传递的对象。 对象的新 :term:`strong "
720+
"reference` 不会被创建(即其引用计数不会增加)。 存储的指针将不为 ``NULL``。"
719721

720722
#: ../../c-api/arg.rst:343
721723
msgid "``O!`` (object) [*typeobject*, PyObject \\*]"
@@ -880,7 +882,7 @@ msgid ""
880882
"Note that any Python object references which are provided to the caller are "
881883
"*borrowed* references; do not release them (i.e. do not decrement their "
882884
"reference count)!"
883-
msgstr ""
885+
msgstr "请注意提供给调用者的任何 Python 对象引用都是 *借入* 引用;不要释放它们(即不要递减它们的引用计数)!"
884886

885887
#: ../../c-api/arg.rst:423
886888
msgid ""
@@ -1241,6 +1243,10 @@ msgid ""
12411243
":c:func:`Py_BuildValue` will return ``NULL`` but won't raise an exception. "
12421244
"If no exception has been raised yet, :exc:`SystemError` is set."
12431245
msgstr ""
1246+
"原封不动地传递一个 Python 对象,但为其创建一个新的 :term:`strong reference` (即其引用计数加一)。 "
1247+
"如果传入的对象是一个 ``NULL`` 指针,则会假定这是因为产生该参数的调用发现了错误并设置了异常。 "
1248+
"因此,:c:func:`Py_BuildValue` 将返回 ``NULL`` 但不会引发异常。 如果尚未引发异常,则会设置 "
1249+
":exc:`SystemError`。"
12441250

12451251
#: ../../c-api/arg.rst:666
12461252
msgid "``S`` (object) [PyObject \\*]"
@@ -1260,6 +1266,8 @@ msgid ""
12601266
"Useful when the object is created by a call to an object constructor in the "
12611267
"argument list."
12621268
msgstr ""
1269+
"与 ``O`` 相同,但它不会创建新的 :term:`strong reference`。 "
1270+
"如果对象是通过调用参数列表中的对象构造器来创建的则该方法将很有用处。"
12631271

12641272
#: ../../c-api/arg.rst:674
12651273
msgid ""

c-api/buffer.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.10\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2023-08-11 15:16+0000\n"
14+
"POT-Creation-Date: 2023-08-18 15:12+0000\n"
1515
"PO-Revision-Date: 2022-11-05 17:21+0000\n"
1616
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2023\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -181,6 +181,8 @@ msgid ""
181181
"set to ``NULL`` by :c:func:`PyBuffer_Release`. The field is the equivalent "
182182
"of the return value of any standard C-API function."
183183
msgstr ""
184+
"对导出对象的新引用。 该引用由消费方拥有,并由 :c:func:`PyBuffer_Release` 自动释放(即引用计数递减)并设置为 "
185+
"``NULL``。 该字段相当于任何标准 C-API 函数的返回值。"
184186

185187
#: ../../c-api/buffer.rst:111
186188
msgid ""
@@ -719,6 +721,8 @@ msgid ""
719721
"``view->obj``. This function MUST be called when the buffer is no longer "
720722
"being used, otherwise reference leaks may occur."
721723
msgstr ""
724+
"释放缓冲区 *view* 并释放对视图的支持对象 ``view->obj`` 的 :term:`strong reference` (即递减引用计数)。"
725+
" 该函数必须在缓冲区不再使用时调用,否则可能会发生引用泄漏。"
722726

723727
#: ../../c-api/buffer.rst:464
724728
msgid ""

c-api/bytes.po

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
66
# Translators:
7-
# Rafael Fontenelle <rffontenelle@gmail.com>, 2022
7+
# Rafael Fontenelle <rffontenelle@gmail.com>, 2023
88
#
99
#, fuzzy
1010
msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.10\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2023-08-11 15:16+0000\n"
14+
"POT-Creation-Date: 2023-08-18 15:12+0000\n"
1515
"PO-Revision-Date: 2022-11-05 17:21+0000\n"
16-
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2022\n"
16+
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2023\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1818
"MIME-Version: 1.0\n"
1919
"Content-Type: text/plain; charset=UTF-8\n"
@@ -340,6 +340,8 @@ msgid ""
340340
" appended to *bytes*. This version releases the :term:`strong reference` to"
341341
" *newpart* (i.e. decrements its reference count)."
342342
msgstr ""
343+
"在 *\\*bytes* 中创建一个新的字节串对象,其中包含添加到 *bytes* 的 *newpart* 的内容。 此版本将释放对 *newpart*"
344+
" 的 :term:`strong reference` (即递减其引用计数)。"
343345

344346
#: ../../c-api/bytes.rst:196
345347
msgid ""

c-api/exceptions.po

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.10\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2023-08-11 15:16+0000\n"
14+
"POT-Creation-Date: 2023-08-18 15:12+0000\n"
1515
"PO-Revision-Date: 2022-11-05 17:21+0000\n"
1616
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2023\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -164,6 +164,9 @@ msgid ""
164164
" reference` to it (e.g. with :c:func:`Py_INCREF`). The second argument is an"
165165
" error message; it is decoded from ``'utf-8'``."
166166
msgstr ""
167+
"这是设置错误指示器最常用的方式。 第一个参数指定异常类型;它通常为某个标准异常,例如 :c:data:`PyExc_RuntimeError`。 "
168+
"你无需为其创建新的 :term:`strong reference` (例如使用 :c:func:`Py_INCREF`)。 "
169+
"第二个参数是一条错误消息;它是用 ``'utf-8'`` 解码的。"
167170

168171
#: ../../c-api/exceptions.rst:109
169172
msgid ""

c-api/intro.po

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.10\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2023-08-11 15:16+0000\n"
14+
"POT-Creation-Date: 2023-08-18 15:12+0000\n"
1515
"PO-Revision-Date: 2022-11-05 17:21+0000\n"
1616
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2023\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -373,6 +373,11 @@ msgid ""
373373
"objects that reference each other here; for now, the solution is \"don't do "
374374
"that.\")"
375375
msgstr ""
376+
"引用计数之所以重要是因为现有计算机的内存大小是有限的(并且往往限制得很严格);它会计算有多少不同的地方对一个对象进行了 :term:`strong "
377+
"reference`。 这些地方可以是另一个对象,也可以是全局(或静态)C 变量,或是某个 C 函数中的局部变量。 当某个对象的最后一个 "
378+
":term:`strong reference` 被释放时(即其引用计数变为零),该对象就会被取消分配。 "
379+
"如果该对象包含对其他对象的引用,则会释放这些引用。 如果不再有对其他对象的引用,这些对象也会同样地被取消分配,依此类推。 "
380+
"(在这里对象之间的相互引用显然是个问题;目前的解决办法,就是“不要这样做”。)"
376381

377382
#: ../../c-api/intro.rst:272
378383
msgid ""
@@ -392,6 +397,12 @@ msgid ""
392397
"memory (assuming ``sizeof(Py_ssize_t) >= sizeof(void*)``). Thus, the "
393398
"reference count increment is a simple operation."
394399
msgstr ""
400+
"对于引用计数总是会显式地执行操作。 通常的做法是使用 :c:func:`Py_INCREF` 宏来获取对象的新引用(即让引用计数加一),并使用 "
401+
":c:func:`Py_DECREF` 宏来释放引用(即让引用计数减一)。 :c:func:`Py_DECREF` 宏比 incref "
402+
"宏复杂得多,因为它必须检查引用计数是否为零然后再调用对象的释放器。 释放器是一个函数指针,它包含在对象的类型结构体中。 "
403+
"如果对象是复合对象类型,如列表,则特定于类型的释放器会负责释放对象中包含的其他对象的引用,并执行所需的其他终结化操作。 "
404+
"引用计数不会发生溢出;用于保存引用计数的位数至少会与虚拟内存中不同内存位置的位数相同 (假设 ``sizeof(Py_ssize_t) >= "
405+
"sizeof(void*)``)。 因此,引用计数的递增是一个简单的操作。"
395406

396407
#: ../../c-api/intro.rst:288
397408
msgid ""
@@ -410,6 +421,12 @@ msgid ""
410421
" that are called from Python; the call mechanism guarantees to hold a "
411422
"reference to every argument for the duration of the call."
412423
msgstr ""
424+
"没有必要为每个包含指向对象指针的局部变量持有 :term:`strong reference` (即增加引用计数)。 "
425+
"理论上说,当变量指向对象时对象的引用计数就会加一,而当变量离开其作用域时引用计数就会减一。 不过,这两种情况会相互抵消,所以最后引用计数并没有改变。 "
426+
"使用引用计数的唯一真正原因在于只要我们的变量指向对象就可以防止对象被释放。 "
427+
"只要我们知道至少还有一个指向某对象的引用与我们的变量同时存在,就没有必要临时获取一个新的 :term:`strong reference` "
428+
"(即增加引用计数)。 出现引用计数增加的一种重要情况是对象作为参数被传递给扩展模块中的 C 函数而这些函数又在 Python "
429+
"中被调用;调用机制会保证在调用期间对每个参数持有一个引用。"
413430

414431
#: ../../c-api/intro.rst:304
415432
msgid ""
@@ -421,6 +438,9 @@ msgid ""
421438
"code path which allows control to flow back to the user from a "
422439
":c:func:`Py_DECREF`, so almost any operation is potentially dangerous."
423440
msgstr ""
441+
"然而,一个常见的陷阱是从列表中提取对象并在不获取新引用的情况下将其保留一段时间。 "
442+
"某个其他操作可能在无意中从列表中移除该对象,释放这个引用,并可能撤销分配其资源。 真正的危险在于看似无害的操作可能会发起调用任意的 Python "
443+
"代码来做这件事;有一条代码路径允许控制权从 :c:func:`Py_DECREF` 流回到用户,因此几乎任何操作都有潜在的危险。"
424444

425445
#: ../../c-api/intro.rst:312
426446
msgid ""
@@ -431,6 +451,9 @@ msgid ""
431451
"This leaves the caller with the responsibility to call :c:func:`Py_DECREF` "
432452
"when they are done with the result; this soon becomes second nature."
433453
msgstr ""
454+
"安全的做法是始终使用泛型操作(名称以 ``PyObject_``, ``PyNumber_``, ``PySequence_`` 或 "
455+
"``PyMapping_`` 开头的函数)。 这些操作总是为其返回的对象创建一个新的 :term:`strong reference` "
456+
"(即增加引用计数)。 这使得调用者有责任在获得结果之后调用 :c:func:`Py_DECREF`;这种做法很快就能习惯成自然。"
434457

435458
#: ../../c-api/intro.rst:323
436459
msgid "Reference Count Details"
@@ -452,6 +475,12 @@ msgid ""
452475
"said to *borrow* the reference. Nothing needs to be done for a "
453476
":term:`borrowed reference`."
454477
msgstr ""
478+
"Python/C API 中函数的引用计数最好是使用 *引用所有权* 来解释。 所有权是关联到引用,而不是对象(对象不能被拥有:它们总是会被共享)。 "
479+
"“拥有一个引用”意味着当不再需要该引用时必须在其上调用 Py_DECREF。 "
480+
"所有权也可以被转移,这意味着接受该引用所有权的代码在不再需要它时必须通过调用 :c:func:`Py_DECREF` 或 "
481+
":c:func:`Py_XDECREF` 来最终释放它 --- 或是继续转移这个责任(通常是转给其调用方)。 "
482+
"当一个函数将引用所有权转给其调用方时,则称调用方收到一个 *新的* 引用。 当未转移所有权时,则称调用方是 *借入* 这个引用。 对于 "
483+
":term:`borrowed reference` 来说不需要任何额外操作。"
455484

456485
#: ../../c-api/intro.rst:338
457486
msgid ""
@@ -529,6 +558,9 @@ msgid ""
529558
" For example, this function sets all items of a list (actually, any mutable"
530559
" sequence) to a given item::"
531560
msgstr ""
561+
"在对条目使用 :c:func:`PyObject_SetItem` 等操作时更常见的做法是只借入引用,比如将参数传递给你正在编写的函数。 "
562+
"在这种情况下,它们在引用方面的行为更为清晰,因为你不必为了把引用转走而获取一个新的引用(“让它被偷取”)。 "
563+
"例如,这个函数将列表(实际上是任何可变序列)中的所有条目都设为给定的条目::"
532564

533565
#: ../../c-api/intro.rst:417
534566
msgid ""

c-api/module.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.10\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2023-08-11 15:16+0000\n"
14+
"POT-Creation-Date: 2023-08-18 15:12+0000\n"
1515
"PO-Revision-Date: 2022-11-05 17:21+0000\n"
1616
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2023\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -608,7 +608,7 @@ msgstr ""
608608
msgid ""
609609
"Unlike other functions that steal references, ``PyModule_AddObject()`` only "
610610
"releases the reference to *value* **on success**."
611-
msgstr ""
611+
msgstr "与其他窃取引用的函数不同,``PyModule_AddObject()`` 只在 **成功** 时释放对 *value* 的引用。"
612612

613613
#: ../../c-api/module.rst:503
614614
msgid ""

c-api/object.po

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.10\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2023-08-11 15:16+0000\n"
14+
"POT-Creation-Date: 2023-08-18 15:12+0000\n"
1515
"PO-Revision-Date: 2022-11-05 17:21+0000\n"
1616
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2023\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -37,6 +37,8 @@ msgid ""
3737
"function (that is, create a new :term:`strong reference` to NotImplemented "
3838
"and return it)."
3939
msgstr ""
40+
"正确处理从 C 语言函数中返回 :c:data:`Py_NotImplemented` 的问题(即新建一个指向 NotImplemented 的 "
41+
":term:`strong reference` 并返回它)。"
4042

4143
#: ../../c-api/object.rst:24
4244
msgid ""
@@ -385,6 +387,10 @@ msgid ""
385387
"function, which returns a pointer of type :c:expr:`PyTypeObject*`, except "
386388
"when a new :term:`strong reference` is needed."
387389
msgstr ""
390+
"当 *o* 不为 ``NULL`` 时,返回一个与对象 *o* 的类型相对应的类型对象。 当失败时,将引发 :exc:`SystemError` 并返回"
391+
" ``NULL``。 这等同于 Python 表达式 ``type(o)``。 该函数会新建一个指向返回值的 :term:`strong "
392+
"reference`。 实际上没有多少理由使用此函数来替代 :c:func:`Py_TYPE()` 函数,后者将返回一个 "
393+
":c:expr:`PyTypeObject*` 类型的指针,除非是需要一个新的 :term:`strong reference`。"
388394

389395
#: ../../c-api/object.rst:311
390396
msgid ""

c-api/refcounting.po

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
66
# Translators:
7-
# Rafael Fontenelle <rffontenelle@gmail.com>, 2022
7+
# Rafael Fontenelle <rffontenelle@gmail.com>, 2023
88
#
99
#, fuzzy
1010
msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.10\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2023-08-11 15:16+0000\n"
14+
"POT-Creation-Date: 2023-08-18 15:12+0000\n"
1515
"PO-Revision-Date: 2022-11-05 17:21+0000\n"
16-
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2022\n"
16+
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2023\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1818
"MIME-Version: 1.0\n"
1919
"Content-Type: text/plain; charset=UTF-8\n"
@@ -35,7 +35,7 @@ msgstr "本节介绍的宏被用于管理 Python 对象的引用计数。"
3535
msgid ""
3636
"Indicate taking a new :term:`strong reference` to object *o*, indicating it "
3737
"is in use and should not be destroyed."
38-
msgstr ""
38+
msgstr "表示为对象 *o* 获取一个新的 :term:`strong reference`,指明该对象正在被使用且不应被销毁。"
3939

4040
#: ../../c-api/refcounting.rst:19
4141
msgid ""
@@ -48,7 +48,7 @@ msgstr ""
4848

4949
#: ../../c-api/refcounting.rst:23
5050
msgid "When done using the object, release it by calling :c:func:`Py_DECREF`."
51-
msgstr ""
51+
msgstr "当对象使用完毕后,可调用 :c:func:`Py_DECREF` 释放它。"
5252

5353
#: ../../c-api/refcounting.rst:25
5454
msgid ""
@@ -64,7 +64,7 @@ msgstr ""
6464
msgid ""
6565
"Similar to :c:func:`Py_INCREF`, but the object *o* can be ``NULL``, in which"
6666
" case this has no effect."
67-
msgstr ""
67+
msgstr "与 :c:func:`Py_INCREF` 类似,但对象 *o* 可以为 ``NULL``,在这种情况下此函数将没有任何效果。"
6868

6969
#: ../../c-api/refcounting.rst:36
7070
msgid "See also :c:func:`Py_XNewRef`."
@@ -75,12 +75,13 @@ msgid ""
7575
"Create a new :term:`strong reference` to an object: call :c:func:`Py_INCREF`"
7676
" on *o* and return the object *o*."
7777
msgstr ""
78+
"为对象创建一个新的 :term:`strong reference`: 在 *o* 上调用 :c:func:`Py_INCREF` 并返回对象 *o*。"
7879

7980
#: ../../c-api/refcounting.rst:44
8081
msgid ""
8182
"When the :term:`strong reference` is no longer needed, :c:func:`Py_DECREF` "
8283
"should be called on it to release the reference."
83-
msgstr ""
84+
msgstr "当不再需要这个 :term:`strong reference` 时,应当在其上调用 :c:func:`Py_DECREF` 来释放引用。"
8485

8586
#: ../../c-api/refcounting.rst:47
8687
msgid ""
@@ -112,14 +113,16 @@ msgstr "如果对象 *o* 为 ``NULL``,该函数也·将返回 ``NULL``。"
112113
msgid ""
113114
"Release a :term:`strong reference` to object *o*, indicating the reference "
114115
"is no longer used."
115-
msgstr ""
116+
msgstr "释放一个指向对象 *o* 的 :term:`strong reference`,表明该引用不再被使用。"
116117

117118
#: ../../c-api/refcounting.rst:78
118119
msgid ""
119120
"Once the last :term:`strong reference` is released (i.e. the object's "
120121
"reference count reaches 0), the object's type's deallocation function (which"
121122
" must not be ``NULL``) is invoked."
122123
msgstr ""
124+
"当最后一个 :term:`strong reference` 被释放时 (即对象的引用计数变为 0),将会发起调用该对象所属类型的 "
125+
"deallocation 函数 (它必须不为 ``NULL``)。"
123126

124127
#: ../../c-api/refcounting.rst:83
125128
msgid ""
@@ -157,6 +160,8 @@ msgid ""
157160
" case this has no effect. The same warning from :c:func:`Py_DECREF` applies "
158161
"here as well."
159162
msgstr ""
163+
"与 :c:func:`Py_DECREF` 类似,但对象 *o* 可以为 ``NULL``,在这种情况下此函数将没有任何效果。 来自 "
164+
":c:func:`Py_DECREF` 的警告同样适用于此处。"
160165

161166
#: ../../c-api/refcounting.rst:112
162167
msgid ""
@@ -167,26 +172,34 @@ msgid ""
167172
"to the object passed because the macro carefully uses a temporary variable "
168173
"and sets the argument to ``NULL`` before releasing the reference."
169174
msgstr ""
175+
"释放一个指向对象 *o* 的 :term:`strong reference`。 对象可以为 "
176+
"``NULL``,在此情况下该宏将没有任何效果;在其他情况下其效果与 :c:func:`Py_DECREF` 相同,区别在于其参数也会被设为 "
177+
"``NULL``。 针对 :c:func:`Py_DECREF` 的警告不适用于所传递的对象,因为该宏会细心地使用一个临时变量并在释放引用之前将参数设为"
178+
" ``NULL``。"
170179

171180
#: ../../c-api/refcounting.rst:120
172181
msgid ""
173182
"It is a good idea to use this macro whenever releasing a reference to an "
174183
"object that might be traversed during garbage collection."
175-
msgstr ""
184+
msgstr "当需要释放指向一个在垃圾回收期间可能被会遍历的对象的引用时使用该宏是一个好主意。"
176185

177186
#: ../../c-api/refcounting.rst:125
178187
msgid ""
179188
"Indicate taking a new :term:`strong reference` to object *o*. A function "
180189
"version of :c:func:`Py_XINCREF`. It can be used for runtime dynamic "
181190
"embedding of Python."
182191
msgstr ""
192+
"表示获取一个指向对象 *o* 的新 :term:`strong reference`。 :c:func:`Py_XINCREF` 的函数版本。 "
193+
"它可被用于 Python 的运行时动态嵌入。"
183194

184195
#: ../../c-api/refcounting.rst:132
185196
msgid ""
186197
"Release a :term:`strong reference` to object *o*. A function version of "
187198
":c:func:`Py_XDECREF`. It can be used for runtime dynamic embedding of "
188199
"Python."
189200
msgstr ""
201+
"释放一个指向对象 *o* 的 :term:`strong reference`。 :c:func:`Py_XDECREF` 的函数版本。 它可被用于 "
202+
"Python 的运行时动态嵌入。"
190203

191204
#: ../../c-api/refcounting.rst:137
192205
msgid ""

0 commit comments

Comments
 (0)