builtin: fix sizeof(C.BOOL) (windows specific) (#19589)

This commit is contained in:
Delyan Angelov 2023-10-17 18:18:48 +03:00 committed by GitHub
parent bbb4a802e6
commit dc6e31787e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -12,3 +12,9 @@ fn test_g_main_argv() {
} }
assert first_arg.contains('builtin_test') assert first_arg.contains('builtin_test')
} }
[if windows]
fn test_bool_size() {
println(@LOCATION)
assert sizeof(C.BOOL) == 4
}

View File

@ -7,7 +7,7 @@ module builtin
// g_original_codepage - used to restore the original windows console code page when exiting // g_original_codepage - used to restore the original windows console code page when exiting
__global g_original_codepage = u32(0) __global g_original_codepage = u32(0)
pub type C.BOOL = bool pub type C.BOOL = int
pub type C.HINSTANCE = voidptr pub type C.HINSTANCE = voidptr