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

all: rune type for `` literals

This commit is contained in:
Alexander Medvednikov
2020-08-27 06:46:18 +02:00
parent 99dd72efea
commit 6921d46185
17 changed files with 173 additions and 108 deletions

View File

@@ -16,7 +16,7 @@ pub fn read_bytes(path string) ?[]byte {
C.fseek(fp, 0, C.SEEK_END)
fsize := C.ftell(fp)
C.rewind(fp)
mut res := [`0`].repeat(fsize)
mut res := [byte(`0`)].repeat(fsize)
nr_read_elements := C.fread(res.data, fsize, 1, fp)
C.fclose(fp)
return res[0..nr_read_elements * fsize]