Unify struct names and tags

This commit is contained in:
2026-01-02 14:00:00 +00:00
parent 7be1b42107
commit f3ee1ee468
13 changed files with 22 additions and 22 deletions

View File

@@ -134,7 +134,7 @@ void _array_clear(GenericArray *array, u64 item_size);
GenericArray *_array_alloc_capacity(const Allocator *allocator, u64 capacity, u64 item_size, b8 fill); GenericArray *_array_alloc_capacity(const Allocator *allocator, u64 capacity, u64 item_size, b8 fill);
// Base array types // Base array types
typedef struct str8 Str8; typedef struct Str8 Str8;
WAPP_DEF_ARRAY_TYPE(void *, VoidPtrArray); WAPP_DEF_ARRAY_TYPE(void *, VoidPtrArray);
WAPP_DEF_ARRAY_TYPE(c8 , C8Array); WAPP_DEF_ARRAY_TYPE(c8 , C8Array);

View File

@@ -81,7 +81,7 @@ GenericNode *_dbl_list_remove(GenericList *list, u64 index, u64 item_size);
void _dbl_list_empty(GenericList *list, u64 item_size); void _dbl_list_empty(GenericList *list, u64 item_size);
// Base list types // Base list types
typedef struct str8 Str8; typedef struct Str8 Str8;
WAPP_DEF_DBL_LIST_TYPE(void *, VoidPtrNode, VoidPtrList); WAPP_DEF_DBL_LIST_TYPE(void *, VoidPtrNode, VoidPtrList);
WAPP_DEF_DBL_LIST_TYPE(c8 , C8Node , C8List); WAPP_DEF_DBL_LIST_TYPE(c8 , C8Node , C8List);

View File

@@ -17,8 +17,8 @@ typedef void *(MemReallocFunc)(void *ptr, u64 old_size, u64 new_size, void *all
typedef void *(MemReallocAlignedFunc)(void *ptr, u64 old_size, u64 new_size, u64 alignment, void *alloc_obj); typedef void *(MemReallocAlignedFunc)(void *ptr, u64 old_size, u64 new_size, u64 alignment, void *alloc_obj);
typedef void (MemFreeFunc)(void **ptr, u64 size, void *alloc_obj); typedef void (MemFreeFunc)(void **ptr, u64 size, void *alloc_obj);
typedef struct allocator Allocator; typedef struct Allocator Allocator;
struct allocator { struct Allocator {
void *obj; void *obj;
MemAllocFunc *alloc; MemAllocFunc *alloc;
MemAllocAlignedFunc *alloc_aligned; MemAllocAlignedFunc *alloc_aligned;

View File

@@ -15,8 +15,8 @@
BEGIN_C_LINKAGE BEGIN_C_LINKAGE
#endif // !WAPP_PLATFORM_CPP #endif // !WAPP_PLATFORM_CPP
typedef struct str8 Str8; typedef struct Str8 Str8;
struct str8 { struct Str8 {
u64 capacity; u64 capacity;
u64 size; u64 size;
c8 *buf; c8 *buf;

View File

@@ -17,7 +17,7 @@
#define ARENA_MINIMUM_CAPACITY KiB(16) // Allocate minimum of 4 pages #define ARENA_MINIMUM_CAPACITY KiB(16) // Allocate minimum of 4 pages
struct arena { struct Arena {
u8 *buf; u8 *buf;
u8 *offset; u8 *offset;
u64 capacity; u64 capacity;

View File

@@ -11,7 +11,7 @@
BEGIN_C_LINKAGE BEGIN_C_LINKAGE
#endif // !WAPP_PLATFORM_CPP #endif // !WAPP_PLATFORM_CPP
typedef struct arena Arena; typedef struct Arena Arena;
#define wapp_mem_arena_init(arena_dptr, base_capacity) \ #define wapp_mem_arena_init(arena_dptr, base_capacity) \
(wapp_mem_arena_init_custom(arena_dptr, base_capacity, WAPP_MEM_ALLOC_RESERVE, false)) (wapp_mem_arena_init_custom(arena_dptr, base_capacity, WAPP_MEM_ALLOC_RESERVE, false))

View File

@@ -25,8 +25,8 @@ typedef enum {
SHELL_ERR_PROC_EXIT_FAIL, SHELL_ERR_PROC_EXIT_FAIL,
} CMDError; } CMDError;
typedef struct commander_result CMDResult; typedef struct CMDResult CMDResult;
struct commander_result { struct CMDResult {
i32 exit_code; i32 exit_code;
CMDError error; CMDError error;
b8 exited; b8 exited;

View File

@@ -13,8 +13,8 @@
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <Windows.h> #include <Windows.h>
typedef struct termcolour_data TermcolourData; typedef struct TermcolourData TermcolourData;
struct termcolour_data { struct TermcolourData {
HANDLE handle; HANDLE handle;
WORD default_colour; WORD default_colour;
WORD current_colour; WORD current_colour;

View File

@@ -7,8 +7,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <time.h> #include <time.h>
typedef struct split_mix_64_state SplitMix64State; typedef struct SplitMix64State SplitMix64State;
struct split_mix_64_state { struct SplitMix64State {
u64 seed; u64 seed;
}; };

View File

@@ -10,8 +10,8 @@
BEGIN_C_LINKAGE BEGIN_C_LINKAGE
#endif // !WAPP_PLATFORM_CPP #endif // !WAPP_PLATFORM_CPP
typedef struct xor_256_state XOR256State; typedef struct XOR256State XOR256State;
struct xor_256_state { struct XOR256State {
u64 x; u64 x;
u64 y; u64 y;
u64 z; u64 z;

View File

@@ -17,8 +17,8 @@ BEGIN_C_LINKAGE
#define wapp_tester_run_tests(...) run_tests(__VA_ARGS__, NULL) #define wapp_tester_run_tests(...) run_tests(__VA_ARGS__, NULL)
typedef struct test_func_result TestFuncResult; typedef struct TestFuncResult TestFuncResult;
struct test_func_result { struct TestFuncResult {
Str8 name; Str8 name;
b8 passed; b8 passed;

View File

@@ -9,8 +9,8 @@
#define UUID_STR_FORMAT ("%.8" PRIx64 "-%.4" PRIx64 "-%.4" PRIx64 "-%.4" PRIx64 "-%.12" PRIx64) #define UUID_STR_FORMAT ("%.8" PRIx64 "-%.4" PRIx64 "-%.4" PRIx64 "-%.4" PRIx64 "-%.12" PRIx64)
typedef struct uuid4 UUID4; typedef struct UUID4 UUID4;
struct uuid4 { struct UUID4 {
u64 high; u64 high;
u64 low; u64 low;
}; };

View File

@@ -15,8 +15,8 @@ BEGIN_C_LINKAGE
#define WAPP_UUID_SPEC WAPP_STR8_SPEC #define WAPP_UUID_SPEC WAPP_STR8_SPEC
#define wapp_uuid_varg(WUUID) wapp_str8_varg((WUUID).uuid) #define wapp_uuid_varg(WUUID) wapp_str8_varg((WUUID).uuid)
typedef struct wapp_uuid WUUID; typedef struct WUUID WUUID;
struct wapp_uuid { struct WUUID {
Str8 uuid; Str8 uuid;
}; };