This commit is contained in:
Daniel Ledda
2025-01-02 18:20:56 +01:00
parent 39ff16b6a6
commit 49e379dd54
9 changed files with 80 additions and 44 deletions

5
core.h
View File

@@ -5,7 +5,7 @@
#include <math.h>
#include <stdint.h> // necessary for int type sizes
#include <stdio.h>
#include <time.h> // TODO(dledda): try not to depend on this one
#include <time.h> // TODO(djledda): try not to depend on this one
// ### Misc macros ###
#if ENABLE_ASSERT
@@ -150,6 +150,7 @@ struct string {
#define strlit(lit) (string{(char *)(lit), sizeof(lit) - 1})
#define PushString(arena, length) (string{ (char *)pushSize(arena, length), (length) })
string operator""_s(const char *cstrLiteral, unsigned long length);
// C Strings
const char *cstring(Arena *arena, list<char> buf);
@@ -192,7 +193,7 @@ string formatTimeYmd(Arena *arena, UnixTimestamp time);
string formatTimeYmd(Arena *arena, Timestamp *time);
// ### Linked Lists ###
// TODO(dledda): implement basic linked lists (based on arenas?)
// TODO(djledda): implement basic linked lists (based on arenas?)
// ### Logging ###
enum LogTarget {