summaryrefslogtreecommitdiff
path: root/parse/stab.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2019-04-12 22:48:43 -0700
committerOri Bernstein <ori@eigenstate.org>2019-04-12 22:48:43 -0700
commit537313ee9a2179cc6e869c6e8c70da4af1f07f28 (patch)
tree6cc091ad8c73b5e71755c6f4977de8d0e1d98fd1 /parse/stab.c
parent6940a02fd47d73ba5dd0ad3a82b1945b639a23dc (diff)
downloadmc-537313ee9a2179cc6e869c6e8c70da4af1f07f28.tar.gz
Rename traits correctly.
Diffstat (limited to 'parse/stab.c')
-rw-r--r--parse/stab.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/parse/stab.c b/parse/stab.c
index 54ccfaa..491e009 100644
--- a/parse/stab.c
+++ b/parse/stab.c
@@ -631,6 +631,7 @@ updatens(Stab *st, char *name)
{
void **k;
size_t i, nk;
+ Traitdefn *tr;
Tydefn *td;
if (st->name)
@@ -653,6 +654,13 @@ updatens(Stab *st, char *name)
}
free(k);
+ k = htkeys(st->tr, &nk);
+ for (i = 0; i < nk; i++) {
+ tr = htget(st->tr, k[i]);
+ setns(tr->name, name);
+ }
+ free(k);
+
k = htkeys(st->uc, &nk);
for (i = 0; i < nk; i++)
setns(k[i], name);