diff options
author | Jan-Erik Rediger <badboy@archlinux.us> | 2015-06-25 17:10:02 +0200 |
---|---|---|
committer | Jan-Erik Rediger <badboy@archlinux.us> | 2015-06-25 17:10:02 +0200 |
commit | 2fc31e74b124962454b46ae3def3addc6b2db090 (patch) | |
tree | 786838fabbcb2841fb4a3727ff082274fe7ce5d0 | |
parent | b9cc0add2ca68f2d2b3be69d33b46056b1810a03 (diff) | |
parent | 1c884ec75bad0b6cc444496f25f3ce42afbfce31 (diff) |
Merge pull request #341 from Cylix/glib_adapter_cpp_compilation
Use explicit casts for void* pointer in order to compile in C++
-rw-r--r-- | adapters/glib.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/adapters/glib.h b/adapters/glib.h index e13eee7..e0a6411 100644 --- a/adapters/glib.h +++ b/adapters/glib.h @@ -16,43 +16,43 @@ typedef struct static void redis_source_add_read (gpointer data) { - RedisSource *source = data; + RedisSource *source = (RedisSource *)data; g_return_if_fail(source); source->poll_fd.events |= G_IO_IN; - g_main_context_wakeup(g_source_get_context(data)); + g_main_context_wakeup(g_source_get_context((GSource *)data)); } static void redis_source_del_read (gpointer data) { - RedisSource *source = data; + RedisSource *source = (RedisSource *)data; g_return_if_fail(source); source->poll_fd.events &= ~G_IO_IN; - g_main_context_wakeup(g_source_get_context(data)); + g_main_context_wakeup(g_source_get_context((GSource *)data)); } static void redis_source_add_write (gpointer data) { - RedisSource *source = data; + RedisSource *source = (RedisSource *)data; g_return_if_fail(source); source->poll_fd.events |= G_IO_OUT; - g_main_context_wakeup(g_source_get_context(data)); + g_main_context_wakeup(g_source_get_context((GSource *)data)); } static void redis_source_del_write (gpointer data) { - RedisSource *source = data; + RedisSource *source = (RedisSource *)data; g_return_if_fail(source); source->poll_fd.events &= ~G_IO_OUT; - g_main_context_wakeup(g_source_get_context(data)); + g_main_context_wakeup(g_source_get_context((GSource *)data)); } static void redis_source_cleanup (gpointer data) { - RedisSource *source = data; + RedisSource *source = (RedisSource *)data; g_return_if_fail(source); @@ -63,7 +63,7 @@ redis_source_cleanup (gpointer data) * current main loop. However, we will remove the GPollFD. */ if (source->poll_fd.fd >= 0) { - g_source_remove_poll(data, &source->poll_fd); + g_source_remove_poll((GSource *)data, &source->poll_fd); source->poll_fd.fd = -1; } } |