@@ -213,19 +213,22 @@ msgid ""
213213"the argument will be used directly, causing a ``NULL`` dereference and "
214214"crash. A similar argument works for fields of structs."
215215msgstr ""
216+ "``Py_LIMITED_API`` 不能处理的一个问题是附带在较低 Python 版本中无效的参数调用某个函数。 例如,考虑一个接受 ``NULL``"
217+ " 作为参数的函数。 在 Python 3.9 中,``NULL`` 现在会选择一个默认行为,但在 Python 3.8 中,该参数将被直接使用,导致一个"
218+ " ``NULL`` 引用被崩溃。 类似的参数也适用于结构体的字段。"
216219
217220#: ../../c-api/stable.rst:115
218221msgid ""
219222"Another issue is that some struct fields are currently not hidden when "
220223"``Py_LIMITED_API`` is defined, even though they're part of the Limited API."
221- msgstr ""
224+ msgstr "另一个问题是当定义了 ``Py_LIMITED_API`` 时某些结构体字段目前不会被隐藏,即使它们是受限 API 的一部分。 "
222225
223226#: ../../c-api/stable.rst:118
224227msgid ""
225228"For these reasons, we recommend testing an extension with *all* minor Python"
226229" versions it supports, and preferably to build with the *lowest* such "
227230"version."
228- msgstr ""
231+ msgstr "出于这些原因,我们建议用要支持的 *所有* Python 小版本号来测试一个扩展,并最好是用其中 *最低* 的版本来编译它。 "
229232
230233#: ../../c-api/stable.rst:121
231234msgid ""
@@ -234,6 +237,8 @@ msgid ""
234237"few private declarations are exposed for technical reasons (or even "
235238"unintentionally, as bugs)."
236239msgstr ""
240+ "我们还建议查看所使用 API 的全部文档以检查其是否显式指明为受限 API 的一部分。 即使定义了 "
241+ "``Py_LIMITED_API``,少数私有声明还是会出于技术原因(或者甚至是作为程序缺陷在无意中)被暴露出来。"
237242
238243#: ../../c-api/stable.rst:126
239244msgid ""
@@ -243,10 +248,13 @@ msgid ""
243248"particular, parts of the Limited API may be deprecated and removed, provided"
244249" that the Stable ABI stays stable."
245250msgstr ""
251+ "还要注意受限 API 并不必然是稳定的:在 Python 3.8 上用 ``Py_LIMITED_API`` 编译扩展意味着该扩展能在 Python "
252+ "3.12 上运行,但它将不一定能用 Python 3.12 *编译*。 特别地,在稳定 ABI 保持稳定的情况下,部分受限 API "
253+ "可能会被弃用并被移除。"
246254
247255#: ../../c-api/stable.rst:136
248256msgid "Platform Considerations"
249- msgstr ""
257+ msgstr "平台的考虑 "
250258
251259#: ../../c-api/stable.rst:138
252260msgid ""
@@ -255,6 +263,8 @@ msgid ""
255263"ABI, these details define a “platform”. They usually depend on the OS type "
256264"and processor architecture"
257265msgstr ""
266+ "ABI 的稳定性不仅取决于 Python,还取决于所使用的编译器、低层库和编译器选项。 对于稳定 ABI 的目标来说,这些细节定义了一个 “平台”。 "
267+ "它们通常会取决于 OS 类型和处理器架构。"
258268
259269#: ../../c-api/stable.rst:143
260270msgid ""
@@ -263,11 +273,13 @@ msgid ""
263273"does not break the Stable ABI. This is the case with Windows and macOS "
264274"releases from ``python.org`` and many third-party distributors."
265275msgstr ""
276+ "确保在特定平台上的所有 Python 版本都以不破坏稳定 ABI 的方式构建是每个特定 Python 分发方的责任。 来自 ``python.org``"
277+ " 以及许多第三方分发商的 Windows 和 macOS 发布版都必于这种情况。"
266278
267279#: ../../c-api/stable.rst:153
268280msgid "Contents of Limited API"
269- msgstr ""
281+ msgstr "受限 API 的内容 "
270282
271283#: ../../c-api/stable.rst:156
272284msgid "Currently, the Limited API includes the following items:"
273- msgstr ""
285+ msgstr "目前,受限 API 包括下面这些项: "
0 commit comments