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

make V.js compile

This commit is contained in:
Alexander Medvednikov
2019-09-16 18:29:04 +03:00
parent 3e52984e88
commit c76d09f9a5
3 changed files with 9 additions and 8 deletions

View File

@ -309,10 +309,5 @@ pub fn (s string) hash() int {
}
pub fn (s string) bytes() []byte {
if s.len == 0 {
return []byte
}
mut buf := [byte(0)].repeat2(s.len)
C.memcpy(buf.data, s.str, s.len)
return buf
return []byte
}