summaryrefslogtreecommitdiff
path: root/parse/stab.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-11-05 21:27:14 -0800
committerOri Bernstein <ori@eigenstate.org>2017-11-05 21:27:14 -0800
commit4e018273cd06542a0605cebd840dbcb8b14ad906 (patch)
tree830242438ff43f1e5ae18841a5b99249c67b4452 /parse/stab.c
parent547d6b96e5536f97d161e0a6544344534af3bde2 (diff)
downloadmc-4e018273cd06542a0605cebd840dbcb8b14ad906.tar.gz
Accept the globalness of file.
Diffstat (limited to 'parse/stab.c')
-rw-r--r--parse/stab.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/parse/stab.c b/parse/stab.c
index 49fc776..1d89238 100644
--- a/parse/stab.c
+++ b/parse/stab.c
@@ -171,7 +171,7 @@ findstab(Stab *st, Node *n)
Stab *ns;
if (n->name.ns) {
- ns = getns(file, n->name.ns);
+ ns = getns(n->name.ns);
if (!ns) {
ns = mkstab(0);
updatens(ns, n->name.ns);
@@ -319,7 +319,7 @@ gettrait(Stab *st, Node *n)
Traitdefn *c;
if (n->name.ns)
- st = getns(file, n->name.ns);
+ st = getns(n->name.ns);
do {
if ((c = htget(st->tr, n)))
return c->trait;
@@ -329,7 +329,7 @@ gettrait(Stab *st, Node *n)
}
Stab *
-getns(Node *file, char *name) {
+getns(char *name) {
return htget(file->file.ns, name);
}
@@ -606,11 +606,11 @@ getimpl(Stab *st, Node *n)
}
void
-putns(Node *file, Stab *scope)
+putns(Stab *scope)
{
Stab *s;
- s = getns(file, scope->name);
+ s = getns(scope->name);
if (s)
lfatal(Zloc, "Namespace %s already defined", scope->name);
htput(file->file.ns, scope->name, scope);