Added g_object_class_install_properties to glibcompat.h soc.2013.gobjectification

Sun, 24 Nov 2013 01:37:11 +0530

author
Ankit Vani <a@nevitus.org>
date
Sun, 24 Nov 2013 01:37:11 +0530
branch
soc.2013.gobjectification
changeset 35081
eda7bae766d4
parent 35080
58bddd91956c
child 35082
05a66637ec23

Added g_object_class_install_properties to glibcompat.h

libpurple/glibcompat.h file | annotate | diff | comparison | revisions
--- a/libpurple/glibcompat.h	Sun Nov 24 00:33:47 2013 +0530
+++ b/libpurple/glibcompat.h	Sun Nov 24 01:37:11 2013 +0530
@@ -80,6 +80,14 @@
 	g_object_notify(object, g_param_spec_get_name(pspec));
 }
 
+static inline void g_object_class_install_properties(GObjectClass *oclass,
+	guint n_pspecs, GParamSpec **pspecs)
+{
+	gint i;
+	for (i = 1; i < n_pspecs; ++i)
+		g_object_class_install_property(oclass, i, pspecs[i]);
+}
+
 #endif /* < 2.26.0 */
 
 #endif /* < 2.28.0 */

mercurial