diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2015-10-12 16:31:50 +0200 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2015-10-14 10:07:36 +0200 |
commit | 13662bb367692817f88f1116476197fe32defac6 (patch) | |
tree | 6071fb49c06a0b06d9ca916492294435babbc348 | |
parent | 2c26ee3c37691f51e1746d9d1004635dd356c28a (diff) |
Rename display_cache::cache_unref to cache_free
display_cache is no longer refcounted since commit c9d4773, but this is
not an issue as even before, the fact that it was refcounted was not
used as there was no corresponding cache_ref() call (and
g_hash_table_ref() was not called directly either).
As the next commit will free memory from cache_unref() rather than just
releasing a reference, it's better to make it obvious that this method
is a _free() method rather than an _unref() one.
-rw-r--r-- | src/channel-cursor.c | 2 | ||||
-rw-r--r-- | src/channel-display.c | 2 | ||||
-rw-r--r-- | src/spice-channel-cache.h | 2 | ||||
-rw-r--r-- | src/spice-session.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/channel-cursor.c b/src/channel-cursor.c index 6a9d60a..0765209 100644 --- a/src/channel-cursor.c +++ b/src/channel-cursor.c @@ -91,7 +91,7 @@ static void spice_cursor_channel_finalize(GObject *obj) SpiceCursorChannel *channel = SPICE_CURSOR_CHANNEL(obj); SpiceCursorChannelPrivate *c = channel->priv; - g_clear_pointer(&c->cursors, cache_unref); + g_clear_pointer(&c->cursors, cache_free); if (G_OBJECT_CLASS(spice_cursor_channel_parent_class)->finalize) G_OBJECT_CLASS(spice_cursor_channel_parent_class)->finalize(obj); diff --git a/src/channel-display.c b/src/channel-display.c index 9f9d62a..46e9829 100644 --- a/src/channel-display.c +++ b/src/channel-display.c @@ -142,7 +142,7 @@ static void spice_display_channel_finalize(GObject *object) clear_surfaces(SPICE_CHANNEL(object), FALSE); g_hash_table_unref(c->surfaces); clear_streams(SPICE_CHANNEL(object)); - g_clear_pointer(&c->palettes, cache_unref); + g_clear_pointer(&c->palettes, cache_free); if (G_OBJECT_CLASS(spice_display_channel_parent_class)->finalize) G_OBJECT_CLASS(spice_display_channel_parent_class)->finalize(object); diff --git a/src/spice-channel-cache.h b/src/spice-channel-cache.h index 6e2d084..238ceb7 100644 --- a/src/spice-channel-cache.h +++ b/src/spice-channel-cache.h @@ -128,7 +128,7 @@ static inline void cache_clear(display_cache *cache) g_hash_table_remove_all(cache->table); } -static inline void cache_unref(display_cache *cache) +static inline void cache_free(display_cache *cache) { g_hash_table_unref(cache->table); } diff --git a/src/spice-session.c b/src/spice-session.c index 85640a5..c673fa2 100644 --- a/src/spice-session.c +++ b/src/spice-session.c @@ -372,7 +372,7 @@ spice_session_finalize(GObject *gobject) g_strfreev(s->secure_channels); g_free(s->shared_dir); - g_clear_pointer(&s->images, cache_unref); + g_clear_pointer(&s->images, cache_free); glz_decoder_window_destroy(s->glz_window); g_clear_pointer(&s->pubkey, g_byte_array_unref); |