1.1 --- a/templates/native/unicode.c Thu Nov 04 23:44:29 2021 +0100
1.2 +++ b/templates/native/unicode.c Tue Aug 29 01:46:23 2023 +0200
1.3 @@ -1,6 +1,6 @@
1.4 /* Native functions for Unicode operations.
1.5
1.6 -Copyright (C) 2016, 2017, 2021 Paul Boddie <paul@boddie.org.uk>
1.7 +Copyright (C) 2016, 2017, 2021, 2023 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 @@ -69,7 +69,7 @@
1.12
1.13 /* Unicode operations. */
1.14
1.15 -__attr __fn_native_unicode_unicode_len(__attr __self, __attr _data, __attr _size)
1.16 +__attr __fn_native_unicode_unicode_len(__attr __result, __attr __self, __attr _data, __attr _size)
1.17 {
1.18 /* _data interpreted as string.__data__ */
1.19 char *s = _data.strvalue;
1.20 @@ -85,7 +85,7 @@
1.21 return __new_int(c);
1.22 }
1.23
1.24 -__attr __fn_native_unicode_unicode_ord(__attr __self, __attr _data, __attr _size)
1.25 +__attr __fn_native_unicode_unicode_ord(__attr __result, __attr __self, __attr _data, __attr _size)
1.26 {
1.27 /* _data interpreted as string.__data__ */
1.28 char *s = _data.strvalue;
1.29 @@ -119,7 +119,7 @@
1.30 return __new_int(c);
1.31 }
1.32
1.33 -__attr __fn_native_unicode_unicode_substr(__attr __self, __attr _data, __attr _size, __attr start, __attr end, __attr step)
1.34 +__attr __fn_native_unicode_unicode_substr(__attr __result, __attr __self, __attr _data, __attr _size, __attr start, __attr end, __attr step)
1.35 {
1.36 /* _data interpreted as string.__data__ */
1.37 char *s = _data.strvalue, *sub;
1.38 @@ -193,7 +193,7 @@
1.39 return __new_str(sub, resultsize);
1.40 }
1.41
1.42 -__attr __fn_native_unicode_unicode_unichr(__attr __self, __attr value)
1.43 +__attr __fn_native_unicode_unicode_unichr(__attr __result, __attr __self, __attr value)
1.44 {
1.45 /* value interpreted as int */
1.46 int i = __TOINT(value);