mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Clean up naming conventions
This commit is contained in:
@@ -31,6 +31,14 @@ Arena_Temp_Memory :: struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
arena_init :: proc(a: ^Arena, data: []byte) {
|
||||||
|
a.data = data
|
||||||
|
a.offset = 0
|
||||||
|
a.peak_used = 0
|
||||||
|
a.temp_count = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
@(deprecated="prefer 'mem.arena_init'")
|
||||||
init_arena :: proc(a: ^Arena, data: []byte) {
|
init_arena :: proc(a: ^Arena, data: []byte) {
|
||||||
a.data = data
|
a.data = data
|
||||||
a.offset = 0
|
a.offset = 0
|
||||||
@@ -293,6 +301,14 @@ Stack :: struct {
|
|||||||
peak_used: int,
|
peak_used: int,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stack_init :: proc(s: ^Stack, data: []byte) {
|
||||||
|
s.data = data
|
||||||
|
s.prev_offset = 0
|
||||||
|
s.curr_offset = 0
|
||||||
|
s.peak_used = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
@(deprecated="prefer 'mem.stack_init'")
|
||||||
init_stack :: proc(s: ^Stack, data: []byte) {
|
init_stack :: proc(s: ^Stack, data: []byte) {
|
||||||
s.data = data
|
s.data = data
|
||||||
s.prev_offset = 0
|
s.prev_offset = 0
|
||||||
@@ -450,6 +466,13 @@ Small_Stack :: struct {
|
|||||||
peak_used: int,
|
peak_used: int,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
small_stack_init :: proc(s: ^Small_Stack, data: []byte) {
|
||||||
|
s.data = data
|
||||||
|
s.offset = 0
|
||||||
|
s.peak_used = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
@(deprecated="prefer 'small_stack_init'")
|
||||||
init_small_stack :: proc(s: ^Small_Stack, data: []byte) {
|
init_small_stack :: proc(s: ^Small_Stack, data: []byte) {
|
||||||
s.data = data
|
s.data = data
|
||||||
s.offset = 0
|
s.offset = 0
|
||||||
@@ -465,7 +488,7 @@ small_stack_allocator :: proc(stack: ^Small_Stack) -> Allocator {
|
|||||||
|
|
||||||
small_stack_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode,
|
small_stack_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode,
|
||||||
size, alignment: int,
|
size, alignment: int,
|
||||||
old_memory: rawptr, old_size: int, ocation := #caller_location) -> ([]byte, Allocator_Error) {
|
old_memory: rawptr, old_size: int, location := #caller_location) -> ([]byte, Allocator_Error) {
|
||||||
s := cast(^Small_Stack)allocator_data
|
s := cast(^Small_Stack)allocator_data
|
||||||
|
|
||||||
if s.data == nil {
|
if s.data == nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user