From fae5d29a6548c4eacfc2f463d220857d1d1f05a5 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 6 Aug 2019 20:46:37 -0700 Subject: lib: don't GC-protect two non-heap objects. * lib.c (obj_init): The null string literal and "nil" do not require gc protection; they cannot be reclaimed by the garbage collector, which ignores them. Don't waste two slots in the prot_stack on them. This is a remnant from ancient TXR; these variables were protected already in Version 11 from September 2009. At that time, there were no built-in string literal objects; these two objects were heap-allocated. --- lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib.c b/lib.c index 08b84c74..f08c7949 100644 --- a/lib.c +++ b/lib.c @@ -10765,7 +10765,7 @@ static void obj_init(void) */ protect(&packages, &system_package, &keyword_package, - &user_package, &public_package, &null_string, &nil_string, + &user_package, &public_package, &null_list, &equal_f, &eq_f, &eql_f, &car_f, &cdr_f, &null_f, &list_f, &identity_f, &less_f, &greater_f, &prog_string, &env_list, -- cgit v1.2.3