decisions decisions decisions...

This commit is contained in:
Ellen Arvidsson 2025-06-25 17:10:11 +02:00
parent 0344ec69b0
commit d4106c7004
3 changed files with 90 additions and 53 deletions

View file

@ -27,20 +27,20 @@ do { \
#define SPHO_STRINGIFY(a) #a
#define SPHO_MACRO_STR(b) SPHO_STRINGIFY(b)
#define __LINE__S SPHO_MACRO_STR(__LINE__)
#define SPHO_RIP(msg) \
#define SPHO_RIP(msg, ...) \
do { \
fprintf(stderr, "SPHO_RIP(" msg ")@" \
__FILE__ ":" __LINE__S \
" failed. Aborting.\n"); \
fprintf(stderr, "SPHO_RIP(" msg ")@" \
__FILE__ ":" __LINE__S \
" failed. Aborting.\n" __VA_OPT__(,) __VA_ARGS__); \
abort(); \
} while (0)
#ifdef SPHO_DEBUG
#define __LINE__S SPHO_MACRO_STR(__LINE__)
#define SPHO_PRECOND(cond) \
do { \
if (! (cond) ) { \

View file

@ -1,6 +1,9 @@
#ifndef _SPHO_SUBT_H
#define _SPHO_SUBT_H
#include "spho/bind.h"
#include "spho/scope.h"
int spho_is_subt(struct spho_ctx *, const struct spho_tp *,
const struct spho_tp *);
#endif /* ifndef _SPHO_SUBT_H */