context.allocator = a; Remove __ from runtime procs; improve division for complex numbers
This commit is contained in:
1 parent
f1e1814ff9
commit
5bdb424c6b
8 files changed
+212
-177
No files matched your search
+3
-4
@@ -213,14 +213,13 @@ init_arena_from_context :: proc(using a: ^Arena, size: int) {
|
||||
|
||||
|
||||
context_from_allocator :: proc(a: Allocator) -> type_of(context) {
|
||||
c := context;
|
||||
c.allocator = a;
|
||||
return c;
|
||||
context.allocator = a;
|
||||
return context;
|
||||
}
|
||||
|
||||
destroy_arena :: proc(using a: ^Arena) {
|
||||
if backing.procedure != nil {
|
||||
context = context_from_allocator(backing);
|
||||
context.allocator = backing;
|
||||
if memory != nil {
|
||||
free(&memory[0]);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user