diff --git a/vlib/builtin/builtin_test.v b/vlib/builtin/builtin_test.v index 65b7bc27b9..7b069973f1 100644 --- a/vlib/builtin/builtin_test.v +++ b/vlib/builtin/builtin_test.v @@ -12,3 +12,9 @@ fn test_g_main_argv() { } assert first_arg.contains('builtin_test') } + +[if windows] +fn test_bool_size() { + println(@LOCATION) + assert sizeof(C.BOOL) == 4 +} diff --git a/vlib/builtin/builtin_windows.c.v b/vlib/builtin/builtin_windows.c.v index 6f38acc72b..5f047ace42 100644 --- a/vlib/builtin/builtin_windows.c.v +++ b/vlib/builtin/builtin_windows.c.v @@ -7,7 +7,7 @@ module builtin // g_original_codepage - used to restore the original windows console code page when exiting __global g_original_codepage = u32(0) -pub type C.BOOL = bool +pub type C.BOOL = int pub type C.HINSTANCE = voidptr