From 44566cfa09fb56c4907a4eb034501dc708b95d4f Mon Sep 17 00:00:00 2001 From: Avril Date: Thu, 18 Mar 2021 20:02:11 +0000 Subject: [PATCH] added prototype macro --- include/state.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/state.h b/include/state.h index bd18b71..a389770 100644 --- a/include/state.h +++ b/include/state.h @@ -77,5 +77,9 @@ inline sm_yield sm_continue() { return (sm_yield)_sm_noop; } #define SM_YIELD(v) do { state->current->pc = __LINE__; return (sm_yield)(v); case __LINE__:; } while(0) +#define SM_GENERATOR(name) sm_yield name(sm_state* state) + +// --- + sm_state* sm_new_state(); void sm_free_state(sm_state* state);