7
7
msgstr ""
8
8
"Project-Id-Version :Python 3.13\n "
9
9
"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 "
11
11
"PO-Revision-Date :2023-01-24 21:07+0800\n "
12
12
"Last-Translator :Matt Wang <mattwang44@gmail.com>\n "
13
13
"Language-Team :Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -132,10 +132,11 @@ msgid "Limited C API"
132
132
msgstr "受限 C API"
133
133
134
134
#: ../../c-api/stable.rst:67
135
+ #, fuzzy
135
136
msgid ""
136
137
"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
+ "on multiple versions of Python. Contents of the Limited API are :ref:`listed "
139
140
"below <limited-api-list>`."
140
141
msgstr ""
141
142
"Python 3.2 引入了\\ *受限 API (Limited API)*,它是 Python C API 的一個子集。"
@@ -150,12 +151,12 @@ msgstr ""
150
151
"在包含 ``Python.h`` 之前定義此巨集以選擇只使用受限 API,並挑選受限 API 版本。"
151
152
152
153
#: ../../c-api/stable.rst:77
154
+ #, fuzzy
153
155
msgid ""
154
156
"Define ``Py_LIMITED_API`` to the value of :c:macro:`PY_VERSION_HEX` "
155
157
"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."
159
160
msgstr ""
160
161
"將 ``Py_LIMITED_API`` 定義為對應於你的擴充有支援的最低 Python 版本的 :c:"
161
162
"macro:`PY_VERSION_HEX` 值。該擴充無需重新編譯即可與從指定版本開始的所有 "
@@ -184,14 +185,24 @@ msgid "Stable ABI"
184
185
msgstr "穩定 ABI"
185
186
186
187
#: ../../c-api/stable.rst:96
188
+ #, fuzzy
187
189
msgid ""
188
190
"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."
190
192
msgstr ""
191
193
"為了實現它,Python 提供了一個\\ *穩定 ABI (Stable ABI)*:一組將在各個 Python "
192
194
"3.x 版本之間保持相容的符號。"
193
195
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
195
206
msgid ""
196
207
"The Stable ABI contains symbols exposed in the :ref:`Limited API <limited-c-"
197
208
"api>`, but also other ones – for example, functions necessary to support "
@@ -200,7 +211,7 @@ msgstr ""
200
211
"穩定 ABI 被包含在\\ :ref:`受限 API <limited-c-api>` 中開放的符號,但也包含其"
201
212
"他符號 - 例如,支援舊版受限 API 所必需的函式。"
202
213
203
- #: ../../c-api/stable.rst:103
214
+ #: ../../c-api/stable.rst:111
204
215
msgid ""
205
216
"On Windows, extensions that use the Stable ABI should be linked against "
206
217
"``python3.dll`` rather than a version-specific library such as ``python39."
@@ -209,7 +220,7 @@ msgstr ""
209
220
"在 Windows 上,使用穩定 ABI 的擴充應該連接到 ``python3.dll`` 而不是特定版本的"
210
221
"函式庫,例如 ``python39.dll``。"
211
222
212
- #: ../../c-api/stable.rst:107
223
+ #: ../../c-api/stable.rst:115
213
224
msgid ""
214
225
"On some platforms, Python will look for and load shared library files named "
215
226
"with the ``abi3`` tag (e.g. ``mymodule.abi3.so``). It does not check if such "
@@ -222,7 +233,7 @@ msgstr ""
222
233
"用者(或者打包工具)身上,例如使用 3.10+ 受限 API 建置的擴充不會為較低版本的 "
223
234
"Python 所安裝。"
224
235
225
- #: ../../c-api/stable.rst:114
236
+ #: ../../c-api/stable.rst:122
226
237
msgid ""
227
238
"All functions in the Stable ABI are present as functions in Python's shared "
228
239
"library, not solely as macros. This makes them usable from languages that "
@@ -231,18 +242,18 @@ msgstr ""
231
242
"穩定 ABI 中的所有函式都作為函式存在於 Python 的共享函式庫中,而不僅是作為巨"
232
243
"集。這使得它們可被用於不使用 C 預處理器 (preprocessor) 的語言。"
233
244
234
- #: ../../c-api/stable.rst:120
245
+ #: ../../c-api/stable.rst:128
235
246
msgid "Limited API Scope and Performance"
236
247
msgstr "受限 API 範圍和性能"
237
248
238
- #: ../../c-api/stable.rst:122
249
+ #: ../../c-api/stable.rst:130
239
250
msgid ""
240
251
"The goal for the Limited API is to allow everything that is possible with "
241
252
"the full C API, but possibly with a performance penalty."
242
253
msgstr ""
243
254
"受限 API 的目標是允許使用完整的 C API 進行所有可能的操作,但可能會降低性能。"
244
255
245
- #: ../../c-api/stable.rst:125
256
+ #: ../../c-api/stable.rst:133
246
257
msgid ""
247
258
"For example, while :c:func:`PyList_GetItem` is available, its “unsafe” macro "
248
259
"variant :c:func:`PyList_GET_ITEM` is not. The macro can be faster because it "
@@ -252,7 +263,7 @@ msgstr ""
252
263
"`PyList_GET_ITEM` 為不可用。巨集運行可以更快,因為它可以依賴 list 物件的特定"
253
264
"版本實作細節。"
254
265
255
- #: ../../c-api/stable.rst:130
266
+ #: ../../c-api/stable.rst:138
256
267
msgid ""
257
268
"Without ``Py_LIMITED_API`` defined, some C API functions are inlined or "
258
269
"replaced by macros. Defining ``Py_LIMITED_API`` disables this inlining, "
@@ -263,7 +274,7 @@ msgstr ""
263
274
"``Py_LIMITED_API`` 會禁用嵌入,從而隨著 Python 資料結構的改進而提高穩定性,但"
264
275
"可能會降低性能。"
265
276
266
- #: ../../c-api/stable.rst:135
277
+ #: ../../c-api/stable.rst:143
267
278
msgid ""
268
279
"By leaving out the ``Py_LIMITED_API`` definition, it is possible to compile "
269
280
"a Limited API extension with a version-specific ABI. This can improve "
@@ -277,11 +288,11 @@ msgstr ""
277
288
"將產生一個擴充,可以在特定版本的擴充不可用的地方發布 — 例如,用於即將發布的 "
278
289
"Python 版本的預發布版本 (prerelease)。"
279
290
280
- #: ../../c-api/stable.rst:144
291
+ #: ../../c-api/stable.rst:152
281
292
msgid "Limited API Caveats"
282
293
msgstr "受限 API 注意事項"
283
294
284
- #: ../../c-api/stable.rst:146
295
+ #: ../../c-api/stable.rst:154
285
296
msgid ""
286
297
"Note that compiling with ``Py_LIMITED_API`` is *not* a complete guarantee "
287
298
"that code conforms to the :ref:`Limited API <limited-c-api>` or the :ref:"
@@ -293,7 +304,7 @@ msgstr ""
293
304
"``Py_LIMITED_API`` 僅涵蓋定義,但 API 還包括其他議題,例如預期的語義 "
294
305
"(semantic)。"
295
306
296
- #: ../../c-api/stable.rst:151
307
+ #: ../../c-api/stable.rst:159
297
308
msgid ""
298
309
"One issue that ``Py_LIMITED_API`` does not guard against is calling a "
299
310
"function with arguments that are invalid in a lower Python version. For "
@@ -307,23 +318,23 @@ msgstr ""
307
318
"現在代表選擇預設行為,但在 Python 3.8 中,引數將被直接使用,導致 ``NULL`` 取"
308
319
"消參照 (dereference) 且崩潰 (crash)。類似的引數適用於結構 (struct) 的欄位。"
309
320
310
- #: ../../c-api/stable.rst:158
321
+ #: ../../c-api/stable.rst:166
311
322
msgid ""
312
323
"Another issue is that some struct fields are currently not hidden when "
313
324
"``Py_LIMITED_API`` is defined, even though they're part of the Limited API."
314
325
msgstr ""
315
326
"另一個問題是,當有定義 ``Py_LIMITED_API`` 時,一些結構欄位目前不會被隱藏,即"
316
327
"使它們是受限 API 的一部分。"
317
328
318
- #: ../../c-api/stable.rst:161
329
+ #: ../../c-api/stable.rst:169
319
330
msgid ""
320
331
"For these reasons, we recommend testing an extension with *all* minor Python "
321
332
"versions it supports, and preferably to build with the *lowest* such version."
322
333
msgstr ""
323
334
"出於這些原因,我們建議要以它支援的\\ *所有*\\ 次要 Python 版本來測試擴充,並"
324
335
"且最好使用\\ *最低*\\ 版本進行建置。"
325
336
326
- #: ../../c-api/stable.rst:164
337
+ #: ../../c-api/stable.rst:172
327
338
msgid ""
328
339
"We also recommend reviewing documentation of all used API to check if it is "
329
340
"explicitly part of the Limited API. Even with ``Py_LIMITED_API`` defined, a "
@@ -334,7 +345,7 @@ msgstr ""
334
345
"義 ``Py_LIMITED_API``,一些私有聲明也會因為技術原因(或者甚至是無意地,例如臭"
335
346
"蟲)而被公開出來。"
336
347
337
- #: ../../c-api/stable.rst:169
348
+ #: ../../c-api/stable.rst:177
338
349
msgid ""
339
350
"Also note that the Limited API is not necessarily stable: compiling with "
340
351
"``Py_LIMITED_API`` with Python 3.8 means that the extension will run with "
@@ -346,11 +357,11 @@ msgstr ""
346
357
"行編譯意味著擴充將能以 Python 3.12 運行,但不一定能以 Python 3.12 *編譯*。特"
347
358
"別是如果穩定 ABI 保持穩定,部分受限 API 可能會被棄用和刪除。"
348
359
349
- #: ../../c-api/stable.rst:179
360
+ #: ../../c-api/stable.rst:187
350
361
msgid "Platform Considerations"
351
362
msgstr "平台注意事項"
352
363
353
- #: ../../c-api/stable.rst:181
364
+ #: ../../c-api/stable.rst:189
354
365
msgid ""
355
366
"ABI stability depends not only on Python, but also on the compiler used, "
356
367
"lower-level libraries and compiler options. For the purposes of the :ref:"
@@ -361,7 +372,7 @@ msgstr ""
361
372
"於\\ :ref:`穩定 ABI <stable-abi>` 的目的,這些細節定義了一個「平台」。它們通"
362
373
"常取決於作業系統種類和處理器架構"
363
374
364
- #: ../../c-api/stable.rst:186
375
+ #: ../../c-api/stable.rst:194
365
376
msgid ""
366
377
"It is the responsibility of each particular distributor of Python to ensure "
367
378
"that all Python versions on a particular platform are built in a way that "
@@ -372,11 +383,11 @@ msgstr ""
372
383
"定 ABI 的方式建置。``python.org`` 和許多第三方發布者發布的 Windows 和 macOS "
373
384
"版本就是這種情況。"
374
385
375
- #: ../../c-api/stable.rst:196
386
+ #: ../../c-api/stable.rst:204
376
387
msgid "Contents of Limited API"
377
388
msgstr "受限 API 的內容"
378
389
379
- #: ../../c-api/stable.rst:199
390
+ #: ../../c-api/stable.rst:207
380
391
msgid ""
381
392
"Currently, the :ref:`Limited API <limited-c-api>` includes the following "
382
393
"items:"