Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitccde837

Browse files
sync with cpython b90161f6
1 parentf4a27f0 commitccde837

File tree

1 file changed

+39
-28
lines changed

1 file changed

+39
-28
lines changed

‎c-api/stable.po

Lines changed: 39 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version:Python 3.13\n"
99
"Report-Msgid-Bugs-To:\n"
10-
"POT-Creation-Date:2024-01-19 00:03+0000\n"
10+
"POT-Creation-Date:2024-12-04 00:14+0000\n"
1111
"PO-Revision-Date:2023-01-24 21:07+0800\n"
1212
"Last-Translator:Matt Wang <mattwang44@gmail.com>\n"
1313
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -132,10 +132,11 @@ msgid "Limited C API"
132132
msgstr"受限 C API"
133133

134134
#:../../c-api/stable.rst:67
135+
#,fuzzy
135136
msgid""
136137
"Python 3.2 introduced the *Limited API*, a subset of Python's C API. "
137-
"Extensions that only use the Limited API can be compiled once andwork with "
138-
"multiple versions of Python. Contents of the Limited API are :ref:`listed "
138+
"Extensions that only use the Limited API can be compiled once andbe loaded "
139+
"onmultiple versions of Python. Contents of the Limited API are :ref:`listed "
139140
"below <limited-api-list>`."
140141
msgstr""
141142
"Python 3.2 引入了\\ *受限 API (Limited API)*,它是 Python C API 的一個子集。"
@@ -150,12 +151,12 @@ msgstr ""
150151
"在包含 ``Python.h`` 之前定義此巨集以選擇只使用受限 API,並挑選受限 API 版本。"
151152

152153
#:../../c-api/stable.rst:77
154+
#,fuzzy
153155
msgid""
154156
"Define ``Py_LIMITED_API`` to the value of :c:macro:`PY_VERSION_HEX` "
155157
"corresponding to the lowest Python version your extension supports. The "
156-
"extension will work without recompilation with all Python 3 releases from "
157-
"the specified one onward, and can use Limited API introduced up to that "
158-
"version."
158+
"extension will be ABI-compatible with all Python 3 releases from the "
159+
"specified one onward, and can use Limited API introduced up to that version."
159160
msgstr""
160161
"將 ``Py_LIMITED_API`` 定義為對應於你的擴充有支援的最低 Python 版本的 :c:"
161162
"macro:`PY_VERSION_HEX` 值。該擴充無需重新編譯即可與從指定版本開始的所有 "
@@ -184,14 +185,24 @@ msgid "Stable ABI"
184185
msgstr"穩定 ABI"
185186

186187
#:../../c-api/stable.rst:96
188+
#,fuzzy
187189
msgid""
188190
"To enable this, Python provides a *Stable ABI*: a set of symbols that will "
189-
"remain compatible across Python 3.x versions."
191+
"remainABI-compatible across Python 3.x versions."
190192
msgstr""
191193
"為了實現它,Python 提供了一個\\ *穩定 ABI (Stable ABI)*:一組將在各個 Python "
192194
"3.x 版本之間保持相容的符號。"
193195

194-
#:../../c-api/stable.rst:99
196+
#:../../c-api/stable.rst:101
197+
msgid""
198+
"The Stable ABI prevents ABI issues, like linker errors due to missing "
199+
"symbols or data corruption due to changes in structure layouts or function "
200+
"signatures. However, other changes in Python can change the *behavior* of "
201+
"extensions. See Python's Backwards Compatibility Policy (:pep:`387`) for "
202+
"details."
203+
msgstr""
204+
205+
#:../../c-api/stable.rst:107
195206
msgid""
196207
"The Stable ABI contains symbols exposed in the :ref:`Limited API <limited-c-"
197208
"api>`, but also other ones – for example, functions necessary to support "
@@ -200,7 +211,7 @@ msgstr ""
200211
"穩定 ABI 被包含在\\ :ref:`受限 API <limited-c-api>` 中開放的符號,但也包含其"
201212
"他符號 - 例如,支援舊版受限 API 所必需的函式。"
202213

