summaryrefslogtreecommitdiff
path: root/Python/pylifecycle.c
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2014-11-21 23:35:12 -0600
committerZachary Ware <zachary.ware@gmail.com>2014-11-21 23:35:12 -0600
commita397c822bd9eb0c8e1a03ed0dfbb99f862391f0a (patch)
treed77d45a73909fb7ba5857a12bdee9b42de105da2 /Python/pylifecycle.c
parent96a8f00bd59063dafa9793c2a000633f5103a32b (diff)
downloadcpython-a397c822bd9eb0c8e1a03ed0dfbb99f862391f0a.tar.gz
Closes #22869: Move PyOS_CheckStack back to pythonrun.c
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r--Python/pylifecycle.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index 077c013a91..25a4a60f2e 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -1431,44 +1431,6 @@ Py_FdIsInteractive(FILE *fp, const char *filename)
}
-#if defined(USE_STACKCHECK)
-#if defined(WIN32) && defined(_MSC_VER)
-
-/* Stack checking for Microsoft C */
-
-#include <malloc.h>
-#include <excpt.h>
-
-/*
- * Return non-zero when we run out of memory on the stack; zero otherwise.
- */
-int
-PyOS_CheckStack(void)
-{
- __try {
- /* alloca throws a stack overflow exception if there's
- not enough space left on the stack */
- alloca(PYOS_STACK_MARGIN * sizeof(void*));
- return 0;
- } __except (GetExceptionCode() == STATUS_STACK_OVERFLOW ?
- EXCEPTION_EXECUTE_HANDLER :
- EXCEPTION_CONTINUE_SEARCH) {
- int errcode = _resetstkoflw();
- if (errcode == 0)
- {
- Py_FatalError("Could not reset the stack!");
- }
- }
- return 1;
-}
-
-#endif /* WIN32 && _MSC_VER */
-
-/* Alternate implementations can be added here... */
-
-#endif /* USE_STACKCHECK */
-
-
/* Wrappers around sigaction() or signal(). */
PyOS_sighandler_t