1.1 --- a/templates/types.h Fri Dec 02 00:55:45 2016 +0100
1.2 +++ b/templates/types.h Fri Dec 02 18:31:20 2016 +0100
1.3 @@ -83,15 +83,14 @@
1.4 "buckets" used in hash tables. Here, separate lists of keys and values hold
1.5 attributes referring to the actual keys and corresponding values. */
1.6
1.7 -#define __MAPPING_BUCKETS 10
1.8 -
1.9 typedef struct __mapping
1.10 {
1.11 - __fragment *keys[__MAPPING_BUCKETS];
1.12 - __fragment *values[__MAPPING_BUCKETS];
1.13 + unsigned int size, capacity;
1.14 + __fragment **keys; /* array of key arrays */
1.15 + __fragment **values; /* array of value arrays */
1.16 } __mapping;
1.17
1.18 -#define __MAPPING_SIZE(NUMBER) (2 * NUMBER * sizeof(__fragment *) + sizeof(unsigned int))
1.19 +#define __MAPPING_SIZE(NUMBER) (2 * NUMBER * sizeof(__fragment *) + 2 * sizeof(unsigned int))
1.20
1.21 /* Special instance position value. The pos member of __obj refers to the
1.22 special type attribute for classes, indicating which position holds the