libpurple/status.c

branch
soc.2013.gobjectification
changeset 34785
99bcdb44c75f
parent 34774
b2c82de968f6
child 34788
38d1b844ddb6
--- a/libpurple/status.c	Mon Jul 15 19:45:12 2013 +0530
+++ b/libpurple/status.c	Tue Jul 16 01:45:39 2013 +0530
@@ -1054,6 +1054,29 @@
 	return 0;
 }
 
+static PurpleStatus *
+purple_status_copy(PurpleStatus *status)
+{
+	PurpleStatus *status_copy = g_new(PurpleStatus, 1);
+	*status_copy = *status;
+
+	return status_copy;
+}
+
+GType
+purple_status_get_type(void)
+{
+	static GType type = 0;
+
+	if (type == 0) {
+		type = g_boxed_type_register_static("PurpleStatus",
+				(GBoxedCopyFunc)purple_status_copy,
+				(GBoxedFreeFunc)g_free);
+	}
+
+	return type;
+}
+
 
 /**************************************************************************
 * PurplePresence API

mercurial