summaryrefslogtreecommitdiffstats
path: root/ffi.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-05-01 21:42:20 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-05-01 21:42:20 -0700
commitac6fdc46539fc1ded418ba2df3bb5ef6ed181007 (patch)
treed0bc32318c71aee5bd77a80a08f39940e34a13a2 /ffi.h
parent1689bfa3d7f348f8c0fa7a010ba1c18b032e8906 (diff)
downloadtxr-ac6fdc46539fc1ded418ba2df3bb5ef6ed181007.tar.gz
txr-ac6fdc46539fc1ded418ba2df3bb5ef6ed181007.tar.bz2
txr-ac6fdc46539fc1ded418ba2df3bb5ef6ed181007.zip
ffi: support for duplicating type objects.
* ffi.c (struct txr_ffi_type): New member, dup. (ffi_struct_dup, ffi_ptr_dup): New static functions. (make_ffi_type_pointer, make_ffi_type_struct, make_ffi_type_array): Set up dup virtual function for these types. (ffi_copy_type): New function. (ffi_init): Register ffi-copy-type intrinsic. * ffi.h (ffi_copy_type): Declared.
Diffstat (limited to 'ffi.h')
-rw-r--r--ffi.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/ffi.h b/ffi.h
index 2845ccc4..88da4deb 100644
--- a/ffi.h
+++ b/ffi.h
@@ -56,4 +56,5 @@ val ffi_make_call_desc(val ntotal, val nfixed, val rettype, val argtypes);
val ffi_make_closure(val fun, val call_desc);
mem_t *ffi_closure_get_fptr(val closure);
val ffi_call_wrap(val ffi_call_desc, val fptr, val args);
+val ffi_copy_type(val type);
void ffi_init(void);