mirror of
https://github.com/python/cpython.git
synced 2025-12-07 13:50:06 +00:00
gh-130396: Remove _Py_ReachedRecursionLimitWithMargin() function (#141951)
Move the private function to the internal C API (pycore_ceval.h).
This commit is contained in:
parent
bc9e63dd9d
commit
7fe1a18b77
4 changed files with 6 additions and 2 deletions
|
|
@ -436,8 +436,6 @@ PyAPI_FUNC(void) _Py_NO_RETURN _PyObject_AssertFailed(
|
|||
PyAPI_FUNC(void) _PyTrash_thread_deposit_object(PyThreadState *tstate, PyObject *op);
|
||||
PyAPI_FUNC(void) _PyTrash_thread_destroy_chain(PyThreadState *tstate);
|
||||
|
||||
PyAPI_FUNC(int) _Py_ReachedRecursionLimitWithMargin(PyThreadState *tstate, int margin_count);
|
||||
|
||||
/* For backwards compatibility with the old trashcan mechanism */
|
||||
#define Py_TRASHCAN_BEGIN(op, dealloc)
|
||||
#define Py_TRASHCAN_END
|
||||
|
|
|
|||
|
|
@ -263,6 +263,10 @@ static inline int _Py_ReachedRecursionLimit(PyThreadState *tstate) {
|
|||
#endif
|
||||
}
|
||||
|
||||
extern int _Py_ReachedRecursionLimitWithMargin(
|
||||
PyThreadState *tstate,
|
||||
int margin_count);
|
||||
|
||||
static inline void _Py_LeaveRecursiveCall(void) {
|
||||
}
|
||||
|
||||
|
|
|
|||
1
Parser/parser.c
generated
1
Parser/parser.c
generated
|
|
@ -1,5 +1,6 @@
|
|||
// @generated by pegen from python.gram
|
||||
#include "pegen.h"
|
||||
#include "pycore_ceval.h"
|
||||
|
||||
#if defined(Py_DEBUG) && defined(Py_BUILD_CORE)
|
||||
# define D(x) if (p->debug) { x; }
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
EXTENSION_PREFIX = """\
|
||||
#include "pegen.h"
|
||||
#include "pycore_ceval.h"
|
||||
|
||||
#if defined(Py_DEBUG) && defined(Py_BUILD_CORE)
|
||||
# define D(x) if (p->debug) { x; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue