diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2023-06-10 17:14:09 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2023-06-10 17:14:09 -0700 |
commit | af1b46c2ad150f9ef3a8a58f9286429105ad0190 (patch) | |
tree | cc75744126ae7a3dfaa7458aaebe37c7f8339d71 | |
parent | eb62dd3bbcb458685cb0510dcf3991263c59b4df (diff) | |
download | txr-af1b46c2ad150f9ef3a8a58f9286429105ad0190.tar.gz txr-af1b46c2ad150f9ef3a8a58f9286429105ad0190.tar.bz2 txr-af1b46c2ad150f9ef3a8a58f9286429105ad0190.zip |
lib: string bug spotted on Solaris.
* lib.c (string_finish): On platforms where we do not
HAVE_MALLOC_USABLE_SIZE, there is a compiler diagnostic.
The code is inappropriately using the set macro and
mkloc to assign the st->st.alloc member, which is just
a number (cnum type), and not a val. The set macro
is only needed when mutating a gc heap object to point to
another gc heap object.
-rw-r--r-- | lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -5230,7 +5230,7 @@ val string_finish(val str) alloc = len + 1; str->st.str = chk_wrealloc(str->st.str, alloc); #if !HAVE_MALLOC_USABLE_SIZE - set(mkloc(str->st.alloc, str), num(alloc)); + str->st.alloc = alloc; #endif } } |