1.1 --- a/templates/native/iconv.c Thu Nov 04 23:44:29 2021 +0100
1.2 +++ b/templates/native/iconv.c Tue Aug 29 01:46:23 2023 +0200
1.3 @@ -1,6 +1,6 @@
1.4 /* Native functions for character set conversion.
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 @@ -33,20 +33,20 @@
1.12 static void __raise_incomplete_sequence_error(__attr value, __attr arg)
1.13 {
1.14 #ifdef __HAVE_posix_iconv_IncompleteSequenceError
1.15 - __Raise(__new_posix_iconv_IncompleteSequenceError(__NULL, value, arg));
1.16 + __Raise(__new_posix_iconv_IncompleteSequenceError(__NULL, __NULL, value, arg));
1.17 #endif /* __HAVE_posix_iconv_IncompleteSequenceError */
1.18 }
1.19
1.20 static void __raise_invalid_sequence_error(__attr value, __attr arg)
1.21 {
1.22 #ifdef __HAVE_posix_iconv_InvalidSequenceError
1.23 - __Raise(__new_posix_iconv_InvalidSequenceError(__NULL, value, arg));
1.24 + __Raise(__new_posix_iconv_InvalidSequenceError(__NULL, __NULL, value, arg));
1.25 #endif /* __HAVE_posix_iconv_InvalidSequenceError */
1.26 }
1.27
1.28 /* Character set conversion. */
1.29
1.30 -__attr __fn_native_iconv_iconv(__attr __self, __attr cd, __attr state)
1.31 +__attr __fn_native_iconv_iconv(__attr __result, __attr __self, __attr cd, __attr state)
1.32 {
1.33 /* cd interpreted as iconv_t */
1.34 iconv_t c = (iconv_t) cd.datavalue;
1.35 @@ -117,7 +117,7 @@
1.36 return __builtins___none_None;
1.37 }
1.38
1.39 -__attr __fn_native_iconv_iconv_close(__attr __self, __attr cd)
1.40 +__attr __fn_native_iconv_iconv_close(__attr __result, __attr __self, __attr cd)
1.41 {
1.42 /* cd interpreted as iconv_t */
1.43 iconv_t c = (iconv_t) cd.datavalue;
1.44 @@ -130,7 +130,7 @@
1.45 return __builtins___none_None;
1.46 }
1.47
1.48 -__attr __fn_native_iconv_iconv_open(__attr __self, __attr tocode, __attr fromcode)
1.49 +__attr __fn_native_iconv_iconv_open(__attr __result, __attr __self, __attr tocode, __attr fromcode)
1.50 {
1.51 /* tocode.__data__ interpreted as string */
1.52 char *t = __load_via_object(__VALUE(tocode), __data__).strvalue;
1.53 @@ -151,7 +151,7 @@
1.54 return attr;
1.55 }
1.56
1.57 -__attr __fn_native_iconv_iconv_reset(__attr __self, __attr cd)
1.58 +__attr __fn_native_iconv_iconv_reset(__attr __result, __attr __self, __attr cd)
1.59 {
1.60 /* cd interpreted as iconv_t */
1.61 iconv_t c = (iconv_t) cd.datavalue;