diff --git a/src/struct.c b/src/struct.c index 33a0f841..1ef9eca5 100644 --- a/src/struct.c +++ b/src/struct.c @@ -25,8 +25,11 @@ SCM make_struct (SCM type, SCM fields, SCM printer) { long size = 2 + length__ (fields); + SCM x = alloc (1); SCM v = alloc (size); - SCM x = make_cell (TSTRUCT, size, v); + TYPE (x) = TSTRUCT; + LENGTH (x) = size; + STRUCT (x) = v; copy_cell (v, vector_entry (type)); copy_cell (cell_ref (v, 1), vector_entry (printer)); long i;