Change layout of Frame_Location

This commit is contained in:
gingerBill
2024-04-28 12:49:17 +01:00
parent 6c185a5dca
commit 0fa269811a
2 changed files with 14 additions and 10 deletions
+8 -4
View File
@@ -6,11 +6,15 @@ import "base:runtime"
Frame :: distinct uintptr
MAX_FRAMES :: 64
Frame_Location :: runtime.Source_Code_Location
Frame_Location :: struct {
using loc: runtime.Source_Code_Location,
allocator: runtime.Allocator,
}
delete_frame_location :: proc(loc: Frame_Location, allocator: runtime.Allocator) -> runtime.Allocator_Error {
delete(loc.procedure, allocator) or_return
delete(loc.file_path, allocator) or_return
delete_frame_location :: proc(fl: Frame_Location) -> runtime.Allocator_Error {
allocator := fl.allocator
delete(fl.loc.procedure, allocator) or_return
delete(fl.loc.file_path, allocator) or_return
return nil
}