mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Make free_all built-in
This commit is contained in:
+1
-3
@@ -1,7 +1,5 @@
|
|||||||
package mem
|
package mem
|
||||||
|
|
||||||
import "core:runtime"
|
|
||||||
|
|
||||||
foreign _ {
|
foreign _ {
|
||||||
@(link_name = "llvm.bswap.i16") swap16 :: proc(b: u16) -> u16 ---;
|
@(link_name = "llvm.bswap.i16") swap16 :: proc(b: u16) -> u16 ---;
|
||||||
@(link_name = "llvm.bswap.i32") swap32 :: proc(b: u32) -> u32 ---;
|
@(link_name = "llvm.bswap.i32") swap32 :: proc(b: u32) -> u32 ---;
|
||||||
@@ -214,7 +212,7 @@ init_arena_from_context :: proc(using a: ^Arena, size: int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
context_from_allocator :: proc(a: Allocator) -> runtime.Context {
|
context_from_allocator :: proc(a: Allocator) -> type_of(context) {
|
||||||
c := context;
|
c := context;
|
||||||
c.allocator = a;
|
c.allocator = a;
|
||||||
return c;
|
return c;
|
||||||
|
|||||||
@@ -382,6 +382,9 @@ new_clone :: proc[mem.new_clone];
|
|||||||
@(builtin)
|
@(builtin)
|
||||||
free :: proc[mem.free];
|
free :: proc[mem.free];
|
||||||
|
|
||||||
|
@(builtin)
|
||||||
|
free_all :: proc[mem.free_all];
|
||||||
|
|
||||||
@(builtin)
|
@(builtin)
|
||||||
delete :: proc[
|
delete :: proc[
|
||||||
mem.delete_string,
|
mem.delete_string,
|
||||||
|
|||||||
Reference in New Issue
Block a user