diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-05-01 22:05:36 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-05-01 22:05:36 -0700 |
commit | 8ea362155938863c07a920bdf851b5527e556880 (patch) | |
tree | 4844df36a12eb69b16dc96d0f42b38eb02f5b580 /ffi.h | |
parent | ac6fdc46539fc1ded418ba2df3bb5ef6ed181007 (diff) | |
download | txr-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.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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); |