Skip to content

Commit

Permalink
Use g_memdump2 for glib 2.68 or greater
Browse files Browse the repository at this point in the history
g_memdump is deprecated in glib 2.68.0.

Signed-off-by: Björn Bidar <[email protected]>
  • Loading branch information
Thaodan committed Sep 28, 2022
1 parent 513e94c commit 5cfff4b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion librocketchat.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
#define g_hash_table_contains(hash_table, key) g_hash_table_lookup_extended(hash_table, key, NULL, NULL)
#endif /* 2.32.0 */

#if !GLIB_CHECK_VERSION(2, 68, 0) && !PURPLE_VERSION_CHECK(2, 14, 2)
#define g_memdump2 g_memdump
#endif

static gboolean
g_str_insensitive_equal(gconstpointer v1, gconstpointer v2)
{
Expand Down Expand Up @@ -3682,7 +3686,7 @@ rc_got_avatar(RocketChatAccount *ya, JsonNode *node, gpointer user_data, JsonObj

response_str = g_dataset_get_data(node, "raw_body");
response_len = json_object_get_int_member(response, "len");
response_dup = g_memdup(response_str, response_len);
response_dup = g_memdup2(response_str, response_len);

purple_buddy_icons_set_for_user(ya->account, purple_buddy_get_name(buddy), response_dup, response_len, NULL);
}
Expand Down

0 comments on commit 5cfff4b

Please sign in to comment.