Skip to content

Commit 5186de3

Browse files
committed
move STACK_USE_GUIDELINNE to pycore_compile.h
1 parent 98fa4a4 commit 5186de3

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Include/internal/pycore_compile.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ extern "C" {
1414
#include "pycore_symtable.h" // _Py_SourceLocation
1515
#include "pycore_instruction_sequence.h"
1616

17+
/* A soft limit for stack use, to avoid excessive
18+
* memory use for large constants, etc.
19+
*
20+
* The value 30 is plucked out of thin air.
21+
* Code that could use more stack than this is
22+
* rare, so the exact value is unimportant.
23+
*/
24+
#define STACK_USE_GUIDELINE 30
25+
1726
struct _arena; // Type defined in pycore_pyarena.h
1827
struct _mod; // Type defined in pycore_ast.h
1928

Python/codegen.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,6 @@
3737
#define COMP_SETCOMP 2
3838
#define COMP_DICTCOMP 3
3939

40-
/* A soft limit for stack use, to avoid excessive
41-
* memory use for large constants, etc.
42-
*
43-
* The value 30 is plucked out of thin air.
44-
* Code that could use more stack than this is
45-
* rare, so the exact value is unimportant.
46-
*/
47-
#define STACK_USE_GUIDELINE 30
48-
4940
#undef SUCCESS
5041
#undef ERROR
5142
#define SUCCESS 0

0 commit comments

Comments
 (0)