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:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user