gio: Use the new private instance data declaration

Use the newly added macros, and remove the explicit calls to
g_type_class_add_private().

https://bugzilla.gnome.org/show_bug.cgi?id=700035
This commit is contained in:
Emmanuele Bassi
2013-06-11 00:29:58 +01:00
parent aba80eea6c
commit 32747def4b
76 changed files with 387 additions and 730 deletions

View File

@@ -60,8 +60,6 @@
* Since: 2.22
*/
G_DEFINE_TYPE (GSocketConnection, g_socket_connection, G_TYPE_IO_STREAM);
enum
{
PROP_NONE,
@@ -89,6 +87,8 @@ static gboolean g_socket_connection_close_finish (GIOStream *stream,
GAsyncResult *result,
GError **error);
G_DEFINE_TYPE_WITH_PRIVATE (GSocketConnection, g_socket_connection, G_TYPE_IO_STREAM)
static GInputStream *
g_socket_connection_get_input_stream (GIOStream *io_stream)
{
@@ -399,8 +399,6 @@ g_socket_connection_class_init (GSocketConnectionClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GIOStreamClass *stream_class = G_IO_STREAM_CLASS (klass);
g_type_class_add_private (klass, sizeof (GSocketConnectionPrivate));
gobject_class->set_property = g_socket_connection_set_property;
gobject_class->get_property = g_socket_connection_get_property;
gobject_class->constructed = g_socket_connection_constructed;
@@ -427,9 +425,7 @@ g_socket_connection_class_init (GSocketConnectionClass *klass)
static void
g_socket_connection_init (GSocketConnection *connection)
{
connection->priv = G_TYPE_INSTANCE_GET_PRIVATE (connection,
G_TYPE_SOCKET_CONNECTION,
GSocketConnectionPrivate);
connection->priv = g_socket_connection_get_private (connection);
}
static gboolean