Commit fa988f5a authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

Constify struct symtab

Children shouldn't be able to mess with their parents, even though in
practice they do.
parent 8709deb8
...@@ -49,7 +49,7 @@ struct symtab { ...@@ -49,7 +49,7 @@ struct symtab {
#define SYMTAB_MAGIC 0x084d9c8a #define SYMTAB_MAGIC 0x084d9c8a
unsigned nlen; unsigned nlen;
const char *name; const char *name;
struct symtab *parent; const struct symtab *parent;
VTAILQ_ENTRY(symtab) list; VTAILQ_ENTRY(symtab) list;
VTAILQ_HEAD(,symtab) children; VTAILQ_HEAD(,symtab) children;
VTAILQ_HEAD(,symbol) symbols; VTAILQ_HEAD(,symbol) symbols;
...@@ -196,7 +196,7 @@ static struct symbol * ...@@ -196,7 +196,7 @@ static struct symbol *
vcc_sym_in_tab(struct vcc *tl, struct symtab *st, vcc_sym_in_tab(struct vcc *tl, struct symtab *st,
vcc_kind_t kind, int vlo, int vhi) vcc_kind_t kind, int vlo, int vhi)
{ {
struct symtab *pst; const struct symtab *pst;
struct symbol *sym, *psym; struct symbol *sym, *psym;
VTAILQ_FOREACH(sym, &st->symbols, list) { VTAILQ_FOREACH(sym, &st->symbols, list) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment