[glib] giochannel: Remove old win32 codepage ABI compat code



commit fad5f5bd17f2227373b8a511875be5ece172d43c
Author: Christoph Reiter <creiter src gnome org>
Date:   Tue Mar 28 08:02:29 2017 +0200

    giochannel: Remove old win32 codepage ABI compat code
    
    Makes new code link against the normal symbol names again.
    Variants with utf8 suffix are there for existing binaries/ABI compat.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=780634

 glib/giochannel.h |   11 -----------
 glib/giowin32.c   |   44 ++++++++++++++++++--------------------------
 2 files changed, 18 insertions(+), 37 deletions(-)
---
diff --git a/glib/giochannel.h b/glib/giochannel.h
index 3b6c09a..cb55c04 100644
--- a/glib/giochannel.h
+++ b/glib/giochannel.h
@@ -399,17 +399,6 @@ void        g_io_channel_win32_set_debug (GIOChannel *channel,
 
 #endif
 
-#ifndef __GTK_DOC_IGNORE__
-#ifdef G_OS_WIN32
-#define g_io_channel_new_file g_io_channel_new_file_utf8
-
-GLIB_AVAILABLE_IN_ALL
-GIOChannel *g_io_channel_new_file_utf8 (const gchar  *filename,
-                                        const gchar  *mode,
-                                        GError      **error);
-#endif
-#endif /* __GTK_DOC_IGNORE__ */
-
 G_END_DECLS
 
 #endif /* __G_IOCHANNEL_H__ */
diff --git a/glib/giowin32.c b/glib/giowin32.c
index 27bb30f..e659585 100644
--- a/glib/giowin32.c
+++ b/glib/giowin32.c
@@ -1746,32 +1746,6 @@ g_io_channel_new_file (const gchar  *filename,
   return channel;
 }
 
-#if !defined (_WIN64)
-
-#undef g_io_channel_new_file
-
-/* Binary compatibility version. Not for newly compiled code. */
-
-GIOChannel *
-g_io_channel_new_file (const gchar  *filename,
-                       const gchar  *mode,
-                       GError      **error)
-{
-  gchar *utf8_filename = g_locale_to_utf8 (filename, -1, NULL, NULL, error);
-  GIOChannel *retval;
-
-  if (utf8_filename == NULL)
-    return NULL;
-
-  retval = g_io_channel_new_file_utf8 (utf8_filename, mode, error);
-
-  g_free (utf8_filename);
-
-  return retval;
-}
-
-#endif
-
 static GIOStatus
 g_io_win32_unimpl_set_flags (GIOChannel *channel,
                             GIOFlags    flags,
@@ -2245,3 +2219,21 @@ g_io_channel_win32_new_stream_socket (int socket)
 }
 
 #endif
+
+#ifdef G_OS_WIN32
+
+/* Binary compatibility versions. Not for newly compiled code. */
+
+_GLIB_EXTERN GIOChannel *g_io_channel_new_file_utf8 (const gchar  *filename,
+                                                     const gchar  *mode,
+                                                     GError      **error);
+
+GIOChannel *
+g_io_channel_new_file_utf8 (const gchar  *filename,
+                            const gchar  *mode,
+                            GError      **error)
+{
+  return g_io_channel_new_file (filename, mode, error);
+}
+
+#endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]