summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-06-06 20:06:53 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-06-06 20:06:53 -0700
commit0fdebafd382cee1f29ec1674f946941c036f4a4f (patch)
treedf0139411c21b6c390972325c196ea85d5d840d1
parentca0e0e2abfbc4f9a04e37cec5de59a4acd8dde35 (diff)
downloadtxr-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.
-rw-r--r--ffi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ffi.c b/ffi.c
index 89a83cd9..d961478a 100644
--- a/ffi.c
+++ b/ffi.c
@@ -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),