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

builtin: move C. calls to .c.v files (#11164)

This commit is contained in:
Delyan Angelov
2021-08-12 21:46:38 +03:00
committed by GitHub
parent c9e9556a92
commit 47884dfd1f
21 changed files with 288 additions and 206 deletions

View File

@@ -55,7 +55,7 @@ pub fn (b []byte) clone() []byte {
pub fn (b []byte) bytestr() string {
unsafe {
buf := malloc_noscan(b.len + 1)
C.memcpy(buf, b.data, b.len)
vmemcpy(buf, b.data, b.len)
buf[b.len] = 0
return tos(buf, b.len)
}