summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2009-12-09 20:17:53 -0800
committerKaz Kylheku <kaz@kylheku.com>2009-12-09 20:17:53 -0800
commit440ed64162b328a51a911f2586c16513c2cfed67 (patch)
treecc6618d931585cbed81df544e35b2368c77e55e7 /lib.c
parent08ee01ea9e6bd1bedd565f9e0e1c1a8938710887 (diff)
downloadtxr-440ed64162b328a51a911f2586c16513c2cfed67.tar.gz
txr-440ed64162b328a51a911f2586c16513c2cfed67.tar.bz2
txr-440ed64162b328a51a911f2586c16513c2cfed67.zip
* hash.c (sethash): New function.
* hash.h (sethash): Declared. * lib.c (cobj_handle): New function. * lib.h (cobj_handle): Declared.
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("#<"));