summaryrefslogtreecommitdiffstats
path: root/ffi.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-05-01 22:05:36 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-05-01 22:05:36 -0700
commit8ea362155938863c07a920bdf851b5527e556880 (patch)
tree4844df36a12eb69b16dc96d0f42b38eb02f5b580 /ffi.h
parentac6fdc46539fc1ded418ba2df3bb5ef6ed181007 (diff)
downloadtxr-8ea362155938863c07a920bdf851b5527e556880.tar.gz
txr-8ea362155938863c07a920bdf851b5527e556880.tar.bz2
txr-8ea362155938863c07a920bdf851b5527e556880.zip
ffi: simple typedef mechanism.
* ffi.c (ffi_typedef_hash): New static variable. (ffi_type_compile): Handle undefined atom case by trying through typedef hash. (ffi_typedef): New function. (ffi_init): gc-protect ffi_type_compile variable and initialize it with a hash table. Register ffi-typedef intrinsic. * ffi.h (ffi_typedef): 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 88da4deb..df9e9628 100644
--- a/ffi.h
+++ b/ffi.h
@@ -57,4 +57,5 @@ 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);
+val ffi_typedef(val name, val type);
void ffi_init(void);