diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-05-31 22:20:02 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-05-31 22:20:02 -0700 |
commit | fe4ee294894e05042b806fa2202b47ae635dc2a7 (patch) | |
tree | d4392aa71ac603aae00c6585d97f73a6688d4554 /ffi.h | |
parent | 8c63f55f7731bb8503c898ede73207bec0614661 (diff) | |
download | txr-fe4ee294894e05042b806fa2202b47ae635dc2a7.tar.gz txr-fe4ee294894e05042b806fa2202b47ae635dc2a7.tar.bz2 txr-fe4ee294894e05042b806fa2202b47ae635dc2a7.zip |
ffi: new feature: enums.
* ffi.c (enum_s): New symbol variable.
(struct txr_ffi_type): New member, sym_num, num_sym.
(ffi_enum_type_mark): New static function.
(ffi_type_enum_ops): New static structure.
(ffi_enum_put, ffi_enum_get, ffi_enum_rput, ffi_enum_rget):
New static functions.
(make_ffi_type_enum): New static function.
(ffi_type_compile): Extend with enum syntax.
(ffi_init): Initialize enum_s with new interned symbol.
* ffi.c (enum_s): Declared.
* txr.1: Documented.
Diffstat (limited to 'ffi.h')
-rw-r--r-- | ffi.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -53,6 +53,8 @@ extern val closure_s; extern val sbit_s, ubit_s; +extern val enum_s; + extern val ffi_type_s, ffi_call_desc_s, ffi_closure_s; val ffi_type_compile(val syntax); |