# HG changeset patch # User Etan Reisner # Date 1160685527 0 # Node ID b1fcd2fc903ab3b80f32c5cc72e2497617f968b5 # Parent 023dfc2ce5e39e6475bc7dce3110407f8c8b6c28 [gaim-migrate @ 17471] Martijn van Beers provided some patches to rework the perl object casting/blessing for signal instances in order to let the newly added jabber-* signals work. This is those patches. This is also a small whitespace change, a removal of the gaim debug message about "Found plugin info" it was just pissing me off, and a renamespacing of gaim_blist_node_get_extended_menu into Gaim::Blist::Node where it makes slightly more sense. committer: Tailor Script diff -r 023dfc2ce5e3 -r b1fcd2fc903a COPYRIGHT --- a/COPYRIGHT Thu Oct 12 13:42:11 2006 +0000 +++ b/COPYRIGHT Thu Oct 12 20:38:47 2006 +0000 @@ -305,6 +305,7 @@ Brad Turcotte Junichi Uekawa István Váradi +Martijn van Beers Philip Van Hoof Kristof Vansant James Vega diff -r 023dfc2ce5e3 -r b1fcd2fc903a libgaim/plugins/perl/common/Account.xs --- a/libgaim/plugins/perl/common/Account.xs Thu Oct 12 13:42:11 2006 +0000 +++ b/libgaim/plugins/perl/common/Account.xs Thu Oct 12 20:38:47 2006 +0000 @@ -306,7 +306,7 @@ Gaim::Account::UiOps gaim_accounts_get_ui_ops() -void * +Gaim::Handle gaim_accounts_get_handle() void diff -r 023dfc2ce5e3 -r b1fcd2fc903a libgaim/plugins/perl/common/BuddyIcon.xs --- a/libgaim/plugins/perl/common/BuddyIcon.xs Thu Oct 12 13:42:11 2006 +0000 +++ b/libgaim/plugins/perl/common/BuddyIcon.xs Thu Oct 12 20:38:47 2006 +0000 @@ -80,7 +80,7 @@ const char * gaim_buddy_icons_get_cache_dir(); -void * +Gaim::Handle gaim_buddy_icons_get_handle(); void diff -r 023dfc2ce5e3 -r b1fcd2fc903a libgaim/plugins/perl/common/BuddyList.xs --- a/libgaim/plugins/perl/common/BuddyList.xs Thu Oct 12 13:42:11 2006 +0000 +++ b/libgaim/plugins/perl/common/BuddyList.xs Thu Oct 12 20:38:47 2006 +0000 @@ -216,23 +216,13 @@ gaim_blist_request_add_group() void -gaim_blist_node_get_extended_menu(node) - Gaim::BuddyList::Node node -PREINIT: - GList *l; -PPCODE: - for (l = gaim_blist_node_get_extended_menu(node); l != NULL; l = l->next) { - XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Menu::Action"))); - } - -void gaim_blist_set_ui_ops(ops) Gaim::BuddyList::UiOps ops Gaim::BuddyList::UiOps gaim_blist_get_ui_ops() -void * +Gaim::Handle gaim_blist_get_handle() void @@ -245,6 +235,16 @@ PROTOTYPES: ENABLE void +gaim_blist_node_get_extended_menu(node) + Gaim::BuddyList::Node node +PREINIT: + GList *l; +PPCODE: + for (l = gaim_blist_node_get_extended_menu(node); l != NULL; l = l->next) { + XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Menu::Action"))); + } + +void gaim_blist_node_set_bool(node, key, value) Gaim::BuddyList::Node node const char * key diff -r 023dfc2ce5e3 -r b1fcd2fc903a libgaim/plugins/perl/common/Cipher.xs --- a/libgaim/plugins/perl/common/Cipher.xs Thu Oct 12 13:42:11 2006 +0000 +++ b/libgaim/plugins/perl/common/Cipher.xs Thu Oct 12 20:38:47 2006 +0000 @@ -45,7 +45,7 @@ XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Cipher"))); } -gpointer +Gaim::Handle gaim_ciphers_get_handle() void diff -r 023dfc2ce5e3 -r b1fcd2fc903a libgaim/plugins/perl/common/Connection.xs --- a/libgaim/plugins/perl/common/Connection.xs Thu Oct 12 13:42:11 2006 +0000 +++ b/libgaim/plugins/perl/common/Connection.xs Thu Oct 12 20:38:47 2006 +0000 @@ -85,5 +85,5 @@ void gaim_connections_uninit() -void * +Gaim::Handle gaim_connections_get_handle() diff -r 023dfc2ce5e3 -r b1fcd2fc903a libgaim/plugins/perl/common/Conversation.xs --- a/libgaim/plugins/perl/common/Conversation.xs Thu Oct 12 13:42:11 2006 +0000 +++ b/libgaim/plugins/perl/common/Conversation.xs Thu Oct 12 20:38:47 2006 +0000 @@ -33,7 +33,7 @@ MODULE = Gaim::Conversation PACKAGE = Gaim::Conversations PREFIX = gaim_conversations_ PROTOTYPES: ENABLE -void * +Gaim::Handle gaim_conversations_get_handle() void diff -r 023dfc2ce5e3 -r b1fcd2fc903a libgaim/plugins/perl/common/Plugin.xs --- a/libgaim/plugins/perl/common/Plugin.xs Thu Oct 12 13:42:11 2006 +0000 +++ b/libgaim/plugins/perl/common/Plugin.xs Thu Oct 12 20:38:47 2006 +0000 @@ -146,7 +146,7 @@ XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Plugin"))); } -void * +Gaim::Handle gaim_plugins_get_handle() void diff -r 023dfc2ce5e3 -r b1fcd2fc903a libgaim/plugins/perl/common/Pounce.xs --- a/libgaim/plugins/perl/common/Pounce.xs Thu Oct 12 13:42:11 2006 +0000 +++ b/libgaim/plugins/perl/common/Pounce.xs Thu Oct 12 20:38:47 2006 +0000 @@ -73,7 +73,7 @@ XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Pounce"))); } -void * +Gaim::Handle gaim_pounces_get_handle() void diff -r 023dfc2ce5e3 -r b1fcd2fc903a libgaim/plugins/perl/common/Prefs.xs --- a/libgaim/plugins/perl/common/Prefs.xs Thu Oct 12 13:42:11 2006 +0000 +++ b/libgaim/plugins/perl/common/Prefs.xs Thu Oct 12 20:38:47 2006 +0000 @@ -58,7 +58,7 @@ gaim_prefs_get_bool(name) const char *name -void * +Gaim::Handle gaim_prefs_get_handle() int diff -r 023dfc2ce5e3 -r b1fcd2fc903a libgaim/plugins/perl/common/Proxy.xs --- a/libgaim/plugins/perl/common/Proxy.xs Thu Oct 12 13:42:11 2006 +0000 +++ b/libgaim/plugins/perl/common/Proxy.xs Thu Oct 12 20:38:47 2006 +0000 @@ -6,7 +6,7 @@ Gaim::ProxyInfo gaim_global_proxy_get_info() -void * +Gaim::Handle gaim_proxy_get_handle() void diff -r 023dfc2ce5e3 -r b1fcd2fc903a libgaim/plugins/perl/common/SavedStatuses.xs --- a/libgaim/plugins/perl/common/SavedStatuses.xs Thu Oct 12 13:42:11 2006 +0000 +++ b/libgaim/plugins/perl/common/SavedStatuses.xs Thu Oct 12 20:38:47 2006 +0000 @@ -48,7 +48,7 @@ XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::SavedStatus"))); } -void * +Gaim::Handle gaim_savedstatuses_get_handle() void diff -r 023dfc2ce5e3 -r b1fcd2fc903a libgaim/plugins/perl/common/Signal.xs --- a/libgaim/plugins/perl/common/Signal.xs Thu Oct 12 13:42:11 2006 +0000 +++ b/libgaim/plugins/perl/common/Signal.xs Thu Oct 12 20:38:47 2006 +0000 @@ -6,7 +6,7 @@ void gaim_signal_connect_priority(instance, signal, plugin, callback, priority, data = 0) - void *instance + Gaim::Handle instance const char *signal Gaim::Plugin plugin SV *callback @@ -17,7 +17,7 @@ void gaim_signal_connect(instance, signal, plugin, callback, data = 0) - void *instance + Gaim::Handle instance const char *signal Gaim::Plugin plugin SV *callback @@ -27,7 +27,7 @@ void gaim_signal_disconnect(instance, signal, plugin) - void *instance + Gaim::Handle instance const char *signal Gaim::Plugin plugin CODE: diff -r 023dfc2ce5e3 -r b1fcd2fc903a libgaim/plugins/perl/common/Status.xs --- a/libgaim/plugins/perl/common/Status.xs Thu Oct 12 13:42:11 2006 +0000 +++ b/libgaim/plugins/perl/common/Status.xs Thu Oct 12 20:38:47 2006 +0000 @@ -263,7 +263,7 @@ Gaim::Status status const char *id -void * +Gaim::Handle gaim_status_get_handle() const char * diff -r 023dfc2ce5e3 -r b1fcd2fc903a libgaim/plugins/perl/common/XMLNode.xs --- a/libgaim/plugins/perl/common/XMLNode.xs Thu Oct 12 13:42:11 2006 +0000 +++ b/libgaim/plugins/perl/common/XMLNode.xs Thu Oct 12 20:38:47 2006 +0000 @@ -5,13 +5,13 @@ Gaim::XMLNode xmlnode_copy(class, src) - xmlnode *src + Gaim::XMLNode src C_ARGS: src void xmlnode_free(node) - xmlnode *node + Gaim::XMLNode node Gaim::XMLNode xmlnode_from_str(class, str, size) @@ -22,36 +22,36 @@ const char * xmlnode_get_attrib(node, attr) - xmlnode *node + Gaim::XMLNode node const char *attr Gaim::XMLNode xmlnode_get_child(parent, name) - const xmlnode *parent + Gaim::XMLNode parent const char *name Gaim::XMLNode xmlnode_get_child_with_namespace(parent, name, xmlns) - const xmlnode *parent + Gaim::XMLNode parent const char *name const char *xmlns char * xmlnode_get_data(node) - xmlnode *node + Gaim::XMLNode node Gaim::XMLNode xmlnode_get_next_twin(node) - xmlnode *node + Gaim::XMLNode node void xmlnode_insert_child(parent, child) - xmlnode *parent - xmlnode *child + Gaim::XMLNode parent + Gaim::XMLNode child void xmlnode_insert_data(node, data, size) - xmlnode *node + Gaim::XMLNode node const char *data gssize size @@ -63,26 +63,26 @@ Gaim::XMLNode xmlnode_new_child(parent, name) - xmlnode *parent + Gaim::XMLNode parent const char *name void xmlnode_remove_attrib(node, attr) - xmlnode *node + Gaim::XMLNode node const char *attr void xmlnode_set_attrib(node, attr, value) - xmlnode *node + Gaim::XMLNode node const char *attr const char *value char * xmlnode_to_formatted_str(node, len) - xmlnode *node + Gaim::XMLNode node int *len char * xmlnode_to_str(node, len) - xmlnode *node + Gaim::XMLNode node int *len diff -r 023dfc2ce5e3 -r b1fcd2fc903a libgaim/plugins/perl/common/module.h --- a/libgaim/plugins/perl/common/module.h Thu Oct 12 13:42:11 2006 +0000 +++ b/libgaim/plugins/perl/common/module.h Thu Oct 12 20:38:47 2006 +0000 @@ -263,4 +263,5 @@ typedef xmlnode * Gaim__XMLNode; typedef XMLNodeType XMLNode__Type; -/* other.h */ +/* other */ +typedef void * Gaim__Handle; diff -r 023dfc2ce5e3 -r b1fcd2fc903a libgaim/plugins/perl/common/typemap --- a/libgaim/plugins/perl/common/typemap Thu Oct 12 13:42:11 2006 +0000 +++ b/libgaim/plugins/perl/common/typemap Thu Oct 12 20:38:47 2006 +0000 @@ -72,6 +72,8 @@ Gaim::Desktop::Item T_GaimObj Gaim::DesktopItemType T_IV +Gaim::Handle T_GaimObj + Gaim::IconScaleRules T_IV Gaim::Log T_GaimObj diff -r 023dfc2ce5e3 -r b1fcd2fc903a libgaim/plugins/perl/perl-common.c --- a/libgaim/plugins/perl/perl-common.c Thu Oct 12 13:42:11 2006 +0000 +++ b/libgaim/plugins/perl/perl-common.c Thu Oct 12 20:38:47 2006 +0000 @@ -447,6 +447,9 @@ case GAIM_SUBTYPE_XFER: stash = "Gaim::Xfer"; break; + case GAIM_SUBTYPE_XMLNODE: + stash = "Gaim::XMLNode"; + break; default: stash = "Gaim"; /* ? */ diff -r 023dfc2ce5e3 -r b1fcd2fc903a libgaim/plugins/perl/perl-handlers.c --- a/libgaim/plugins/perl/perl-handlers.c Thu Oct 12 13:42:11 2006 +0000 +++ b/libgaim/plugins/perl/perl-handlers.c Thu Oct 12 20:38:47 2006 +0000 @@ -71,7 +71,8 @@ /* XXX This *will* cease working correctly if context gets changed to * ever be able to hold anything other than a GaimConnection */ if (context != NULL) - XPUSHs(sv_2mortal(gaim_perl_bless_object(context, "Gaim::Connection"))); + XPUSHs(sv_2mortal(gaim_perl_bless_object(context, + "Gaim::Connection"))); else XPUSHs(&PL_sv_undef); PUTBACK; diff -r 023dfc2ce5e3 -r b1fcd2fc903a libgaim/plugins/perl/perl.c --- a/libgaim/plugins/perl/perl.c Thu Oct 12 13:42:11 2006 +0000 +++ b/libgaim/plugins/perl/perl.c Thu Oct 12 20:38:47 2006 +0000 @@ -276,9 +276,6 @@ char *basename; STRLEN len; - gaim_debug(GAIM_DEBUG_INFO, "perl", - "Found plugin info\n"); - info = g_new0(GaimPluginInfo, 1); gps = g_new0(GaimPerlScript, 1);