Skip to content

Commit

Permalink
fix: decrease max depth for debug build on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
XuehaiPan committed Nov 7, 2024
1 parent 0a9dfe7 commit cb4c04d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/optree/treespec.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ using ssize_t = py::ssize_t;
#ifndef Py_C_RECURSION_LIMIT
#define Py_C_RECURSION_LIMIT 1000
#endif
#ifndef PYPY_VERSION
#if !defined(PYPY_VERSION) && !(defined(MS_WINDOWS) && defined(Py_DEBUG))
constexpr ssize_t MAX_RECURSION_DEPTH = std::min(1000, Py_C_RECURSION_LIMIT);
#else
constexpr ssize_t MAX_RECURSION_DEPTH = std::min(500, Py_C_RECURSION_LIMIT);
Expand Down

0 comments on commit cb4c04d

Please sign in to comment.