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
This commit is contained in:
Christoph Reiter 2017-03-28 08:02:29 +02:00
parent d1528402ab
commit fad5f5bd17
2 changed files with 18 additions and 37 deletions

View File

@ -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__ */

View File

@ -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