summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-08-06 20:46:37 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-08-06 20:46:37 -0700
commitfae5d29a6548c4eacfc2f463d220857d1d1f05a5 (patch)
tree390e94bdc24a9dae4d5880ed25c6a4c40a5ac764
parentd7ff12fb7667e6b8098c85b545417dd0e8e1aa31 (diff)
downloadtxr-fae5d29a6548c4eacfc2f463d220857d1d1f05a5.tar.gz
txr-fae5d29a6548c4eacfc2f463d220857d1d1f05a5.tar.bz2
txr-fae5d29a6548c4eacfc2f463d220857d1d1f05a5.zip
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.
-rw-r--r--lib.c2
1 files changed, 1 insertions, 1 deletions
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,