summaryrefslogtreecommitdiffstats
path: root/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gc.c b/gc.c
index adaf526e..0069dae3 100644
--- a/gc.c
+++ b/gc.c
@@ -269,6 +269,17 @@ val make_obj(void)
abort();
}
+val copy_obj(val orig)
+{
+ val copy = make_obj();
+ *copy = *orig;
+#if CONFIG_GEN_GC
+ copy->t.fincount = 0;
+ copy->t.gen = 0;
+#endif
+ return copy;
+}
+
static void finalize(val obj)
{
switch (convert(type_t, obj->t.type)) {