summaryrefslogtreecommitdiff
path: root/Include/ceval.h
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2017-09-05 18:26:16 -0700
committerGitHub <noreply@github.com>2017-09-05 18:26:16 -0700
commit76d5abc8684bac4f2fc7cccfe2cd940923357351 (patch)
tree4ae6a3bd88bef1266a8d9723c589f925d90bf848 /Include/ceval.h
parent501b324d3a940d26e0021a38aae8d896a30fbcff (diff)
downloadcpython-git-76d5abc8684bac4f2fc7cccfe2cd940923357351.tar.gz
bpo-30860: Consolidate stateful runtime globals. (#2594)
* group the (stateful) runtime globals into various topical structs * consolidate the topical structs under a single top-level _PyRuntimeState struct * add a check-c-globals.py script that helps identify runtime globals Other globals are excluded (see globals.txt and check-c-globals.py).
Diffstat (limited to 'Include/ceval.h')
-rw-r--r--Include/ceval.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Include/ceval.h b/Include/ceval.h
index b2d57cbd6f..7cbbf7c528 100644
--- a/Include/ceval.h
+++ b/Include/ceval.h
@@ -93,7 +93,12 @@ PyAPI_FUNC(int) Py_GetRecursionLimit(void);
PyThreadState_GET()->overflowed = 0; \
} while(0)
PyAPI_FUNC(int) _Py_CheckRecursiveCall(const char *where);
-PyAPI_DATA(int) _Py_CheckRecursionLimit;
+#ifdef Py_BUILD_CORE
+#define _Py_CheckRecursionLimit _PyRuntime.ceval.check_recursion_limit
+#else
+PyAPI_FUNC(int) _PyEval_CheckRecursionLimit(void);
+#define _Py_CheckRecursionLimit _PyEval_CheckRecursionLimit()
+#endif
#ifdef USE_STACKCHECK
/* With USE_STACKCHECK, we artificially decrement the recursion limit in order