FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-docs-zh-tw/c-api/objbuffer.po at library/string · python/python-docs-zh-tw · GitHub
python
python-docs-zh-tw
Repository navigation
Code
Issues
33
(33)
Pull requests
12
(12)
Discussions
Actions
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
python-docs-zh-tw
/
c-api
/
objbuffer.po
Copy path
More file actions
More file actions
Latest commit
History
History
History
105 lines (97 loc) · 5.04 KB
Breadcrumbs
python-docs-zh-tw
/
c-api
/
objbuffer.po
Copy path
File metadata and controls
105 lines (97 loc) · 5.04 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#
SOME DESCRIPTIVE TITLE.
#
Copyright (C) 2001-2022, Python Software Foundation
#
This file is distributed under the same license as the Python package.
#
#
Translators:
#
Liang-Bo Wang <me@liang2.tw>, 2015
#
Matt Wang <mattwang44@gmail.com>, 2023
msgid ""
msgstr ""
"
Project-Id-Version
:
Python 3.12\n
"
"
Report-Msgid-Bugs-To
:
\n
"
"
POT-Creation-Date
:
2020-06-20 18:08+0800\n
"
"
PO-Revision-Date
:
2023-07-01 04:33+0800\n
"
"
Last-Translator
:
Matt Wang <mattwang44@gmail.com>\n
"
"
Language-Team
:
Chinese - TAIWAN (https://github.com/python/python-docs-zh-
"
"
tw)\n
"
"
Language
:
zh_TW\n
"
"
MIME-Version
:
1.0\n
"
"
Content-Type
:
text/plain; charset=UTF-8\n
"
"
Content-Transfer-Encoding
:
8bit\n
"
"
Plural-Forms
:
nplurals=1; plural=0;\n
"
"
X-Generator
:
Poedit 3.3.2\n
"
#:
../../c-api/objbuffer.rst:4
msgid
"Old Buffer Protocol"
msgstr
"舊式緩衝協定 (Buffer Protocol)"
#:
../../c-api/objbuffer.rst:8
msgid
""
"These functions were part of the
\"
old buffer protocol
\"
API in Python 2. In "
"Python 3, this protocol doesn't exist anymore but the functions are still "
"exposed to ease porting 2.x code. They act as a compatibility wrapper "
"around the :ref:`new buffer protocol <bufferobjects>`, but they don't give "
"you control over the lifetime of the resources acquired when a buffer is "
"exported."
msgstr
""
"這些函式是 Python 2 中「舊式緩衝區協定」API 的一部分。在 Python 3 中,該協議"
"已經不存在,但這些函式仍有公開以供移植 2.x 程式碼。它們充當
\\
:ref:`新式緩衝"
"區協定 <bufferobjects>`
\\
的相容性包裝器,但它們無法讓你控制匯出 (export) 緩"
"衝區時所獲取資源的生命週期。"
#:
../../c-api/objbuffer.rst:15
msgid
""
"Therefore, it is recommended that you call :c:func:`PyObject_GetBuffer` (or "
"the ``y*`` or ``w*`` :ref:`format codes <arg-parsing>` with the :c:func:"
"`PyArg_ParseTuple` family of functions) to get a buffer view over an object, "
"and :c:func:`PyBuffer_Release` when the buffer view can be released."
msgstr
""
"因此,建議你呼叫 :c:func:`PyObject_GetBuffer` (或是以 ``y*`` 或 ``w*`` :ref:"
"`格式碼 (format code) <arg-parsing>` 呼叫 :c:func:`PyArg_ParseTuple` 系列函"
"式)獲取物件的緩衝區視圖 (buffer view),以及緩衝區視圖可被釋放時呼叫 :c:func:"
"`PyBuffer_Release` 。"
#:
../../c-api/objbuffer.rst:23
msgid
""
"Returns a pointer to a read-only memory location usable as character-based "
"input. The *obj* argument must support the single-segment character buffer "
"interface. On success, returns ``0``, sets *buffer* to the memory location "
"and *buffer_len* to the buffer length. Returns ``-1`` and sets a :exc:"
"`TypeError` on error."
msgstr
""
"回傳一個指向可用作基於字元輸入之唯讀記憶體位置的指標。 *obj* 引數必須支援單一"
"片段 (single-segment) 字元緩衝區介面。成功時回傳 ``0``,並將 *buffer* 設定為"
"記憶體位置、將 *buffer_len* 設定為緩衝區長度。回傳 ``-1`` 並在錯誤時設定 :"
"exc:`TypeError`。"
#:
../../c-api/objbuffer.rst:32
msgid
""
"Returns a pointer to a read-only memory location containing arbitrary data. "
"The *obj* argument must support the single-segment readable buffer "
"interface. On success, returns ``0``, sets *buffer* to the memory location "
"and *buffer_len* to the buffer length. Returns ``-1`` and sets a :exc:"
"`TypeError` on error."
msgstr
""
"回傳一個指向包含任意資料之唯讀記憶體位置的指標。*obj* 引數必須支援單一片段可"
"讀緩衝區介面。成功時回傳 ``0``,並將 *buffer* 設定為記憶體位置、將 "
"*buffer_len* 設定為緩衝區長度。回傳 ``-1`` 並在錯誤時設定 :exc:`TypeError`。"
#:
../../c-api/objbuffer.rst:41
msgid
""
"Returns ``1`` if *o* supports the single-segment readable buffer interface. "
"Otherwise returns ``0``. This function always succeeds."
msgstr
""
"如果 *o* 支援單一片段可讀緩衝區介面,則回傳 ``1``,否則回傳 ``0``。這個函式一"
"定會執行成功的。"
#:
../../c-api/objbuffer.rst:44
msgid
""
"Note that this function tries to get and release a buffer, and exceptions "
"which occur while calling corresponding functions will get suppressed. To "
"get error reporting use :c:func:`PyObject_GetBuffer()` instead."
msgstr
""
"請注意,該函式嘗試獲取和釋放緩衝區,並且呼叫相應函式時發生的例外將被抑制。要"
"獲取錯誤報告,請改用 :c:func:`PyObject_GetBuffer()`。"
#:
../../c-api/objbuffer.rst:51
msgid
""
"Returns a pointer to a writable memory location. The *obj* argument must "
"support the single-segment, character buffer interface. On success, returns "
"``0``, sets *buffer* to the memory location and *buffer_len* to the buffer "
"length. Returns ``-1`` and sets a :exc:`TypeError` on error."
msgstr
""
"回傳指向可寫記憶體位置的指標。 *obj* 引數必須支援單一片段字元緩衝區介面。成功"
"時回傳 ``0``,並將 *buffer* 設定為記憶體位置,且將 *buffer_len* 設定為緩衝區"
"長度。回傳 ``-1`` 並在錯誤時設定 :exc:`TypeError`。"
Back
|
FazBrowse Home
|
New Git URL