1.1 --- a/templates/native/common.c Thu Mar 23 16:40:57 2017 +0100
1.2 +++ b/templates/native/common.c Thu Mar 23 23:36:32 2017 +0100
1.3 @@ -26,20 +26,12 @@
1.4
1.5 /* Utility functions. */
1.6
1.7 -__attr __new_int(int i)
1.8 -{
1.9 - /* Create a new integer and mutate the __data__ attribute. */
1.10 - __attr attr = __NEWINSTANCEIM(__builtins___int_int);
1.11 - attr.value->attrs[__ATTRPOS(__data__)].intvalue = i;
1.12 - return attr;
1.13 -}
1.14 -
1.15 __attr __new_str(char *s, int size)
1.16 {
1.17 /* Create a new string and mutate the __data__, __size__ and __key__ attributes. */
1.18 __attr attr = __NEWINSTANCE(__builtins___str_string);
1.19 attr.value->attrs[__ATTRPOS(__data__)].strvalue = s;
1.20 - attr.value->attrs[__ATTRPOS(__size__)].intvalue = size;
1.21 + attr.value->attrs[__ATTRPOS(__size__)] = __INTVALUE(size);
1.22 attr.value->attrs[__ATTRPOS(__key__)] = __NULL;
1.23 return attr;
1.24 }