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

Skip to content

Commit c4a4818

Browse files
[po] auto sync
1 parent e0ce0e7 commit c4a4818

2 files changed

Lines changed: 27 additions & 15 deletions

File tree

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "92.30%", "updated_at": "2023-11-18T01:19:04Z"}
1+
{"translation": "92.33%", "updated_at": "2023-11-18T09:55:48Z"}

howto/isolating-extensions.po

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -548,21 +548,23 @@ msgstr ""
548548
msgid ""
549549
"Unfortunately, :c:data:`Py_Version` was only added in Python 3.11. As a "
550550
"replacement, use:"
551-
msgstr ""
551+
msgstr "不幸的是,:c:data:`Py_Version` 直到 Python 3.11 才被加入。 作为替代,请使用:"
552552

553553
#: ../../howto/isolating-extensions.rst:369
554554
msgid ":c:macro:`PY_VERSION_HEX`, if not using the stable ABI, or"
555-
msgstr ""
555+
msgstr ":c:macro:`PY_VERSION_HEX`,如果不使用稳定 ABI 的话,或者"
556556

557557
#: ../../howto/isolating-extensions.rst:370
558558
msgid ""
559559
":py:data:`sys.version_info` (via :c:func:`PySys_GetObject` and "
560560
":c:func:`PyArg_ParseTuple`)."
561561
msgstr ""
562+
":py:data:`sys.version_info` (通过 :c:func:`PySys_GetObject` 和 "
563+
":c:func:`PyArg_ParseTuple`)。"
562564

563565
#: ../../howto/isolating-extensions.rst:375
564566
msgid "Delegating ``tp_traverse``"
565-
msgstr ""
567+
msgstr "委托 ``tp_traverse``"
566568

567569
#: ../../howto/isolating-extensions.rst:377
568570
msgid ""
@@ -571,6 +573,8 @@ msgid ""
571573
"ensure that ``Py_TYPE(self)`` is visited only once. Note that only heap type"
572574
" are expected to visit the type in ``tp_traverse``."
573575
msgstr ""
576+
"如果你的遍历函数委托给了其基类(或另一个类型)的 :c:member:`~PyTypeObject.tp_traverse`,请确保 "
577+
"``Py_TYPE(self)`` 只被访问一次。 请注意只有堆类型会被预期访问 ``tp_traverse`` 中的类型。"
574578

575579
#: ../../howto/isolating-extensions.rst:382
576580
msgid "For example, if your traverse function includes::"
@@ -585,77 +589,85 @@ msgid ""
585589
"It is not necessary to handle the type's reference count in "
586590
":c:member:`~PyTypeObject.tp_new` and :c:member:`~PyTypeObject.tp_clear`."
587591
msgstr ""
592+
"不需要在 :c:member:`~PyTypeObject.tp_new` 和 :c:member:`~PyTypeObject.tp_clear` "
593+
"中处理该类型的引用计数。"
588594

589595
#: ../../howto/isolating-extensions.rst:401
590596
msgid "Defining ``tp_dealloc``"
591-
msgstr ""
597+
msgstr "定义 ``tp_dealloc``"
592598

593599
#: ../../howto/isolating-extensions.rst:403
594600
msgid ""
595601
"If your type has a custom :c:member:`~PyTypeObject.tp_dealloc` function, it "
596602
"needs to:"
597-
msgstr ""
603+
msgstr "如果你的类型有自定义的 :c:member:`~PyTypeObject.tp_dealloc` 函数,则它需要:"
598604

599605
#: ../../howto/isolating-extensions.rst:406
600606
msgid ""
601607
"call :c:func:`PyObject_GC_UnTrack` before any fields are invalidated, and"
602-
msgstr ""
608+
msgstr "在任何字段失效之前调用 :c:func:`PyObject_GC_UnTrack`,并且"
603609

604610
#: ../../howto/isolating-extensions.rst:407
605611
msgid "decrement the reference count of the type."
606-
msgstr ""
612+
msgstr "递减该类型的引用计数。"
607613

