summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index b38212c5..8094f678 100644
--- a/lib.c
+++ b/lib.c
@@ -1644,6 +1644,12 @@ val cobj(mem_t *handle, val cls_sym, struct cobj_ops *ops)
return obj;
}
+mem_t *cobj_handle(val cobj, val cls_sym)
+{
+ class_check(cobj, cls_sym);
+ return cobj->co.handle;
+}
+
void cobj_print_op(val obj, val out)
{
put_string(out, lit("#<"));