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
@@ -89,10 +89,12 @@ wasm_allocator_init :: proc(a: ^WASM_Allocator, alignment: uint = 8) {
global_default_wasm_allocator_data: WASM_Allocator
@(require_results)
default_wasm_allocator :: proc() -> Allocator {
return wasm_allocator(&global_default_wasm_allocator_data)
}
@(require_results)
wasm_allocator :: proc(a: ^WASM_Allocator) -> Allocator {
return {
data = a,