1.1 --- a/templates/types.h Fri Feb 10 16:01:18 2017 +0100
1.2 +++ b/templates/types.h Fri Feb 10 16:51:17 2017 +0100
1.3 @@ -56,27 +56,33 @@
1.4 /* One of... */
1.5 union
1.6 {
1.7 - __obj * context; /* attribute context */
1.8 - unsigned int min; /* minimum number of parameters */
1.9 - unsigned int code; /* parameter table code for key */
1.10 - struct __attr (*inv)(); /* unbound callable details */
1.11 -
1.12 - size_t size; /* size of value */
1.13 - };
1.14 -
1.15 - /* One of... */
1.16 - union
1.17 - {
1.18 - __obj * value; /* attribute value */
1.19 - const __ptable * ptable;/* parameter table */
1.20 - unsigned int pos; /* parameter table position for key */
1.21 - struct __attr (*fn)(); /* callable details */
1.22 -
1.23 - int intvalue; /* integer value */
1.24 - double floatvalue; /* floating point value */
1.25 - char * strvalue; /* string value */
1.26 - __fragment * seqvalue; /* sequence data */
1.27 - void * datavalue; /* object-specific data */
1.28 + struct {
1.29 + __obj * context; /* attribute context */
1.30 + __obj * value; /* attribute value */
1.31 + };
1.32 + struct {
1.33 + unsigned int min; /* minimum number of parameters */
1.34 + const __ptable * ptable; /* parameter table */
1.35 + };
1.36 + struct {
1.37 + unsigned int code; /* parameter table code for key */
1.38 + unsigned int pos; /* parameter table position for key */
1.39 + };
1.40 + struct {
1.41 + struct __attr (*inv)(); /* unbound callable details */
1.42 + struct __attr (*fn)(); /* callable details */
1.43 + };
1.44 + struct {
1.45 + size_t size; /* size of value */
1.46 + union
1.47 + {
1.48 + int intvalue; /* integer value */
1.49 + double floatvalue; /* floating point value */
1.50 + char * strvalue; /* string value */
1.51 + __fragment * seqvalue; /* sequence data */
1.52 + void * datavalue; /* object-specific data */
1.53 + };
1.54 + };
1.55 };
1.56 } __attr;
1.57
1.58 @@ -108,7 +114,7 @@
1.59
1.60 /* Special null values. */
1.61
1.62 -#define __NULL ((__attr) {{0}, {0}})
1.63 +#define __NULL ((__attr) {{.context=0, .value=0}})
1.64
1.65 /* Function pointer type. */
1.66