Explorar o código

move iconv_close to its own translation unit

this is in preparation to support stateful conversion descriptors,
which are necessarily allocated and thus must be freed in iconv_close.
putting it in a separate TU will avoid pulling in free if iconv_close
is not referenced.
Rich Felker %!s(int64=7) %!d(string=hai) anos
pai
achega
bff59d13a8
Modificáronse 2 ficheiros con 6 adicións e 5 borrados
  1. 0 5
      src/locale/iconv.c
  2. 6 0
      src/locale/iconv_close.c

+ 0 - 5
src/locale/iconv.c

@@ -129,11 +129,6 @@ iconv_t iconv_open(const char *to, const char *from)
 	return combine_to_from(t, f);
 }
 
-int iconv_close(iconv_t cd)
-{
-	return 0;
-}
-
 static unsigned get_16(const unsigned char *s, int e)
 {
 	e &= 1;

+ 6 - 0
src/locale/iconv_close.c

@@ -0,0 +1,6 @@
+#include <iconv.h>
+
+int iconv_close(iconv_t cd)
+{
+	return 0;
+}