From d081a595dfa053c78f7e3f580f82ca7823f02f74 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 25 Apr 2017 06:38:13 -0700 Subject: Provide access to dlopen. * configure: New test for dlopen. * lib.c (cptr_equal_op): Function renamed to cobj_equal_handle_op, to reflect what it's really doing; it is not specifically to cptr objects. Also changed from static to extern. (cptr_ops): Follow rename. * lib.h (cobj_equal_handle_op): Declared. * sysif.c (cptr_dl_destroy_op): New static function. (dlopen_wrap, dlclose_wrap, dlsym_wrap, dlvsym_wrap): New static functions. (sysif_init): Register new intrinsic functions dlopen, dlclose, dlsym, dlvsym. New variables rtld-lazy, rtld-now, rtld-global, rtld-local, rtld-nodelete, rtld-noload, rtld-deepbind. --- lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib.c') diff --git a/lib.c b/lib.c index 9e2decdd..8eaa81bf 100644 --- a/lib.c +++ b/lib.c @@ -7338,13 +7338,13 @@ void cobj_print_op(val obj, val out, val pretty, struct strm_ctx *ctx) format(out, lit(": ~p>"), coerce(val, obj->co.handle), nao); } -static val cptr_equal_op(val left, val right) +val cobj_equal_handle_op(val left, val right) { return (left->co.handle == right->co.handle) ? t : nil; } static struct cobj_ops cptr_ops = { - cptr_equal_op, + cobj_equal_handle_op, cobj_print_op, cobj_destroy_stub_op, cobj_mark_op, -- cgit v1.2.3