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

Skip to content

Commit 3c78a96

Browse files
[po] auto sync
1 parent f7aef1f commit 3c78a96

2 files changed

Lines changed: 19 additions & 4 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
# Lordran <[email protected]>, 2020
99
# Freesand Leo <[email protected]>, 2020
1010
# Meng Du <[email protected]>, 2020
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-02-09 12:40+0000\n"
1819
"PO-Revision-Date: 2020-05-30 11:49+0000\n"
19-
"Last-Translator: Meng Du <alphanow@gmail.com>, 2020\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"
@@ -304,6 +305,8 @@ msgid ""
304305
"could play tricks with this to provide a dynamically created collection of "
305306
"frozen modules."
306307
msgstr ""
308+
"该指针被初始化为指向 :c:type:`struct _frozen` 数组,以 ``NULL`` 或者 0 "
309+
"作为结束标记。当一个冻结模块被导入,首先要在这个表中搜索。第三方库可以以此来提供动态创建的冻结模块集合。"
307310

308311
#: ../../c-api/import.rst:287
309312
msgid ""

library/ctypes.po

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,23 +1132,28 @@ msgid ""
11321132
"methods of the type. *pythonapi* is a predefined symbol giving access to "
11331133
"the Python C api::"
11341134
msgstr ""
1135+
":mod:`ctypes` 可以通过 :meth:`in_dll` 类方法访问这类变量 。 *pythonapi* 是用于访问 Python C "
1136+
"接口的预定义符号::"
11351137

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

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

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

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

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

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

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

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

11901202
#: ../../library/ctypes.rst:1128
11911203
msgid "Surprises"

0 commit comments

Comments
 (0)