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

Skip to content

Commit cbe1037

Browse files
[po] auto sync
1 parent ac0a104 commit cbe1037

2 files changed

Lines changed: 22 additions & 5 deletions

File tree

c-api/import.po

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
# 汪心禾 <[email protected]>, 2019
99
# Lordran <[email protected]>, 2019
1010
# Freesand Leo <[email protected]>, 2019
11+
# zeroswan <[email protected]>, 2020
1112
#
1213
#, fuzzy
1314
msgid ""
@@ -16,7 +17,7 @@ msgstr ""
1617
"Report-Msgid-Bugs-To: \n"
1718
"POT-Creation-Date: 2020-05-31 09:25+0000\n"
1819
"PO-Revision-Date: 2017-02-16 17:35+0000\n"
19-
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2019\n"
20+
"Last-Translator: zeroswan <weditor@163.com>, 2020\n"
2021
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2122
"MIME-Version: 1.0\n"
2223
"Content-Type: text/plain; charset=UTF-8\n"
@@ -292,6 +293,8 @@ msgid ""
292293
"could play tricks with this to provide a dynamically created collection of "
293294
"frozen modules."
294295
msgstr ""
296+
"该指针被初始化为指向 :c:type:`struct _frozen` 数组,以 ``NULL`` 或者 0 "
297+
"作为结束标记。当一个冻结模块被导入,首先要在这个表中搜索。第三方库可以以此来提供动态创建的冻结模块集合。"
295298

296299
#: ../../c-api/import.rst:272
297300
msgid ""

library/ctypes.po

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ msgstr ""
11141114

11151115
#: ../../library/ctypes.rst:1053
11161116
msgid "Accessing values exported from dlls"
1117-
msgstr "访问 dll 中导出的值"
1117+
msgstr "访问 dll 的导出变量"
11181118

11191119
#: ../../library/ctypes.rst:1055
11201120
msgid ""
@@ -1123,30 +1123,37 @@ msgid ""
11231123
"an integer set to 0, 1, or 2, depending on the :option:`-O` or :option:`-OO`"
11241124
" flag given on startup."
11251125
msgstr ""
1126+
"一些动态链接库不仅仅导出函数,也会导出变量。一个例子就是 Python 库本身的 :c:data:`Py_OptimizeFlag` ,根据启动选项 "
1127+
":option:`-O` 、 :option:`-OO` 的不同,它是值可能为 0、1、2 的整型。"
11261128

11271129
#: ../../library/ctypes.rst:1060
11281130
msgid ""
11291131
":mod:`ctypes` can access values like this with the :meth:`in_dll` class "
11301132
"methods of the type. *pythonapi* is a predefined symbol giving access to "
11311133
"the Python C api::"
11321134
msgstr ""
1135+
":mod:`ctypes` 可以通过 :meth:`in_dll` 类方法访问这类变量 。 *pythonapi* 是用于访问 Python C "
1136+
"接口的预定义符号::"
11331137

11341138
#: ../../library/ctypes.rst:1069
11351139
msgid ""
11361140
"If the interpreter would have been started with :option:`-O`, the sample "
11371141
"would have printed ``c_long(1)``, or ``c_long(2)`` if :option:`-OO` would "
11381142
"have been specified."
11391143
msgstr ""
1144+
"如果解释器使用 :option:`-O` 选项启动,这个例子会打印 ``c_long(1)`` , 如果使用 :option:`-OO` 启动,则会打印"
1145+
" ``c_long(2)`` 。"
11401146

11411147
#: ../../library/ctypes.rst:1073
11421148
msgid ""
11431149
"An extended example which also demonstrates the use of pointers accesses the"
11441150
" :c:data:`PyImport_FrozenModules` pointer exported by Python."
11451151
msgstr ""
1152+
"一个扩展例子, 同时也展示了使用指针访问 Python 导出的 :c:data:`PyImport_FrozenModules` 指针对象。"
11461153

11471154
#: ../../library/ctypes.rst:1076
11481155
msgid "Quoting the docs for that value:"
1149-
msgstr ""
1156+
msgstr "对文档中这个值的解释说明"
11501157

11511158
#: ../../library/ctypes.rst:1078
11521159
msgid ""
@@ -1156,18 +1163,20 @@ msgid ""
11561163
"could play tricks with this to provide a dynamically created collection of "
11571164
"frozen modules."
11581165
msgstr ""
1166+
"该指针被初始化为指向 :c:type:`struct _frozen` 数组,以 ``NULL`` 或者 0 "
1167+
"作为结束标记。当一个冻结模块被导入,首先要在这个表中搜索。第三方库可以以此来提供动态创建的冻结模块集合。"
11591168

11601169
#: ../../library/ctypes.rst:1083
11611170
msgid ""
11621171
"So manipulating this pointer could even prove useful. To restrict the "
11631172
"example size, we show only how this table can be read with :mod:`ctypes`::"
1164-
msgstr ""
1173+
msgstr "这足以证明修改这个指针是很有用的。为了让实例大小不至于太长,这里只展示如何使用 :mod:`ctypes` 读取这个表::"
11651174

11661175
#: ../../library/ctypes.rst:1095
11671176
msgid ""
11681177
"We have defined the :c:type:`struct _frozen` data type, so we can get the "
11691178
"pointer to the table::"
1170-
msgstr ""
1179+
msgstr "我们定义了 :c:type:`struct _frozen`  数据类型,接着就可以获取这张表的指针了::"
11711180

11721181
#: ../../library/ctypes.rst:1102
11731182
msgid ""
@@ -1177,13 +1186,18 @@ msgid ""
11771186
" crash with an access violation or whatever, so it's better to break out of "
11781187
"the loop when we hit the ``NULL`` entry::"
11791188
msgstr ""
1189+
"由于 ``table`` 是指向 ``struct_frozen`` 数组的 ``指针`` "
1190+
",我们可以遍历它,只不过需要自己判断循环是否结束,因为指针本身并不包含长度。它早晚会因为访问到野指针或者什么的把自己搞崩溃,所以我们最好在遇到 "
1191+
"``NULL`` 后就让它退出循环::"
11801192

11811193
#: ../../library/ctypes.rst:1120
11821194
msgid ""
11831195
"The fact that standard Python has a frozen module and a frozen package "
11841196
"(indicated by the negative ``size`` member) is not well known, it is only "
11851197
"used for testing. Try it out with ``import __hello__`` for example."
11861198
msgstr ""
1199+
"Python 的冻结模块和冻结包(由负 ``size`` 成员表示)并不是广为人知的事情,它们仅仅用于实验。例如,可以使用 ``import "
1200+
"__hello__`` 尝试一下这个功能。"
11871201

11881202
#: ../../library/ctypes.rst:1128
11891203
msgid "Surprises"

0 commit comments

Comments
 (0)