Add require_results attr to procs returning an allocator

This commit is contained in:
Damian Tarnawski
2025-09-02 13:03:15 +02:00
parent 7e3e15aee6
commit 21fd7c200e
6 changed files with 8 additions and 1 deletions
+2
View File
@@ -23,6 +23,7 @@ nil_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode,
return nil, .None
}
@(require_results)
nil_allocator :: proc "contextless" () -> Allocator {
return Allocator{
procedure = nil_allocator_proc,
@@ -72,6 +73,7 @@ panic_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode,
return nil, nil
}
@(require_results)
panic_allocator :: proc() -> Allocator {
return Allocator{
procedure = panic_allocator_proc,