➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 vstinner
收信人 vstinner
日期 2020-05-05.13:59:58
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1588687198.83.0.363765201865.issue40513@roundup.psfhosted.org>
In-reply-to
内容
Python/ceval.c also has "int _Py_CheckRecursionLimit = Py_DEFAULT_RECURSION_LIMIT;". _Py_CheckRecursiveCall() has this comment:

    /* Needed for ABI backwards-compatibility (see bpo-31857) */
    _Py_CheckRecursionLimit = recursion_limit;

I converted Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() macros into opaque functions in bpo-38644: commit f4b1e3d7c64985f5d5b00f6cc9a1c146bbbfd613.

I don't think that the "ABI backwards-compatibility" rationale is correct. These macros never worked in the limited C API: they accessed PyThreadState.recursion_depth and PyThreadState.overflowed members, whereas the PyThreadState structure is opaque in the limited C API (on purpose, see also bpo-39947).

I think that it is now safe to simply remove _Py_CheckRecursionLimit.
历史
日期 用户 动作 参数
2020-05-05 13:59:58vstinner修改recipients: + vstinner
2020-05-05 13:59:58vstinner修改messageid: <1588687198.83.0.363765201865.issue40513@roundup.psfhosted.org>
2020-05-05 13:59:58vstinner链接issue40513 messages
2020-05-05 13:59:58vstinner创建