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

Skip to content

Commit 5fae4e0

Browse files
[po] auto sync
1 parent 6148b57 commit 5fae4e0

3 files changed

Lines changed: 25 additions & 5 deletions

File tree

c-api/capsule.po

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,25 +76,29 @@ msgid ""
7676
"If non-``NULL``, this string must outlive the capsule. (Though it is "
7777
"permitted to free it inside the *destructor*.)"
7878
msgstr ""
79+
"字符串 *name* 可以是 ``NULL`` 或是一个指向有效的 C 字符串的指针。 如果不为 ``NULL``,则此字符串必须比 capsule "
80+
"长(虽然也允许在 *destructor* 中释放它。)"
7981

8082
#: ../../c-api/capsule.rst:51
8183
msgid ""
8284
"If the *destructor* argument is not ``NULL``, it will be called with the "
8385
"capsule as its argument when it is destroyed."
84-
msgstr ""
86+
msgstr "如果 *destructor* 参数不为 ``NULL``,则当它被销毁时将附带 capsule 作为参数来调用。"
8587

8688
#: ../../c-api/capsule.rst:54
8789
msgid ""
8890
"If this capsule will be stored as an attribute of a module, the *name* "
8991
"should be specified as ``modulename.attributename``. This will enable other"
9092
" modules to import the capsule using :c:func:`PyCapsule_Import`."
9193
msgstr ""
94+
"如果此 capsule 将被保存为一个模块的属性,则 *name* 应当被指定为 ``modulename.attributename``。 "
95+
"这将允许其他模块使用 :c:func:`PyCapsule_Import` 来导入此 capsule。"
9296

9397
#: ../../c-api/capsule.rst:61
9498
msgid ""
9599
"Retrieve the *pointer* stored in the capsule. On failure, set an exception "
96100
"and return ``NULL``."
97-
msgstr ""
101+
msgstr "提取保存在 capsule 中的 *pointer*。 在失败时设置一个异常并返回 ``NULL``。"
98102

99103
#: ../../c-api/capsule.rst:64
100104
msgid ""
@@ -103,25 +107,29 @@ msgid ""
103107
"also be ``NULL``. Python uses the C function :c:func:`strcmp` to compare "
104108
"capsule names."
105109
msgstr ""
110+
"*name* 形参必须与保存在 capsule 中的名称进行精确比较。 如果保存在 capsule 中的名称为 ``NULL``,则传入的 *name*"
111+
" 也必须为 ``NULL``。 Python 会使用 C 函数 :c:func:`strcmp` 来比较 capsule 名称。"
106112

107113
#: ../../c-api/capsule.rst:72
108114
msgid ""
109115
"Return the current destructor stored in the capsule. On failure, set an "
110116
"exception and return ``NULL``."
111-
msgstr ""
117+
msgstr "返回保存在 capsule 中的当前析构器。 在失败时设置一个异常并返回 ``NULL``。"
112118

113119
#: ../../c-api/capsule.rst:75
114120
msgid ""
115121
"It is legal for a capsule to have a ``NULL`` destructor. This makes a "
116122
"``NULL`` return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or "
117123
":c:func:`PyErr_Occurred` to disambiguate."
118124
msgstr ""
125+
"具有 ``NULL`` 析构器是合法的。 这会使得 ``NULL`` 返回值有些歧义;请使用 :c:func:`PyCapsule_IsValid` 或"
126+
" :c:func:`PyErr_Occurred` 来消除歧义。"
119127

120128
#: ../../c-api/capsule.rst:82
121129
msgid ""
122130
"Return the current context stored in the capsule. On failure, set an "
123131
"exception and return ``NULL``."
124-
msgstr ""
132+
msgstr "返回保存在 capsule 中的当前上下文。 在失败时设置一个异常并返回 ``NULL``。"
125133

126134
#: ../../c-api/capsule.rst:85
127135
msgid ""

c-api/dict.po

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,17 @@ msgid ""
108108
"if it isn't, :exc:`TypeError` is raised. If *key* is not in the dictionary, "
109109
":exc:`KeyError` is raised. Return ``0`` on success or ``-1`` on failure."
110110
msgstr ""
111+
"移除字典 *p* 中键为 *key* 的条目。 *key* 必须是可哈希的;如果不是,则会引发 :exc:`TypeError`。 如果字典中没有 "
112+
"*key*,则会引发 :exc:`KeyError`。 成功时返回 ``0``,失败时返回 ``-1``。"
111113

112114
#: ../../c-api/dict.rst:91
113115
msgid ""
114116
"Remove the entry in dictionary *p* which has a key specified by the string "
115117
"*key*. If *key* is not in the dictionary, :exc:`KeyError` is raised. Return "
116118
"``0`` on success or ``-1`` on failure."
117119
msgstr ""
120+
"移除字典 *p* 中由字符串 *key* 指定的键的条目。 如果字典中没有 *key*,则会引发 :exc:`KeyError`。 成功时返回 "
121+
"``0``,失败时返回 ``-1``。"
118122

119123
#: ../../c-api/dict.rst:98
120124
msgid ""

library/ctypes.po

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1829,23 +1829,28 @@ msgid ""
18291829
"``ctypes.seh_exception`` with argument ``code`` will be raised, allowing an "
18301830
"audit hook to replace the exception with its own."
18311831
msgstr ""
1832+
"在 Windows 上,当外部函数调用引发一个系统异常时(例如由于访问冲突),它将被捕获被替换为适当的 Python 异常。 此外,还将引发一个审计事件"
1833+
" ``ctypes.seh_exception`` 并附带参数 ``code``,以允许审计钩子将原异常替换为它自己的异常。"
18321834

18331835
#: ../../library/ctypes.rstNone
18341836
msgid ""
18351837
"Raises an :ref:`auditing event <auditing>` ``ctypes.call_function`` with "
18361838
"arguments ``func_pointer``, ``arguments``."
18371839
msgstr ""
1840+
"引发一个审计事件 ``ctypes.call_function``,附带参数 ``func_pointer``, ``arguments``。"
18381841

18391842
#: ../../library/ctypes.rst:1623
18401843
msgid ""
18411844
"Some ways to invoke foreign function calls may raise an auditing event "
18421845
"``ctypes.call_function`` with arguments ``function pointer`` and "
18431846
"``arguments``."
18441847
msgstr ""
1848+
"某些发起外部函数调用的方式可能会引发一个审计事件 ``ctypes.call_function`` 并附带参数 ``function pointer``"
1849+
" 和 ``arguments``。"
18451850

18461851
#: ../../library/ctypes.rst:1629
18471852
msgid "Function prototypes"
1848-
msgstr ""
1853+
msgstr "函数原型"
18491854

18501855
#: ../../library/ctypes.rst:1631
18511856
msgid ""
@@ -1857,6 +1862,9 @@ msgid ""
18571862
"decorator factories, and as such, be applied to functions through the "
18581863
"``@wrapper`` syntax. See :ref:`ctypes-callback-functions` for examples."
18591864
msgstr ""
1865+
"外部函数也可通过实例化函数原型来创建。 函数原型类似于 C 中的函数原型;它们在不定义具体实现的情况下描述了一个函数(返回类型、参数类型、调用约定)。 "
1866+
"工厂函数必须使用函数所需要的结果类型和参数类型来调用,并可被用作装饰器工厂函数,在此情况下可以通过 ``@wrapper`` 语法应用于函数。 请参阅 "
1867+
":ref:`ctypes-callback-functions` 了解有关示例。"
18601868

18611869
#: ../../library/ctypes.rst:1642
18621870
msgid ""

0 commit comments

Comments
 (0)