diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2011-08-16 13:31:51 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2011-08-16 13:31:51 (GMT) |
commit | 907e2d9a2d64d70bf11090c1404f4c2a033665cc (patch) | |
tree | 10fef8916f8c8669ce5e3e9dad5ab679a7afd436 /win/tkWinTest.c | |
parent | b5ded31c01970fcfc89f40ec2f1ba09472ec0ff2 (diff) | |
parent | 31e3c7c6744ec46a8b36c6425b93c58bd5e70230 (diff) | |
download | tk-907e2d9a2d64d70bf11090c1404f4c2a033665cc.zip tk-907e2d9a2d64d70bf11090c1404f4c2a033665cc.tar.gz tk-907e2d9a2d64d70bf11090c1404f4c2a033665cc.tar.bz2 |
[Bug 3388350] mingw64 compiler warnings
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); |