summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-06-08 20:40:34 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-06-08 20:40:34 -0700
commitcfbf9c994f3c2cf352fe3dc3ba55df54e01bc94d (patch)
tree99f12b66af1faf928d5bdd07bf38019fc35a2020 /lib.h
parentf50c31c9571d96dcd6ec3880e12f0357a56bbcb6 (diff)
downloadtxr-cfbf9c994f3c2cf352fe3dc3ba55df54e01bc94d.tar.gz
txr-cfbf9c994f3c2cf352fe3dc3ba55df54e01bc94d.tar.bz2
txr-cfbf9c994f3c2cf352fe3dc3ba55df54e01bc94d.zip
Fixing semantics of makunbound.
* eval.c (unbound_s): New symbol variable. (lookup_var): If a dynamic binding has the special sys:unbound symbol as its value, then return nil, so the behavior is as if there is no binding. (makunbound): If the symbol exists in a dynamic environment, then replace its value with sys:unbound, making it look unbound. (eval_init): Initialize unbound_s. * lib.h (us_car, us_cdr): New inline functions. * txr.1: New dialect notes under boundp. Updated the makunbound documentation. Separated makunbound documentation from fmakunbound and mmakunbound. Added compatibility notes.
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib.h b/lib.h
index e8e6d4cd..c815658a 100644
--- a/lib.h
+++ b/lib.h
@@ -478,6 +478,8 @@ val type_check3(val obj, int, int, int);
val class_check(val cobj, val class_sym);
val car(val cons);
val cdr(val cons);
+INLINE val us_car(val cons) { return cons->c.car; }
+INLINE val us_cdr(val cons) { return cons->c.cdr; }
val rplaca(val cons, val new_car);
val rplacd(val cons, val new_car);
val sys_rplaca(val cons, val new_car);