Skip to content

Commit cc42c1f

Browse files
Move Py_DEFAULT_RECURSION_LIMIT to a header file.
1 parent 7d8974f commit cc42c1f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Include/internal/pycore_ceval.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@ extern "C" {
1212
struct pyruntimestate;
1313
struct _ceval_runtime_state;
1414

15+
#ifndef Py_DEFAULT_RECURSION_LIMIT
16+
# define Py_DEFAULT_RECURSION_LIMIT 1000
17+
#endif
18+
1519
#include "pycore_interp.h" // PyInterpreterState.eval_frame
1620
#include "pycore_pystate.h" // _PyThreadState_GET()
1721

22+
1823
extern void _Py_FinishPendingCalls(PyThreadState *tstate);
1924
extern void _PyEval_InitRuntimeState(struct _ceval_runtime_state *);
2025
extern void _PyEval_InitState(struct _ceval_state *, PyThread_type_lock);

Python/ceval.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -737,10 +737,6 @@ Py_MakePendingCalls(void)
737737

738738
/* The interpreter's recursion limit */
739739

740-
#ifndef Py_DEFAULT_RECURSION_LIMIT
741-
# define Py_DEFAULT_RECURSION_LIMIT 1000
742-
#endif
743-
744740
void
745741
_PyEval_InitRuntimeState(struct _ceval_runtime_state *ceval)
746742
{

0 commit comments

Comments
 (0)