aboutsummaryrefslogtreecommitdiff
path: root/strbuf.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--strbuf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/strbuf.c b/strbuf.c
index 455100a2..0e56468b 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -70,7 +70,10 @@ int DEEP_COPY(strbuf)(strbuf* dest, strbuf* src) {
}
if (src->scm != NULL) {
+ /* The magic SCM type is copied when reassigned. */
dest->scm = src->scm;
+ /* NOTE This is a bit of a leaky abstraction. */
+ scm_gc_protect_object(dest->scm);
}
dest->len = src->len;