summaryrefslogtreecommitdiffstats
path: root/ffi.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-05-31 22:20:02 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-05-31 22:20:02 -0700
commitfe4ee294894e05042b806fa2202b47ae635dc2a7 (patch)
treed4392aa71ac603aae00c6585d97f73a6688d4554 /ffi.h
parent8c63f55f7731bb8503c898ede73207bec0614661 (diff)
downloadtxr-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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/ffi.h b/ffi.h
index 5d89e452..9f7876ef 100644
--- a/ffi.h
+++ b/ffi.h
@@ -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);