From 0fdebafd382cee1f29ec1674f946941c036f4a4f Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 6 Jun 2017 20:06:53 -0700 Subject: 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. --- ffi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ffi.c') 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), -- cgit v1.2.3