1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

all: wrap up unsafe { nil } (p. 3)

This commit is contained in:
Alexander Medvednikov
2022-07-21 21:01:30 +03:00
parent a68d03ac59
commit 9099594a49
51 changed files with 86 additions and 86 deletions

View File

@ -110,7 +110,7 @@ pub fn (t Time) local() Time {
millisecond: u16(t.microsecond / 1000)
}
st_local := SystemTime{}
C.SystemTimeToTzSpecificLocalTime(voidptr(0), &st_utc, &st_local)
C.SystemTimeToTzSpecificLocalTime(unsafe { nil }, &st_utc, &st_local)
t_local := Time{
year: st_local.year
month: st_local.month
@ -133,7 +133,7 @@ fn win_now() Time {
st_utc := SystemTime{}
C.FileTimeToSystemTime(&ft_utc, &st_utc)
st_local := SystemTime{}
C.SystemTimeToTzSpecificLocalTime(voidptr(0), &st_utc, &st_local)
C.SystemTimeToTzSpecificLocalTime(unsafe { nil }, &st_utc, &st_local)
t := Time{
year: st_local.year
month: st_local.month