From 7e2e510e5f8a623e077c7e5d4d3ad3aac448489e Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 15 Apr 2022 19:49:47 +0300 Subject: [PATCH] builtin: fix failing embed_file_test.v (`pub fn (data &u8) vbytes(len int) []u8 {`) --- vlib/builtin/array.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/builtin/array.v b/vlib/builtin/array.v index ff5e9594ab..0b99cce0fc 100644 --- a/vlib/builtin/array.v +++ b/vlib/builtin/array.v @@ -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) } }