summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-04-28 06:24:05 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-04-28 06:24:05 -0700
commit1473e5c50bae68d3fe2ac55eff12363385dc48b7 (patch)
treeb413cecce7e295ce67a3beed00f6cfda1947e9f1 /lib.h
parent046fcbaca4d0abb62b572231a5f941514e92d35b (diff)
downloadtxr-1473e5c50bae68d3fe2ac55eff12363385dc48b7.tar.gz
txr-1473e5c50bae68d3fe2ac55eff12363385dc48b7.tar.bz2
txr-1473e5c50bae68d3fe2ac55eff12363385dc48b7.zip
ffi: allow ptr-in-out passing of cptr.
* ffi.c (ffi_ptr_alloc): New static function. (ffi_type_compile): Give the cptr type alloc and free functions: alloc just retrives the address of the pointer inside the cptr object (pointer to pointer); free is a noop. (cptr_make): New static function. (ffi_init): Register cptr_make as cptr intrinsic. Register cptr-null intrinsic variable denoting a ready-made null pointer. * lib.c (cptr_addr_of): New function. * lib.h (cptr_addr_of): Declared.
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib.h b/lib.h
index 943fd3ac..5c74abf5 100644
--- a/lib.h
+++ b/lib.h
@@ -936,6 +936,7 @@ mem_t *cobj_handle(val cobj, val cls_sym);
struct cobj_ops *cobj_ops(val cobj, val cls_sym);
val cptr(mem_t *ptr);
mem_t *cptr_get(val cptr);
+mem_t **cptr_addr_of(val cptr);
val assoc(val key, val list);
val assql(val key, val list);
val rassoc(val key, val list);