608614
#: ../../howto/isolating-extensions.rst:409
609615
msgid ""
610616
"To keep the type valid while ``tp_free`` is called, the type's refcount "
611617
"needs to be decremented *after* the instance is deallocated. For example::"
612-
msgstr ""
618+
msgstr "要在 ``tp_free`` 被调用时保持类型有效,必须在撤销分配实例 *之后* 递减该类型的引用计数。 例如::"
613619

614620
#: ../../howto/isolating-extensions.rst:421
615621
msgid ""
616622
"The default ``tp_dealloc`` function does this, so if your type does *not* "
617623
"override ``tp_dealloc`` you don't need to add it."
618-
msgstr ""
624+
msgstr "默认的 ``tp_dealloc`` 函数会执行此操作,因此如果你的类型 *没有* 重载 ``tp_dealloc`` 你就不需要添加它。"
619625

620626
#: ../../howto/isolating-extensions.rst:427
621627
msgid "Not overriding ``tp_free``"
622-
msgstr ""
628+
msgstr "没有重载 ``tp_free``"
623629

624630
#: ../../howto/isolating-extensions.rst:429
625631
msgid ""
626632
"The :c:member:`~PyTypeObject.tp_free` slot of a heap type must be set to "
627633
":c:func:`PyObject_GC_Del`. This is the default; do not override it."
628634
msgstr ""
635+
"堆类型的 :c:member:`~PyTypeObject.tp_free` 槽位必须设为 :c:func:`PyObject_GC_Del`。 "
636+
"这是默认的设置;请不要重载它。"
629637

630638
#: ../../howto/isolating-extensions.rst:435
631639
msgid "Avoiding ``PyObject_New``"
632-
msgstr ""
640+
msgstr "避免 ``PyObject_New``"
633641

634642
#: ../../howto/isolating-extensions.rst:437
635643
msgid "GC-tracked objects need to be allocated using GC-aware functions."
636-
msgstr ""
644+
msgstr "带 GC 追踪的对象需要使用带 GC 感知的函数来分配。"
637645

638646
#: ../../howto/isolating-extensions.rst:439
639647
msgid "If you use use :c:func:`PyObject_New` or :c:func:`PyObject_NewVar`:"
640-
msgstr ""
648+
msgstr "如果你使用 :c:func:`PyObject_New` 或 :c:func:`PyObject_NewVar`:"
641649

642650
#: ../../howto/isolating-extensions.rst:441
643651
msgid ""
644652
"Get and call type's :c:member:`~PyTypeObject.tp_alloc` slot, if possible. "
645653
"That is, replace ``TYPE *o = PyObject_New(TYPE, typeobj)`` with::"
646654
msgstr ""
655+
"如有可能,请获取并调用类型的 :c:member:`~PyTypeObject.tp_alloc` 槽位。 也就是说,将 ``TYPE *o = "
656+
"PyObject_New(TYPE, typeobj)`` 替换为::"
647657

648658
#: ../../howto/isolating-extensions.rst:446
649659
msgid ""
650660
"Replace ``o = PyObject_NewVar(TYPE, typeobj, size)`` with the same, but use "
651661
"size instead of the 0."
652-
msgstr ""
662+
msgstr "同样地替换 ``o = PyObject_NewVar(TYPE, typeobj, size)``,但要使用指定大小而不是 0。"
653663

654664
#: ../../howto/isolating-extensions.rst:449
655665
msgid ""
656666
"If the above is not possible (e.g. inside a custom ``tp_alloc``), call "
657667
":c:func:`PyObject_GC_New` or :c:func:`PyObject_GC_NewVar`::"
658668
msgstr ""
669+
"如果无法执行以上操作(例如在自定义的 ``tp_alloc`` 中),请调用 :c:func:`PyObject_GC_New` 或 "
670+
":c:func:`PyObject_GC_NewVar`::"
659671

660672
#: ../../howto/isolating-extensions.rst:458
661673
msgid "Module State Access from Classes"

0 commit comments

Comments
 (0)