203-
#:../../c-api/stable.rst:103
214+
#:../../c-api/stable.rst:111
204215
msgid""
205216
"On Windows, extensions that use the Stable ABI should be linked against "
206217
"``python3.dll`` rather than a version-specific library such as ``python39."
@@ -209,7 +220,7 @@ msgstr ""
209220
"在 Windows 上,使用穩定 ABI 的擴充應該連接到 ``python3.dll`` 而不是特定版本的"
210221
"函式庫,例如 ``python39.dll``。"
211222

212-
#:../../c-api/stable.rst:107
223+
#:../../c-api/stable.rst:115
213224
msgid""
214225
"On some platforms, Python will look for and load shared library files named "
215226
"with the ``abi3`` tag (e.g. ``mymodule.abi3.so``). It does not check if such "
@@ -222,7 +233,7 @@ msgstr ""
222233
"用者(或者打包工具)身上,例如使用 3.10+ 受限 API 建置的擴充不會為較低版本的 "
223234
"Python 所安裝。"
224235

225-
#:../../c-api/stable.rst:114
236+
#:../../c-api/stable.rst:122
226237
msgid""
227238
"All functions in the Stable ABI are present as functions in Python's shared "
228239
"library, not solely as macros. This makes them usable from languages that "
@@ -231,18 +242,18 @@ msgstr ""
231242
"穩定 ABI 中的所有函式都作為函式存在於 Python 的共享函式庫中,而不僅是作為巨"
232243
"集。這使得它們可被用於不使用 C 預處理器 (preprocessor) 的語言。"
233244

234-
#:../../c-api/stable.rst:120
245+
#:../../c-api/stable.rst:128
235246
msgid"Limited API Scope and Performance"
236247
msgstr"受限 API 範圍和性能"
237248

238-
#:../../c-api/stable.rst:122
249+
#:../../c-api/stable.rst:130
239250
msgid""
240251
"The goal for the Limited API is to allow everything that is possible with "
241252
"the full C API, but possibly with a performance penalty."
242253
msgstr""
243254
"受限 API 的目標是允許使用完整的 C API 進行所有可能的操作,但可能會降低性能。"
244255

245-
#:../../c-api/stable.rst:125
256+
#:../../c-api/stable.rst:133
246257
msgid""
247258
"For example, while :c:func:`PyList_GetItem` is available, its “unsafe” macro "
248259
"variant :c:func:`PyList_GET_ITEM` is not. The macro can be faster because it "
@@ -252,7 +263,7 @@ msgstr ""
252263
"`PyList_GET_ITEM` 為不可用。巨集運行可以更快,因為它可以依賴 list 物件的特定"
253264
"版本實作細節。"
254265

255-
#:../../c-api/stable.rst:130
266+
#:../../c-api/stable.rst:138
256267
msgid""
257268
"Without ``Py_LIMITED_API`` defined, some C API functions are inlined or "
258269
"replaced by macros. Defining ``Py_LIMITED_API`` disables this inlining, "
@@ -263,7 +274,7 @@ msgstr ""
263274
"``Py_LIMITED_API`` 會禁用嵌入,從而隨著 Python 資料結構的改進而提高穩定性,但"
264275
"可能會降低性能。"
265276

266-
#:../../c-api/stable.rst:135
277+
#:../../c-api/stable.rst:143
267278
msgid""
268279
"By leaving out the ``Py_LIMITED_API`` definition, it is possible to compile "
269280
"a Limited API extension with a version-specific ABI. This can improve "
@@ -277,11 +288,11 @@ msgstr ""
277288
"將產生一個擴充,可以在特定版本的擴充不可用的地方發布 — 例如,用於即將發布的 "
278289
"Python 版本的預發布版本 (prerelease)。"
279290

280-
#:../../c-api/stable.rst:144
291+
#:../../c-api/stable.rst:152
281292
msgid"Limited API Caveats"
282293
msgstr"受限 API 注意事項"
283294

284-
#:../../c-api/stable.rst:146
295+
#:../../c-api/stable.rst:154
285296
msgid""
286297
"Note that compiling with ``Py_LIMITED_API`` is *not* a complete guarantee "
287298
"that code conforms to the :ref:`Limited API <limited-c-api>` or the :ref:"
@@ -293,7 +304,7 @@ msgstr ""
293304
"``Py_LIMITED_API`` 僅涵蓋定義,但 API 還包括其他議題,例如預期的語義 "
294305
"(semantic)。"
295306

