Replace fl_readstate_t with struct

This commit is contained in:
Lassi Kortela 2019-08-09 19:26:42 +03:00
parent b561f9d4b0
commit 262ace1efd
3 changed files with 8 additions and 8 deletions

View File

@ -127,9 +127,9 @@ static value_t apply_cl(uint32_t nargs);
static value_t *alloc_words(int n); static value_t *alloc_words(int n);
static value_t relocate(value_t v); static value_t relocate(value_t v);
static fl_readstate_t *readstate = NULL; static struct fl_readstate *readstate = NULL;
static void free_readstate(fl_readstate_t *rs) static void free_readstate(struct fl_readstate *rs)
{ {
htable_free(&rs->backrefs); htable_free(&rs->backrefs);
htable_free(&rs->gensyms); htable_free(&rs->gensyms);
@ -557,7 +557,7 @@ void gc(int mustgrow)
static int grew = 0; static int grew = 0;
void *temp; void *temp;
uint32_t i, f, top; uint32_t i, f, top;
fl_readstate_t *rs; struct fl_readstate *rs;
curheap = tospace; curheap = tospace;
if (grew) if (grew)

View File

@ -162,19 +162,19 @@ fixnum_t tofixnum(value_t v, char *fname);
char *tostring(value_t v, char *fname); char *tostring(value_t v, char *fname);
/* error handling */ /* error handling */
typedef struct _fl_readstate_t { struct fl_readstate {
struct htable backrefs; struct htable backrefs;
struct htable gensyms; struct htable gensyms;
value_t source; value_t source;
struct _fl_readstate_t *prev; struct fl_readstate *prev;
} fl_readstate_t; };
typedef struct _ectx_t { typedef struct _ectx_t {
jmp_buf buf; jmp_buf buf;
uint32_t sp; uint32_t sp;
uint32_t frame; uint32_t frame;
uint32_t ngchnd; uint32_t ngchnd;
fl_readstate_t *rdst; struct fl_readstate *rdst;
struct _ectx_t *prev; struct _ectx_t *prev;
} fl_exception_context_t; } fl_exception_context_t;

View File

@ -678,7 +678,7 @@ static value_t do_read_sexpr(value_t label)
value_t fl_read_sexpr(value_t f) value_t fl_read_sexpr(value_t f)
{ {
value_t v; value_t v;
fl_readstate_t state; struct fl_readstate state;
state.prev = readstate; state.prev = readstate;
htable_new(&state.backrefs, 8); htable_new(&state.backrefs, 8);
htable_new(&state.gensyms, 8); htable_new(&state.gensyms, 8);