1.1 --- a/templates/native/common.c Sat Feb 11 15:34:30 2017 +0100
1.2 +++ b/templates/native/common.c Sat Feb 11 16:04:40 2017 +0100
1.3 @@ -1,6 +1,6 @@
1.4 /* Common operations for native functions.
1.5
1.6 -Copyright (C) 2016 Paul Boddie <paul@boddie.org.uk>
1.7 +Copyright (C) 2016, 2017 Paul Boddie <paul@boddie.org.uk>
1.8
1.9 This program is free software; you can redistribute it and/or modify it under
1.10 the terms of the GNU General Public License as published by the Free Software
1.11 @@ -34,11 +34,10 @@
1.12 return attr;
1.13 }
1.14
1.15 -__attr __new_str(char *s, size_t size)
1.16 +__attr __new_str(char *s)
1.17 {
1.18 /* Create a new string and mutate the __data__ and __key__ attributes. */
1.19 __attr attr = __new(&__InstanceTable___builtins___str_string, &__builtins___str_string, sizeof(__obj___builtins___str_string));
1.20 - attr.value->attrs[__pos___data__].size = size;
1.21 attr.value->attrs[__pos___data__].strvalue = s;
1.22 attr.value->attrs[__pos___key__] = __NULL;
1.23 return attr;