aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorCalvin Rose <calsrose@gmail.com>2019-06-19 20:07:40 -0400
committerCalvin Rose <calsrose@gmail.com>2019-06-19 20:07:40 -0400
commit1a7691dade102c402c56265a6010daff6a1278ea (patch)
treee1218a3fae27db951cf6a61a598a6663b86c5b75
parentUpdate CHANGELOG.md (diff)
Flatten environment binding tables.
For some reason, these tables used prototypes. There seems to be no need for this.
-rw-r--r--src/core/specials.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/core/specials.c b/src/core/specials.c
index 91619a0c..46682236 100644
--- a/src/core/specials.c
+++ b/src/core/specials.c
@@ -278,12 +278,10 @@ static int varleaf(
JanetCompiler *c,
const uint8_t *sym,
JanetSlot s,
- JanetTable *attr) {
+ JanetTable *reftab) {
if (c->scope->flags & JANET_SCOPE_TOP) {
/* Global var, generate var */
JanetSlot refslot;
- JanetTable *reftab = janet_table(1);
- reftab->proto = attr;
JanetArray *ref = janet_array(1);
janet_array_push(ref, janet_wrap_nil());
janet_table_put(reftab, janet_ckeywordv("ref"), janet_wrap_array(ref));
@@ -312,12 +310,10 @@ static int defleaf(
JanetCompiler *c,
const uint8_t *sym,
JanetSlot s,
- JanetTable *attr) {
+ JanetTable *tab) {
if (c->scope->flags & JANET_SCOPE_TOP) {
- JanetTable *tab = janet_table(2);
janet_table_put(tab, janet_ckeywordv("source-map"),
janet_wrap_tuple(janetc_make_sourcemap(c)));
- tab->proto = attr;
JanetSlot valsym = janetc_cslot(janet_ckeywordv("value"));
JanetSlot tabslot = janetc_cslot(janet_wrap_table(tab));