summaryrefslogtreecommitdiffstats
path: root/win/tclWinChan.c
diff options
context:
space:
mode:
authordavygrvy <davygrvy@pobox.com>2003-12-13 03:11:02 (GMT)
committerdavygrvy <davygrvy@pobox.com>2003-12-13 03:11:02 (GMT)
commit51b2d87980b5b26357ace65824b498fae48bbced (patch)
tree18d016a94102201be0c68dc7a4bdeb19188f3165 /win/tclWinChan.c
parent5ef7bffb03ae9f4cb7212076570be24b2cb1247d (diff)
downloadtcl-51b2d87980b5b26357ace65824b498fae48bbced.zip
tcl-51b2d87980b5b26357ace65824b498fae48bbced.tar.gz
tcl-51b2d87980b5b26357ace65824b498fae48bbced.tar.bz2
prefer Tcl_LongAsWide and Tcl_WideAsLong for casts.
Diffstat (limited to 'win/tclWinChan.c')
-rw-r--r--win/tclWinChan.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/win/tclWinChan.c b/win/tclWinChan.c
index adfbaf7..0ab586d 100644
--- a/win/tclWinChan.c
+++ b/win/tclWinChan.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: tclWinChan.c,v 1.31 2003/12/13 02:07:05 davygrvy Exp $
+ * RCS: @(#) $Id: tclWinChan.c,v 1.32 2003/12/13 03:11:02 davygrvy Exp $
*/
#include "tclWinInt.h"
@@ -533,9 +533,9 @@ FileWideSeekProc(instanceData, offset, mode, errorCodePtr)
moveMethod = FILE_END;
}
- newPosHigh = (LONG)(offset >> 32);
- newPos = SetFilePointer(infoPtr->handle, Tcl_WideAsLong(offset), &newPosHigh,
- moveMethod);
+ newPosHigh = Tcl_WideAsLong(offset >> 32);
+ newPos = SetFilePointer(infoPtr->handle, Tcl_WideAsLong(offset),
+ &newPosHigh, moveMethod);
if (newPos == INVALID_SET_FILE_POINTER) {
DWORD winError = GetLastError();
if (winError != NO_ERROR) {
@@ -544,7 +544,7 @@ FileWideSeekProc(instanceData, offset, mode, errorCodePtr)
return -1;
}
}
- return ((Tcl_WideInt) newPos) | (((Tcl_WideInt) newPosHigh) << 32);
+ return (Tcl_LongAsWide(newPos) | (Tcl_LongAsWide(newPosHigh) << 32));
}
/*