diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2007-11-15 09:21:55 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2007-11-15 09:21:55 (GMT) |
commit | 9e11475439d3f3aa05315b9a59f68450ac62195e (patch) | |
tree | 15e693a75971feefc31fc59e2be3030fe8358712 | |
parent | 5b297df4a2180156c007398ce72680c2ab6d14bf (diff) | |
download | tcl-9e11475439d3f3aa05315b9a59f68450ac62195e.zip tcl-9e11475439d3f3aa05315b9a59f68450ac62195e.tar.gz tcl-9e11475439d3f3aa05315b9a59f68450ac62195e.tar.bz2 |
Prefer UINT_PTR to DWORD_PTR when casting pointers to integer types for greater portability (bug #1831253)
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | win/tclWin32Dll.c | 12 |
2 files changed, 11 insertions, 6 deletions
@@ -1,3 +1,8 @@ +2007-11-15 Pat Thoyts <patthoyts@users.sourceforge.net> + + * win/tclWin32Dll.c: Prefer UINT_PTR to DWORD_PTR when casting + pointers to integer types for greater portability (bug #1831253) + 2007-11-15 Daniel Steffen <das@users.sourceforge.net> * macosx/Tcl.xcodeproj/project.pbxproj: add new chanio.test. diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c index e7d20f5..8fd1bb5 100644 --- a/win/tclWin32Dll.c +++ b/win/tclWin32Dll.c @@ -10,7 +10,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.52 2007/11/10 19:01:35 msofer Exp $ + * RCS: @(#) $Id: tclWin32Dll.c,v 1.53 2007/11/15 09:21:55 patthoyts Exp $ */ #include "tclWinInt.h" @@ -554,7 +554,7 @@ TclpGetCStackParams( * area in which the stack resides */ if (!tsdPtr->stackBound - || ((DWORD_PTR)&tsdPtr < (DWORD_PTR)tsdPtr->stackBound)) { + || ((UINT_PTR)&tsdPtr < (UINT_PTR)tsdPtr->stackBound)) { /* * Either we haven't determined the stack bound in this thread, @@ -574,8 +574,8 @@ TclpGetCStackParams( if (!tsdPtr->stackBound) { tsdPtr->stackBound = - (int*) ((DWORD_PTR)(&tsdPtr) - & ~ (DWORD_PTR)(si.dwPageSize - 1)); + (int*) ((UINT_PTR)(&tsdPtr) + & ~ (UINT_PTR)(si.dwPageSize - 1)); } } else { @@ -587,8 +587,8 @@ TclpGetCStackParams( */ tsdPtr->stackBound = - (int*) ((DWORD_PTR)(mbi.AllocationBase) - + (DWORD_PTR)(si.dwPageSize) + (int*) ((UINT_PTR)(mbi.AllocationBase) + + (UINT_PTR)(si.dwPageSize) + TCL_WIN_STACK_THRESHOLD); } } |