diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-09-19 15:03:12 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-09-19 15:03:12 -0700 |
commit | d2aa4101df1d3b3260ce0057cf8bc1ae7337d49b (patch) | |
tree | 88776dc2457cae24be3bf73ea48d1e10bc3d387b | |
parent | d151476e95942f5bc0b42367f083c89594ef032f (diff) | |
download | txr-d2aa4101df1d3b3260ce0057cf8bc1ae7337d49b.tar.gz txr-d2aa4101df1d3b3260ce0057cf8bc1ae7337d49b.tar.bz2 txr-d2aa4101df1d3b3260ce0057cf8bc1ae7337d49b.zip |
vm, structs: use FLEX_ARRAY macro.
* vm.c (struct vm_closure): Use the FLEX_ARRAY macro to define
the trailing array at the end of the structure instead of
hard-coding [1].
* struct.c (struct struct_inst): Likewise.
-rw-r--r-- | struct.c | 2 | ||||
-rw-r--r-- | vm.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -100,7 +100,7 @@ struct struct_inst { cnum id : sizeof (cnum) * CHAR_BIT - TAG_SHIFT; unsigned lazy : 1; unsigned dirty : 1; - val slot[1]; + val slot[FLEX_ARRAY]; }; val struct_type_s, meth_s, print_s, make_struct_lit_s; @@ -95,7 +95,7 @@ struct vm_closure { int nreg; int nlvl; unsigned ip; - struct vm_env dspl[1]; + struct vm_env dspl[FLEX_ARRAY]; }; val vm_desc_s, vm_closure_s; |