diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2010-09-27 18:01:12 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2010-09-27 18:01:12 +0200 |
commit | 7971f6927a21f2c1039edf397b57277591f665a9 (patch) | |
tree | 174970e23438524815b487e91b1b40cc55283076 | |
parent | c930fdf055b346ffd6387f41952196219b3fe401 (diff) |
more cleanups
-rw-r--r-- | gtk/channel-base.c | 6 | ||||
-rw-r--r-- | gtk/spice-channel-priv.h | 2 | ||||
-rw-r--r-- | gtk/spice-channel.c | 3 |
3 files changed, 6 insertions, 5 deletions
diff --git a/gtk/channel-base.c b/gtk/channel-base.c index 7501f97..79cc2e2 100644 --- a/gtk/channel-base.c +++ b/gtk/channel-base.c @@ -3,7 +3,7 @@ void base_handle_set_ack(SpiceChannel *channel, spice_msg_in *in) { - spice_channel *c = SPICE_CHANNEL_GET_PRIVATE(channel); + spice_channel *c = channel->priv; SpiceMsgSetAck* ack = spice_msg_in_parsed(in); spice_msg_out *out = spice_msg_out_new(channel, SPICE_MSGC_ACK_SYNC); SpiceMsgcAckSync sync = { @@ -18,7 +18,7 @@ void base_handle_set_ack(SpiceChannel *channel, spice_msg_in *in) void base_handle_ping(SpiceChannel *channel, spice_msg_in *in) { - spice_channel *c = SPICE_CHANNEL_GET_PRIVATE(channel); + spice_channel *c = channel->priv; SpiceMsgPing *ping = spice_msg_in_parsed(in); spice_msg_out *pong = spice_msg_out_new(channel, SPICE_MSGC_PONG); @@ -29,7 +29,7 @@ void base_handle_ping(SpiceChannel *channel, spice_msg_in *in) void base_handle_notify(SpiceChannel *channel, spice_msg_in *in) { - spice_channel *c = SPICE_CHANNEL_GET_PRIVATE(channel); + spice_channel *c = channel->priv; static const char* severity_strings[] = {"info", "warn", "error"}; static const char* visibility_strings[] = {"!", "!!", "!!!"}; diff --git a/gtk/spice-channel-priv.h b/gtk/spice-channel-priv.h index b0b0faa..354d0ee 100644 --- a/gtk/spice-channel-priv.h +++ b/gtk/spice-channel-priv.h @@ -16,8 +16,6 @@ #include "quic.h" #include "rop3.h" -#define SPICE_CHANNEL_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), SPICE_TYPE_CHANNEL, spice_channel)) - struct spice_msg_in { int refcount; SpiceChannel *channel; diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c index 25f8d90..b00dc7d 100644 --- a/gtk/spice-channel.c +++ b/gtk/spice-channel.c @@ -19,6 +19,9 @@ static void spice_channel_send_link(SpiceChannel *channel); /* ------------------------------------------------------------------ */ /* gobject glue */ +#define SPICE_CHANNEL_GET_PRIVATE(obj) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((obj), SPICE_TYPE_CHANNEL, spice_channel)) + G_DEFINE_TYPE (SpiceChannel, spice_channel, G_TYPE_OBJECT); /* Properties */ |