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

Skip to content

Commit 1de50f9

Browse files
[po] auto sync
1 parent 5b0a456 commit 1de50f9

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

library/ctypes.po

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ msgid ""
594594
"Specifying a format protects against incompatible argument types (just as a "
595595
"prototype for a C function), and tries to convert the arguments to valid "
596596
"types::"
597-
msgstr ""
597+
msgstr "指定数据类型可以防止不合理的参数传递(就像C函数的函数签名),并且会自动尝试将参数转换为需要的类型::"
598598

599599
#: ../../library/ctypes.rst:431
600600
msgid ""
@@ -608,10 +608,15 @@ msgid ""
608608
"the result should be an integer, string, bytes, a :mod:`ctypes` instance, or"
609609
" an object with an :attr:`_as_parameter_` attribute."
610610
msgstr ""
611+
"如果你想通过自定义类型传递参数给函数,必须实现 :meth:`from_param` 类方法,才能够将此自定义类型用于 :attr:`argtypes`"
612+
" 序列。:meth:`from_param` 类方法接受一个 Python "
613+
"对象作为函数输入,它应该进行类型检查或者其他必要的操作以保证接收到的对象是合法的,然后返回这个对象,或者它的 "
614+
":attr:`_as_parameter_` 属性,或者其他你想要传递给 C 函数的参数。这里也一样,返回的结果必须是整型、字符串、二进制字符串、 "
615+
":mod:`ctypes` 类型,或者一个具有 :attr:`_as_parameter_` 属性的对象。"
611616

612617
#: ../../library/ctypes.rst:445
613618
msgid "Return types"
614-
msgstr ""
619+
msgstr "返回类型"
615620

616621
#: ../../library/ctypes.rst:447
617622
msgid ""

0 commit comments

Comments
 (0)