files forgotten to add for last commit

This commit is contained in:
Mikkel Troels Kongsted 2025-03-10 12:26:56 +01:00
parent b5f8c383c5
commit 7d26ff5d5a
2 changed files with 25 additions and 0 deletions

15
backend/src/panic.h Normal file
View File

@ -0,0 +1,15 @@
#pragma once
#include <stdio.h>
#include <stdlib.h>
#define PANIC(...) \
(fputs("\x1b[1;31mpanic\x1b[97m: ", stderr), fprintf(stderr, __VA_ARGS__), \
fprintf(stderr, "\x1b[0m\n\tin %s:%d\n\tat %s:%d\n", __func__, \
__LINE__, __FILE__, __LINE__), \
exit(1), 0)
__attribute__((unused)) static inline void ___include_user(void)
{
PANIC("");
}

10
backend/src/session.h Normal file
View File

@ -0,0 +1,10 @@
#pragma once
#include <stdint.h>
#include "collection.h"
typedef struct {
int64_t user_id;
} Session;
DEFINE_VEC(Session, SessionVec, session_vec, 16)