changeset 14717:b1fcd2fc903a

[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 <tailor@pidgin.im>
author Etan Reisner <pidgin@unreliablesource.net>
date Thu, 12 Oct 2006 20:38:47 +0000
parents 023dfc2ce5e3
children d1e71d46c3db
files COPYRIGHT libgaim/plugins/perl/common/Account.xs libgaim/plugins/perl/common/BuddyIcon.xs libgaim/plugins/perl/common/BuddyList.xs libgaim/plugins/perl/common/Cipher.xs libgaim/plugins/perl/common/Connection.xs libgaim/plugins/perl/common/Conversation.xs libgaim/plugins/perl/common/Plugin.xs libgaim/plugins/perl/common/Pounce.xs libgaim/plugins/perl/common/Prefs.xs libgaim/plugins/perl/common/Proxy.xs libgaim/plugins/perl/common/SavedStatuses.xs libgaim/plugins/perl/common/Signal.xs libgaim/plugins/perl/common/Status.xs libgaim/plugins/perl/common/XMLNode.xs libgaim/plugins/perl/common/module.h libgaim/plugins/perl/common/typemap libgaim/plugins/perl/perl-common.c libgaim/plugins/perl/perl-handlers.c libgaim/plugins/perl/perl.c
diffstat 20 files changed, 50 insertions(+), 45 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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()
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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:
--- 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 *
--- 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
--- 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;
--- 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
--- 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"; /* ? */
--- 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;
--- 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);