Skip to content

Commit db18b1a

Browse files
committed
Remove #ifndef Py_C_RECURSION_LIMIT
1 parent d845ed1 commit db18b1a

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

Include/cpython/pystate.h

+9-10
Original file line numberDiff line numberDiff line change
@@ -194,18 +194,17 @@ struct _ts {
194194

195195
};
196196

197-
/* WASI has limited call stack. Python's recursion limit depends on code
198-
layout, optimization, and WASI runtime. Wasmtime can handle about 700
199-
recursions, sometimes less. 500 is a more conservative limit. */
200-
#ifndef Py_C_RECURSION_LIMIT
201-
# ifdef __wasi__
202-
# define Py_C_RECURSION_LIMIT 500
203-
# else
204-
// This value is duplicated in Lib/test/support/__init__.py
205-
# define Py_C_RECURSION_LIMIT 1500
206-
# endif
197+
#ifdef __wasi__
198+
// WASI has limited call stack. Python's recursion limit depends on code
199+
// layout, optimization, and WASI runtime. Wasmtime can handle about 700
200+
// recursions, sometimes less. 500 is a more conservative limit.
201+
# define Py_C_RECURSION_LIMIT 500
202+
#else
203+
// This value is duplicated in Lib/test/support/__init__.py
204+
# define Py_C_RECURSION_LIMIT 1500
207205
#endif
208206

207+
209208
/* other API */
210209

211210
/* Similar to PyThreadState_Get(), but don't issue a fatal error

0 commit comments

Comments
 (0)