296-
#:../../c-api/stable.rst:151
307+
#:../../c-api/stable.rst:159
297308
msgid""
298309
"One issue that ``Py_LIMITED_API`` does not guard against is calling a "
299310
"function with arguments that are invalid in a lower Python version. For "
@@ -307,23 +318,23 @@ msgstr ""
307318
"現在代表選擇預設行為,但在 Python 3.8 中,引數將被直接使用,導致 ``NULL`` 取"
308319
"消參照 (dereference) 且崩潰 (crash)。類似的引數適用於結構 (struct) 的欄位。"
309320

310-
#:../../c-api/stable.rst:158
321+
#:../../c-api/stable.rst:166
311322
msgid""
312323
"Another issue is that some struct fields are currently not hidden when "
313324
"``Py_LIMITED_API`` is defined, even though they're part of the Limited API."
314325
msgstr""
315326
"另一個問題是,當有定義 ``Py_LIMITED_API`` 時,一些結構欄位目前不會被隱藏,即"
316327
"使它們是受限 API 的一部分。"
317328

318-
#:../../c-api/stable.rst:161
329+
#:../../c-api/stable.rst:169
319330
msgid""
320331
"For these reasons, we recommend testing an extension with *all* minor Python "
321332
"versions it supports, and preferably to build with the *lowest* such version."
322333
msgstr""
323334
"出於這些原因,我們建議要以它支援的\\ *所有*\\ 次要 Python 版本來測試擴充,並"
324335
"且最好使用\\ *最低*\\ 版本進行建置。"
325336

326-
#:../../c-api/stable.rst:164
337+
#:../../c-api/stable.rst:172
327338
msgid""
328339
"We also recommend reviewing documentation of all used API to check if it is "
329340
"explicitly part of the Limited API. Even with ``Py_LIMITED_API`` defined, a "
@@ -334,7 +345,7 @@ msgstr ""
334345
"義 ``Py_LIMITED_API``,一些私有聲明也會因為技術原因(或者甚至是無意地,例如臭"
335346
"蟲)而被公開出來。"
336347

337-
#:../../c-api/stable.rst:169
348+
#:../../c-api/stable.rst:177
338349
msgid""
339350
"Also note that the Limited API is not necessarily stable: compiling with "
340351
"``Py_LIMITED_API`` with Python 3.8 means that the extension will run with "
@@ -346,11 +357,11 @@ msgstr ""
346357
"行編譯意味著擴充將能以 Python 3.12 運行,但不一定能以 Python 3.12 *編譯*。特"
347358
"別是如果穩定 ABI 保持穩定,部分受限 API 可能會被棄用和刪除。"
348359

349-
#:../../c-api/stable.rst:179
360+
#:../../c-api/stable.rst:187
350361
msgid"Platform Considerations"
351362
msgstr"平台注意事項"
352363

353-
#:../../c-api/stable.rst:181
364+
#:../../c-api/stable.rst:189
354365
msgid""
355366
"ABI stability depends not only on Python, but also on the compiler used, "
356367
"lower-level libraries and compiler options. For the purposes of the :ref:"
@@ -361,7 +372,7 @@ msgstr ""
361372
"於\\ :ref:`穩定 ABI <stable-abi>` 的目的,這些細節定義了一個「平台」。它們通"
362373
"常取決於作業系統種類和處理器架構"
363374

364-
#:../../c-api/stable.rst:186
375+
#:../../c-api/stable.rst:194
365376
msgid""
366377
"It is the responsibility of each particular distributor of Python to ensure "
367378
"that all Python versions on a particular platform are built in a way that "
@@ -372,11 +383,11 @@ msgstr ""
372383
"定 ABI 的方式建置。``python.org`` 和許多第三方發布者發布的 Windows 和 macOS "
373384
"版本就是這種情況。"
374385

375-
#:../../c-api/stable.rst:196
386+
#:../../c-api/stable.rst:204
376387
msgid"Contents of Limited API"
377388
msgstr"受限 API 的內容"
378389

379-
#:../../c-api/stable.rst:199
390+
#:../../c-api/stable.rst:207
380391
msgid""
381392
"Currently, the :ref:`Limited API <limited-c-api>` includes the following "
382393
"items:"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp