pidgin: 5f79bbf5: perl: Fix chat-related functions.
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Sat Sep 4 21:35:51 EDT 2010
----------------------------------------------------------------------
Revision: 5f79bbf59f5a635ca42876049d3ac856b761d0ad
Parent: 869046ae8047810bc7364fdf203146b14de21082
Author: darkrain42 at pidgin.im
Date: 09/04/10 21:30:56
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/5f79bbf59f5a635ca42876049d3ac856b761d0ad
Changelog:
perl: Fix chat-related functions.
Purple::BuddyList::Chat::new needs to copy the strings, since the
GHashTable is long-listing. The serv_join_chat wrapper needs to
free the hash table, since that one isn't owned by the prpl.
Changes against parent 869046ae8047810bc7364fdf203146b14de21082
patched ChangeLog.API
patched libpurple/plugins/perl/common/BuddyList.xs
patched libpurple/plugins/perl/common/Server.xs
-------------- next part --------------
============================================================
--- libpurple/plugins/perl/common/BuddyList.xs 376288f3605593bd6e58b308091f79f9fcb2a5cf
+++ libpurple/plugins/perl/common/BuddyList.xs 9ec386941d8abed85e1e1df51322fe269de7ed14
@@ -345,14 +345,14 @@ CODE:
char *t_key, *t_value;
CODE:
t_HV = (HV *)SvRV(components);
- t_GHash = g_hash_table_new(g_str_hash, g_str_equal);
+ t_GHash = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
for (t_HE = hv_iternext(t_HV); t_HE != NULL; t_HE = hv_iternext(t_HV) ) {
t_key = hv_iterkey(t_HE, &len);
t_SV = *hv_fetch(t_HV, t_key, len, 0);
t_value = SvPVutf8_nolen(t_SV);
- g_hash_table_insert(t_GHash, t_key, t_value);
+ g_hash_table_insert(t_GHash, g_strdup(t_key), g_strdup(t_value));
}
RETVAL = purple_chat_new(account, alias, t_GHash);
============================================================
--- ChangeLog.API 2021779471b2ba7707a1de48aea9d29984f82a7e
+++ ChangeLog.API 88353d40cd6e2ce31ba59fc1ebb2b5c1d4918cad
@@ -1,6 +1,11 @@ version 2.7.4 (MM/DD/YYYY):
Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul
version 2.7.4 (MM/DD/YYYY):
+ Perl:
+ Changed:
+ * Purple::BuddyList::Chat::new now works properly. Thanks
+ to Rafael in devel at conference.pidgin.im for reporting and
+ testing.
version 2.7.3 (08/10/2010):
libpurple:
============================================================
--- libpurple/plugins/perl/common/Server.xs 76bfd20797a49127e64aef799082e07c85fd9178
+++ libpurple/plugins/perl/common/Server.xs 20c2e3da44dfc528bed0780953e2ad37e011bbef
@@ -144,6 +144,7 @@ CODE:
g_hash_table_insert(t_GHash, t_key, t_value);
}
serv_join_chat(conn, t_GHash);
+ g_hash_table_destroy(t_GHash);
void
serv_move_buddy(buddy, group1, group2)
More information about the Commits
mailing list