1.1 --- a/templates/types.h Tue Nov 09 22:11:58 2021 +0100
1.2 +++ b/templates/types.h Wed Nov 10 00:10:44 2021 +0100
1.3 @@ -42,6 +42,7 @@
1.4 typedef struct __table
1.5 {
1.6 const __pos size;
1.7 + const size_t trailing_size;
1.8 const __code attrs[];
1.9 } __table;
1.10
1.11 @@ -120,7 +121,7 @@
1.12
1.13 } __obj;
1.14
1.15 -#define __INSTANCE_SIZE(NUMBER) ((NUMBER) * sizeof(__attr) + sizeof(__table *) + sizeof(__ppos))
1.16 +#define __INSTANCE_SIZE(REF) ((REF)->table->size * sizeof(__attr) + sizeof(__table *) + sizeof(__ppos) + (REF)->table->trailing_size)
1.17
1.18 /* Fragments are simple collections of attributes employed by sequence types.
1.19 They provide the basis of lists and tuples. */