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

Skip to content

Commit 9642bed

Browse files
[po] auto sync
1 parent a3f1ad5 commit 9642bed

3 files changed

Lines changed: 23 additions & 4 deletions

File tree

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "90.08%", "updated_at": "2023-08-24T07:57:10Z"}
1+
{"translation": "90.10%", "updated_at": "2023-08-25T08:57:06Z"}

c-api/init_config.po

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,10 @@ msgid ""
547547
"allocator. It can be called before :c:func:`Py_PreInitialize` if "
548548
":c:member:`PyPreConfig.allocator` is set to ``PYMEM_ALLOCATOR_NOT_SET``."
549549
msgstr ""
550+
"``PyMem_SetAllocator()`` 可在 :c:func:`Py_PreInitialize` "
551+
"之后、:c:func:`Py_InitializeFromConfig` 之前被调用以安装自定义的内存分配器。 如果 "
552+
":c:member:`PyPreConfig.allocator` 被设为 ``PYMEM_ALLOCATOR_NOT_SET`` 则可在 "
553+
":c:func:`Py_PreInitialize` 之前被调用。"
550554

551555
#: ../../c-api/init_config.rst:402
552556
msgid ""
@@ -555,26 +559,29 @@ msgid ""
555559
"``malloc()`` and ``free()`` is always safe. :c:func:`Py_DecodeLocale` must "
556560
"not be called before the Python preinitialization."
557561
msgstr ""
562+
"像 :c:func:`PyMem_RawMalloc` 这样的 Python 内存分配函数不能在 Python 预初始化之前使用,而直接调用 "
563+
"``malloc()`` 和 ``free()`` 则始终会是安全的。 :c:func:`Py_DecodeLocale` 不能在 Python "
564+
"预初始化之前被调用。"
558565

559566
#: ../../c-api/init_config.rst:407
560567
msgid ""
561568
"Example using the preinitialization to enable the :ref:`Python UTF-8 Mode "
562569
"<utf8-mode>`::"
563-
msgstr ""
570+
msgstr "使用预初始化来启用 :ref:`Python UTF-8 模式 <utf8-mode>` 的例子::"
564571

565572
#: ../../c-api/init_config.rst:429
566573
msgid "PyConfig"
567574
msgstr "PyConfig"
568575

569576
#: ../../c-api/init_config.rst:433
570577
msgid "Structure containing most parameters to configure Python."
571-
msgstr ""
578+
msgstr "包含了大部分用于配置 Python 的形参的结构体。"
572579

573580
#: ../../c-api/init_config.rst:435
574581
msgid ""
575582
"When done, the :c:func:`PyConfig_Clear` function must be used to release the"
576583
" configuration memory."
577-
msgstr ""
584+
msgstr "在完成后,必须使用 :c:func:`PyConfig_Clear` 函数来释放配置内存。"
578585

579586
#: ../../c-api/init_config.rst:440
580587
msgid "Structure methods:"

library/ctypes.po

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,6 +1420,8 @@ msgid ""
14201420
"(``/sbin/ldconfig``, ``gcc``, ``objdump`` and ``ld``) to find the library "
14211421
"file. It returns the filename of the library file."
14221422
msgstr ""
1423+
"在 Linux 中,:func:`~ctypes.util.find_library` 会尝试运行外部程序 (``/sbin/ldconfig``, "
1424+
"``gcc``, ``objdump`` 和 ``ld``) 来查找库文件。 它会返回库文件的文件名。"
14231425

14241426
#: ../../library/ctypes.rst:1323
14251427
msgid ""
@@ -1438,6 +1440,8 @@ msgid ""
14381440
"schemes and paths to locate the library, and returns a full pathname if "
14391441
"successful::"
14401442
msgstr ""
1443+
"在 macOS 上,:func:`~ctypes.util.find_library` "
1444+
"会尝试几种预定义的命名方案和路径来定位库,如果成功则将返回完整的路径名称::"
14411445

14421446
#: ../../library/ctypes.rst:1352
14431447
msgid ""
@@ -1446,6 +1450,9 @@ msgid ""
14461450
" naming scheme a call like ``find_library(\"c\")`` will fail and return "
14471451
"``None``."
14481452
msgstr ""
1453+
"在 Windows 中,:func:`~ctypes.util.find_library` "
1454+
"会沿着系统搜索路径进行搜索,并返回完整的路径名称,但由于没有预定义的命名方案因此像 ``find_library(\"c\")`` "
1455+
"这样的调用会失败并返回 ``None``。"
14491456

14501457
#: ../../library/ctypes.rst:1356
14511458
msgid ""
@@ -1454,6 +1461,8 @@ msgid ""
14541461
"into the wrapper module instead of using :func:`~ctypes.util.find_library` "
14551462
"to locate the library at runtime."
14561463
msgstr ""
1464+
"如果使用 :mod:`ctypes` 包装一个共享库,则更好的做法 *可能* 是开发时就确定好共享库的名称,并将其硬编码到包装模块中而不是在运行时使用 "
1465+
":func:`~ctypes.util.find_library` 来定位库。"
14571466

14581467
#: ../../library/ctypes.rst:1364
14591468
msgid "Loading shared libraries"
@@ -1559,6 +1568,9 @@ msgid ""
15591568
":c:func:`!dlopen` or :c:func:`!LoadLibrary` function is used to load the "
15601569
"library into the process, and to get a handle to it."
15611570
msgstr ""
1571+
"所有这些类都可以通过附带至少一个参数,即共享库的路径名来实例化。 如果你有一个指向已加载共享库的现有句柄,则可以将其作为以 ``handle`` "
1572+
"命名的参数传入,否则将使用底层平台的 :c:func:`!dlopen` 或 :c:func:`!LoadLibrary` "
1573+
"函数将库加载到进程中,并获取其句柄。"
15621574

15631575
#: ../../library/ctypes.rst:1447
15641576
msgid ""

0 commit comments

Comments
 (0)