builtin: Move free from array.v to builtin.v

pull/1170/head
Justice Suh 2019-07-15 16:56:10 -04:00 committed by Alexander Medvednikov
parent 840e496a51
commit b20d7ad086
2 changed files with 4 additions and 4 deletions

View File

@ -221,10 +221,6 @@ pub fn (a []string) str() string {
return res
}
fn free(a voidptr) {
C.free(a)
}
pub fn (b []byte) hex() string {
mut hex := malloc(b.len*2+1)
mut ptr := &hex[0]

View File

@ -89,6 +89,10 @@ pub fn calloc(n int) byteptr {
return C.calloc(n, 1)
}
pub fn free(ptr voidptr) {
C.free(ptr)
}
fn _strlen(s byteptr) int {
return C.strlen(s)
}