mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-14 14:23:43 +00:00
Initial release version
* Code cleanup * Fix some TODOs * Reduce heap allocation use and replace with arena allocation
This commit is contained in:
@@ -46,6 +46,23 @@ gb_inline u64 hash_pointer(void *ptr) {
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Doubly Linked Lists
|
||||
|
||||
#define DLIST_SET(curr_element, next_element) do { \
|
||||
(curr_element)->next = (next_element); \
|
||||
(curr_element)->next->prev = (curr_element); \
|
||||
(curr_element) = (curr_element)->next; \
|
||||
} while (0)
|
||||
|
||||
#define DLIST_APPEND(root_element, curr_element, next_element) do { \
|
||||
if ((root_element) == NULL) \
|
||||
(root_element) = (curr_element) = (next_element); \
|
||||
else \
|
||||
DLIST_SET(curr_element, next_element); \
|
||||
} while (0)
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generic Data Structures
|
||||
|
||||
Reference in New Issue
Block a user