1111# Jing Li <[email protected] >, 202212121313# Bryan不可思议, 2023
14- # Freesand Leo <[email protected] >, 20241514# Rafael Fontenelle <[email protected] >, 202415+ # Freesand Leo <[email protected] >, 20241616#
1717#, fuzzy
1818msgid ""
@@ -21,7 +21,7 @@ msgstr ""
2121"Report-Msgid-Bugs-To : \n "
2222"POT-Creation-Date : 2024-01-26 21:13+0000\n "
2323"PO-Revision-Date : 2017-02-16 17:36+0000\n "
24- "Last-Translator : Rafael Fontenelle <rffontenelle@gmail .com>, 2024\n "
24+ "Last-Translator : Freesand Leo <yuqinju@163 .com>, 2024\n "
2525"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2626"MIME-Version : 1.0\n "
2727"Content-Type : text/plain; charset=UTF-8\n "
@@ -1282,6 +1282,8 @@ msgid ""
12821282"Every call to :c:func:`PyGILState_Ensure` must be matched by a call to "
12831283":c:func:`PyGILState_Release` on the same thread."
12841284msgstr ""
1285+ "对 :c:func:`PyGILState_Ensure` 的每次调用都必须与在同一线程上对 :c:func:`PyGILState_Release` "
1286+ "的调用相匹配。"
12851287
12861288#: ../../c-api/init.rst:957
12871289msgid ""
@@ -1290,6 +1292,8 @@ msgid ""
12901292" always has such a thread-state, even if no auto-thread-state call has been "
12911293"made on the main thread. This is mainly a helper/diagnostic function."
12921294msgstr ""
1295+ "获取此线程的当前线程状态。 如果当前线程上没有使用过 GILState API 则可以返回 ``NULL``。 "
1296+ "请注意主线程总是会有这样一个线程状态,即使没有在主线程上执行过自动线程状态调用。 这主要是一个辅助/诊断函数。"
12931297
12941298#: ../../c-api/init.rst:965
12951299msgid ""
@@ -1301,12 +1305,15 @@ msgid ""
13011305"knowing that the GIL is locked can allow the caller to perform sensitive "
13021306"actions or otherwise behave differently."
13031307msgstr ""
1308+ "如果当前线程持有 GIL 则返回 ``1`` 否则返回 ``0``。 此函数可以随时从任何线程调用。 只有当它的 Python "
1309+ "线程状态已经初始化并且当前持有 GIL 时它才会返回 ``1``。 这主要是一个辅助/诊断函数。 例如在回调上下文或内存分配函数中会很有用处,当知道 "
1310+ "GIL 被锁定时可以允许调用方执行敏感的操作或是在其他情况下做出不同的行为。"
13041311
13051312#: ../../c-api/init.rst:977
13061313msgid ""
13071314"The following macros are normally used without a trailing semicolon; look "
13081315"for example usage in the Python source distribution."
1309- msgstr ""
1316+ msgstr "以下的宏被使用时通常不带末尾分号;请在 Python 源代码发布包中查看示例用法。 "
13101317
13111318#: ../../c-api/init.rst:983
13121319msgid ""
@@ -1315,6 +1322,8 @@ msgid ""
13151322"matched with a following :c:macro:`Py_END_ALLOW_THREADS` macro. See above "
13161323"for further discussion of this macro."
13171324msgstr ""
1325+ "此宏会扩展为 ``{ PyThreadState *_save; _save = PyEval_SaveThread();``。 "
1326+ "请注意它包含一个开头花括号;它必须与后面的 :c:macro:`Py_END_ALLOW_THREADS` 宏匹配。 有关此宏的进一步讨论请参阅上文。"
13181327
13191328#: ../../c-api/init.rst:991
13201329msgid ""
0 commit comments