diff options
author | jan.nijtmans <jan.nijtmans@noemail.net> | 2011-08-16 13:31:51 (GMT) |
---|---|---|
committer | jan.nijtmans <jan.nijtmans@noemail.net> | 2011-08-16 13:31:51 (GMT) |
commit | 7c3971bb7cbb4eaa16c2309d7c3cb533de419c5b (patch) | |
tree | 10fef8916f8c8669ce5e3e9dad5ab679a7afd436 /win/tkWinTest.c | |
parent | e32dd7ed02ad3894b94316601cac1bb82904f2c1 (diff) | |
parent | c40e1317b9407ba0e0a940faf569ff94ad826975 (diff) | |
download | tk-7c3971bb7cbb4eaa16c2309d7c3cb533de419c5b.zip tk-7c3971bb7cbb4eaa16c2309d7c3cb533de419c5b.tar.gz tk-7c3971bb7cbb4eaa16c2309d7c3cb533de419c5b.tar.bz2 |
[Bug 3388350] mingw64 compiler warnings
FossilOrigin-Name: 63dbae8717c1659f7d1a39c24c92939d77f87ff2
Diffstat (limited to 'win/tkWinTest.c')
-rw-r--r-- | win/tkWinTest.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/win/tkWinTest.c b/win/tkWinTest.c index 29a2ba6..f9cd350 100644 --- a/win/tkWinTest.c +++ b/win/tkWinTest.c @@ -300,7 +300,7 @@ TestwineventCmd( return TCL_ERROR; } #endif - hwnd = (HWND) strtol(argv[1], &rest, 0); + hwnd = INT2PTR(strtol(argv[1], &rest, 0)); if (rest == argv[1]) { hwnd = FindWindowA(NULL, argv[1]); if (hwnd == NULL) { @@ -424,7 +424,7 @@ TestfindwindowObjCmd( AppendSystemError(interp, GetLastError()); r = TCL_ERROR; } else { - Tcl_SetObjResult(interp, Tcl_NewLongObj((long)hwnd)); + Tcl_SetObjResult(interp, Tcl_NewLongObj(PTR2INT(hwnd))); } Tcl_DStringFree(&titleString); @@ -440,7 +440,7 @@ EnumChildrenProc( { Tcl_Obj *listObj = (Tcl_Obj *) lParam; - Tcl_ListObjAppendElement(NULL, listObj, Tcl_NewLongObj((long) hwnd)); + Tcl_ListObjAppendElement(NULL, listObj, Tcl_NewLongObj(PTR2INT(hwnd))); return TRUE; } @@ -465,7 +465,7 @@ TestgetwindowinfoObjCmd( if (Tcl_GetLongFromObj(interp, objv[1], &hwnd) != TCL_OK) return TCL_ERROR; - cch = tkTestWinProcs->getClassName((HWND)hwnd, buf, cchBuf); + cch = tkTestWinProcs->getClassName(INT2PTR(hwnd), buf, cchBuf); if (cch == 0) { Tcl_SetResult(interp, "failed to get class name: ", TCL_STATIC); AppendSystemError(interp, GetLastError()); @@ -480,17 +480,17 @@ TestgetwindowinfoObjCmd( dictObj = Tcl_NewDictObj(); Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("class", 5), classObj); Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("id", 2), - Tcl_NewLongObj(GetWindowLongA((HWND)hwnd, GWL_ID))); + Tcl_NewLongObj(GetWindowLongA(INT2PTR(hwnd), GWL_ID))); - cch = tkTestWinProcs->getWindowText((HWND)hwnd, (LPTSTR)buf, cchBuf); + cch = tkTestWinProcs->getWindowText(INT2PTR(hwnd), (LPTSTR)buf, cchBuf); textObj = Tcl_NewUnicodeObj((LPCWSTR)buf, cch); Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("text", 4), textObj); Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("parent", 6), - Tcl_NewLongObj((long)GetParent((HWND)hwnd))); + Tcl_NewLongObj(PTR2INT(GetParent((INT2PTR(hwnd)))))); childrenObj = Tcl_NewListObj(0, NULL); - EnumChildWindows((HWND)hwnd, EnumChildrenProc, (LPARAM)childrenObj); + EnumChildWindows(INT2PTR(hwnd), EnumChildrenProc, (LPARAM)childrenObj); Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("children", -1), childrenObj); Tcl_SetObjResult(interp, dictObj); |