summary refs log tree commit diff stats
path: root/lib/system/excpt.nim
diff options
context:
space:
mode:
authorBogdan <bogdan@hobeanu.com>2019-03-13 16:54:36 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-03-13 15:54:36 +0100
commitb270917de1d5fbda2f5d4127e1513793a88391d3 (patch)
tree67a97bd863a0180910b2077a53c80256ea5494ef /lib/system/excpt.nim
parentcd3a58d7b0d0c69d1ea1fd476aabf577acf282c8 (diff)
downloadNim-b270917de1d5fbda2f5d4127e1513793a88391d3.tar.gz
Make HWND a pointer instead of a cint and fix MSVC compiler warning (#10789)
In Windows, a HWND is a HANDLE which is a PVOID so a pointer in Nim
Diffstat (limited to 'lib/system/excpt.nim')
-rw-r--r--lib/system/excpt.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim
index 38eb49397..551e54fae 100644
--- a/lib/system/excpt.nim
+++ b/lib/system/excpt.nim
@@ -28,11 +28,11 @@ when not defined(windows) or not defined(guiapp):
   proc writeToStdErr(msg: cstring) = rawWrite(cstderr, msg)
 
 else:
-  proc MessageBoxA(hWnd: cint, lpText, lpCaption: cstring, uType: int): int32 {.
+  proc MessageBoxA(hWnd: pointer, lpText, lpCaption: cstring, uType: int): int32 {.
     header: "<windows.h>", nodecl.}
 
   proc writeToStdErr(msg: cstring) =
-    discard MessageBoxA(0, msg, nil, 0)
+    discard MessageBoxA(nil, msg, nil, 0)
 
 proc showErrorMessage(data: cstring) {.gcsafe.} =
   if errorMessageWriter != nil: