Basic object manipulation

This commit is contained in:
womax
2024-05-28 20:08:41 +02:00
commit 70644cf67e
8 changed files with 357 additions and 0 deletions

24
src/includes.h Normal file
View File

@@ -0,0 +1,24 @@
#ifndef INCLUDES_H
#define INCLUDES_H
#ifdef DEBUG
#define debug_print(X, ...) \
printf("[DEBUG] %s:%d: ", __FILE__, __LINE__); \
printf(X __VA_OPT__(,) __VA_ARGS__); \
printf("\n"); \
#define error_print(X, ...) \
printf("[ERROR] %s:%d: ", __FILE__, __LINE__); \
printf(X __VA_OPT__(,) __VA_ARGS__); \
printf("\n"); \
#else
#define debug_print(X, ...)
#define error_print(X, ...)
#endif
#define defer(X) \
result = X; \
goto defer; \
#endif // INCLUDES_H