changeset 26628:f3a6f9976d9c

Patch from Zsombor Welker to expand the list of PurpleValue valid subtypes. Fixes #8761
author Ethan Blanton <elb@pidgin.im>
date Sat, 18 Apr 2009 14:03:16 +0000
parents fcd7d4c24230
children 99d0b82d5362 a8dbbcd069ab 7488da258ac8
files libpurple/plugins/perl/perl-common.c
diffstat 1 files changed, 17 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/plugins/perl/perl-common.c	Sat Apr 18 03:08:12 2009 +0000
+++ b/libpurple/plugins/perl/perl-common.c	Sat Apr 18 14:03:16 2009 +0000
@@ -403,7 +403,7 @@
 static SV *
 purple_perl_sv_from_subtype(const PurpleValue *value, void *arg)
 {
-	const char *stash = NULL;
+	const char *stash = "Purple"; /* ? */
 
 	switch (purple_value_get_subtype(value)) {
 		case PURPLE_SUBTYPE_ACCOUNT:
@@ -442,6 +442,9 @@
 		case PURPLE_SUBTYPE_STATUS:
 			stash = "Purple::Status";
 			break;
+		case PURPLE_SUBTYPE_SAVEDSTATUS:
+			stash = "Purple::SavedStatus";
+			break;
 		case PURPLE_SUBTYPE_LOG:
 			stash = "Purple::Log";
 			break;
@@ -451,10 +454,19 @@
 		case PURPLE_SUBTYPE_XMLNODE:
 			stash = "Purple::XMLNode";
 			break;
-
-		default:
-			stash = "Purple"; /* ? */
-	}
+ 		case PURPLE_SUBTYPE_USERINFO:
+ 			stash = "Purple::NotifyUserInfo";
+ 			break;
+ 		case PURPLE_SUBTYPE_STORED_IMAGE:
+ 			stash = "Purple::StoredImage";
+ 			break;
+ 		case PURPLE_SUBTYPE_CERTIFICATEPOOL:
+ 			stash = "Purple::Certificate::Pool";
+ 			break;
+ 		case PURPLE_SUBTYPE_UNKNOWN:
+ 			stash = "Purple::Unknown";
+ 			break;
+  	}
 
 	return sv_2mortal(purple_perl_bless_object(arg, stash));
 }