diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-06-06 20:06:53 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-06-06 20:06:53 -0700 |
commit | 0fdebafd382cee1f29ec1674f946941c036f4a4f (patch) | |
tree | df0139411c21b6c390972325c196ea85d5d840d1 /ffi.c | |
parent | ca0e0e2abfbc4f9a04e37cec5de59a4acd8dde35 (diff) | |
download | txr-0fdebafd382cee1f29ec1674f946941c036f4a4f.tar.gz txr-0fdebafd382cee1f29ec1674f946941c036f4a4f.tar.bz2 txr-0fdebafd382cee1f29ec1674f946941c036f4a4f.zip |
ffi: bugfix: assign evaluated syntax to bitfield.
* ffi.c (ffi_type_compile): Give the bitfield type
the evaluated syntax where the width expression
is reduced to an integer value.
Diffstat (limited to 'ffi.c')
-rw-r--r-- | ffi.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -3116,7 +3116,8 @@ val ffi_type_compile(val syntax) } else if (sym == sbit_s || sym == ubit_s) { val nbits = ffi_eval_expr(cadr(syntax), nil, nil); cnum nb = c_num(nbits); - val type = make_ffi_type_builtin(syntax, integer_s, 0, 0, + val xsyntax = list(sym, nbits, nao); + val type = make_ffi_type_builtin(xsyntax, integer_s, 0, 0, &ffi_type_void, if3(sym == sbit_s, ffi_sbit_put, ffi_ubit_put), |