added helper functions/macros

lib
Avril 4 years ago
parent 957408aed7
commit 5346b0127e
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -0,0 +1,24 @@
#ifndef _TODO_H
#define _TODO_H
#ifdef __cplusplus
#include <cstdio>
[[noreturn]]
#else
#include <stdio.h>
__attribute__((noreturn))
#endif
inline static void _dev__unimplemented(const char* msg)
{
fputs("unimplemented", stderr);
if(msg) fputs(msg, stderr);
fputc('\n', stderr);
abort();
}
#define TODO(msg) _dev__unimplemented(": TODO: " msg)
#endif /* _TODO_H */

@ -1,6 +1,13 @@
#include <state.h> #include <state.h>
#include "dev.h"
void _sm_pop_stack(sm_state* state)
{
TODO("Free the current stack frame in `state` and replace it with the previous one");
}
sm_yield _sm_noop(sm_state*) sm_yield _sm_noop(sm_state*)
{ {
return (sm_yield)nullptr; return (sm_yield)nullptr;
} }

Loading…
Cancel
Save