From cfbf9c994f3c2cf352fe3dc3ba55df54e01bc94d Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 8 Jun 2016 20:40:34 -0700 Subject: 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. --- lib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib.h') 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); -- cgit v1.2.3