mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-29 10:50:05 +00:00
Fix #location for anonymous procedures
This commit is contained in:
+9
-3
@@ -200,9 +200,10 @@ proc make_source_code_location(file: string, line, column: i64, procedure: strin
|
||||
const DEFAULT_ALIGNMENT = align_of([vector 4]f32);
|
||||
|
||||
|
||||
proc __check_context() {
|
||||
var c = &__context;
|
||||
|
||||
proc __init_context(c: ^Context) {
|
||||
if c == nil {
|
||||
return;
|
||||
}
|
||||
if c.allocator.procedure == nil {
|
||||
c.allocator = default_allocator();
|
||||
}
|
||||
@@ -211,6 +212,11 @@ proc __check_context() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
proc __check_context() {
|
||||
__init_context(&__context);
|
||||
}
|
||||
|
||||
proc alloc(size: int, alignment: int = DEFAULT_ALIGNMENT) -> rawptr #inline {
|
||||
__check_context();
|
||||
var a = context.allocator;
|
||||
|
||||
Reference in New Issue
Block a user