diff options
author | mdejong <mdejong@noemail.net> | 2002-03-08 01:45:50 (GMT) |
---|---|---|
committer | mdejong <mdejong@noemail.net> | 2002-03-08 01:45:50 (GMT) |
commit | d51f9aedb54f334808195ec0690871f445e7e40e (patch) | |
tree | b1bc8f3cb80b121d126f7bf0f4cb96a6bc14e98d /win/tclWin32Dll.c | |
parent | bc6e5978b6e22eccd4768063002968305197397f (diff) | |
download | tcl-d51f9aedb54f334808195ec0690871f445e7e40e.zip tcl-d51f9aedb54f334808195ec0690871f445e7e40e.tar.gz tcl-d51f9aedb54f334808195ec0690871f445e7e40e.tar.bz2 |
* win/tclWin32Dll.c (TclpCheckStackSpace):
* win/tclWinFCmd.c (DoRenameFile, DoCopyFile): Replace
hard coded constants with Win32 symbolic names.
Move control flow statements out of __try blocks
since the documentation indicates it is frowned upon.
FossilOrigin-Name: 6556155cb422ad8eb37641d835cab0c2a1e661f4
Diffstat (limited to 'win/tclWin32Dll.c')
-rw-r--r-- | win/tclWin32Dll.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c index 6ab2545..dde720e 100644 --- a/win/tclWin32Dll.c +++ b/win/tclWin32Dll.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWin32Dll.c,v 1.13 2002/02/08 02:52:54 dgp Exp $ + * RCS: @(#) $Id: tclWin32Dll.c,v 1.14 2002/03/08 01:45:52 mdejong Exp $ */ #include "tclWinInt.h" @@ -340,6 +340,8 @@ TclWinNoBackslash( int TclpCheckStackSpace() { + int retval = 0; + /* * We can recurse only if there is at least TCL_WIN_STACK_THRESHOLD * bytes of stack space left. alloca() is cheap on windows; basically @@ -349,10 +351,13 @@ TclpCheckStackSpace() __try { alloca(TCL_WIN_STACK_THRESHOLD); - return 1; - } __except (1) {} + retval = 1; + } __except (EXCEPTION_EXECUTE_HANDLER) {} - return 0; + /* + * Avoid using control flow statements in the SEH guarded block! + */ + return retval; } |