Better handling of allocators

This commit is contained in:
gingerBill
2024-07-24 13:47:22 +01:00
parent 6d2487a692
commit 2ddaae45f3
6 changed files with 37 additions and 31 deletions
+1 -1
View File
@@ -106,7 +106,7 @@ open :: proc(name: string, flags := File_Flags{.Read}, perm := 0o777) -> (^File,
@(require_results)
new_file :: proc(handle: uintptr, name: string) -> ^File {
return _new_file(handle, name)
return _new_file(handle, name) or_else panic("Out of memory")
}
@(require_results)