im.pidgin.pidgin: 93a8de710501e9a772b3fb12ab3db6682a41b3d6

deryni at pidgin.im deryni at pidgin.im
Tue Dec 4 19:23:20 EST 2007


-----------------------------------------------------------------
Revision: 93a8de710501e9a772b3fb12ab3db6682a41b3d6
Ancestor: 51648da970800504c5fef1552e7475982f977904
Author: deryni at pidgin.im
Date: 2007-12-01T06:46:25
Branch: im.pidgin.pidgin

Modified files:
        libpurple/plugins/perl/common/Status.xs

ChangeLog: 

Plug another leak or two, remove a comment, and reorganize a couple functions.

-------------- next part --------------
============================================================
--- libpurple/plugins/perl/common/Status.xs	66ecc30db8b9695247cfaba0e1eadf426234657f
+++ libpurple/plugins/perl/common/Status.xs	e82b21edc6bb1c5f1b5955b4fb1d2a9a363f9d71
@@ -90,6 +90,7 @@ PPCODE:
 		t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(source_list), i, 0), t_sl));
 	}
 	purple_presence_add_list(presence, t_GL);
+	g_list_free(t_GL);
 
 void
 purple_presence_add_status(presence, status)
@@ -361,14 +362,26 @@ purple_status_type_destroy(status_type)
 purple_status_type_destroy(status_type)
 	Purple::StatusType status_type
 
+Purple::StatusAttr
+purple_status_type_get_attr(status_type, id)
+	Purple::StatusType status_type
+	const char *id
+
+void
+purple_status_type_get_attrs(status_type)
+	Purple::StatusType status_type
+PREINIT:
+	GList *l;
+PPCODE:
+	for (l = purple_status_type_get_attrs(status_type); l != NULL; l = l->next) {
+		XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::StatusAttr")));
+	}
+
 Purple::StatusType
 purple_status_type_find_with_id(status_types, id)
 	SV *status_types
 	const char *id
 PREINIT:
-/* XXX Check that this function actually works, I think it might need a */
-/* status_type as it's first argument to work as $status_type->find_with_id */
-/* properly. */
 	GList *t_GL;
 	int i, t_len;
 CODE:
@@ -380,24 +393,10 @@ CODE:
 		t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(status_types), i, 0), t_sl));
 	}
 	RETVAL = (PurpleStatusType *)purple_status_type_find_with_id(t_GL, id);
+	g_list_free(t_GL);
 OUTPUT:
 	RETVAL
 
-Purple::StatusAttr
-purple_status_type_get_attr(status_type, id)
-	Purple::StatusType status_type
-	const char *id
-
-void
-purple_status_type_get_attrs(status_type)
-	Purple::StatusType status_type
-PREINIT:
-	GList *l;
-PPCODE:
-	for (l = purple_status_type_get_attrs(status_type); l != NULL; l = l->next) {
-		XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::StatusAttr")));
-	}
-
 const char *
 purple_status_type_get_id(status_type)
 	Purple::StatusType status_type


More information about the Commits mailing list