summaryrefslogtreecommitdiffstats
path: root/ffi.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-06-27 06:39:28 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-06-27 06:39:28 -0700
commit52870f75e9423ae12ac9b3254e4097520c20af86 (patch)
tree93eead0480d51fbc2f07bb4cd16dca3f802b51b5 /ffi.h
parent73874bab389305e76b8fa3726f4494a613735f5a (diff)
downloadtxr-52870f75e9423ae12ac9b3254e4097520c20af86.tar.gz
txr-52870f75e9423ae12ac9b3254e4097520c20af86.tar.bz2
txr-52870f75e9423ae12ac9b3254e4097520c20af86.zip
ffi: prepare for variably sized enum implementation.
This lays the groundwork for enumerations based off types other than int. All we need to do is implement the syntax for this. * ffi.c (ffi_enum_put, ffi_enum_get, ffi_enum_rput, ffi_enum_rget): Retrieve the element type descriptor and recurse into its put, get, rput and rget operation, respectively, instead of hard-coded calls to the int operations. (make_ffi_type_enum): New argument, base_type. Numerous properties of the enum type are taken from base_type: the FFI type, the alignment, size, and alloc, free and clone operations. The base type is installed as eltype. (ffi_type_lookup): Static function relocated. (ffi_type_compile): In the enum case, resolve the int type and pass to make_ffi_type_enum.
Diffstat (limited to 'ffi.h')
0 files changed, 0 insertions, 0 deletions