summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index d07a03ca..374b038a 100644
--- a/lib.c
+++ b/lib.c
@@ -7832,6 +7832,13 @@ val cptr_obj(val obj, val type_sym_in)
return cptr_typed(coerce(mem_t *, obj), type_sym, 0);
}
+val cptr_buf(val buf, val type_sym_in)
+{
+ val type_sym = default_null_arg(type_sym_in);
+ mem_t *ptr = buf_get(buf, lit("cptr-buf"));
+ return cptr_typed(ptr, type_sym, 0);
+}
+
val cptr_zap(val cptr)
{
(void) cptr_handle(cptr, nil, lit("cptr-zap"));