summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 44ef6b0e..7c45907f 100644
--- a/lib.c
+++ b/lib.c
@@ -2358,6 +2358,14 @@ char *chk_strdup_utf8(const char *str)
return copy;
}
+mem_t *chk_copy_obj(mem_t *orig, size_t size)
+{
+ mem_t *copy = chk_malloc(size);
+ assert (!async_sig_enabled);
+ memcpy(copy, orig, size);
+ return copy;
+}
+
val cons(val car, val cdr)
{
val obj = make_obj();