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

builtin: fix failing embed_file_test.v (pub fn (data &u8) vbytes(len int) []u8 {)

This commit is contained in:
Delyan Angelov 2022-04-15 19:49:47 +03:00
parent 78cb6e2b41
commit cc8803c602
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -926,9 +926,9 @@ pub fn (data voidptr) vbytes(len int) []u8 {
return res
}
// vbytes on `&byte` makes a V []u8 structure from a C style memory buffer.
// vbytes on `&u8` makes a V []u8 structure from a C style memory buffer.
// NOTE: the data is reused, NOT copied!
[unsafe]
pub fn (data &byte) vbytes(len int) []u8 {
pub fn (data &u8) vbytes(len int) []u8 {
return unsafe { voidptr(data).vbytes(len) }
}