builtin: Move free from array.v to builtin.v
parent
840e496a51
commit
b20d7ad086
|
@ -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]
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue