summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-02-04 15:21:10 -0800
committerKaz Kylheku <kaz@kylheku.com>2017-02-04 15:21:10 -0800
commitb31eb0c88cbcd92bb1203b563364744224f63a77 (patch)
tree7eebe1b27c742115b32a4e4454609f10a57f6e5d
parentf4c7237bba935ba7f632c8c07988b2b840a6e38b (diff)
downloadtxr-b31eb0c88cbcd92bb1203b563364744224f63a77.tar.gz
txr-b31eb0c88cbcd92bb1203b563364744224f63a77.tar.bz2
txr-b31eb0c88cbcd92bb1203b563364744224f63a77.zip
bugfix: don't print unnecessary package prefix.
* lib.c (symbol_visible): Fix wrong accesses to hash table cell: the symbol is in the cdr, not car. This bug means that any symbol which is not in the package is declared not visible and thus requires a package prefix.
-rw-r--r--lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib.c b/lib.c
index ee406c0e..50a79b83 100644
--- a/lib.c
+++ b/lib.c
@@ -5033,7 +5033,7 @@ static val symbol_visible(val package, val sym)
val cell = gethash_e(package->pk.symhash, name);
if (cell)
- return eq(car(cell), sym);
+ return eq(cdr(cell), sym);
}
{
@@ -5044,7 +5044,7 @@ static val symbol_visible(val package, val sym)
val cell = gethash_e(fb_pkg->pk.symhash, name);
if (cell)
- return eq(car(cell), sym);
+ return eq(cdr(cell), sym);
}
}