diff src/gaim-client.c @ 11277:421a8523ad04

[gaim-migrate @ 13467] added support for lists and hash tables to libgaim-client committer: Tailor Script <tailor@pidgin.im>
author Piotr Zielinski <zielaj>
date Tue, 16 Aug 2005 15:22:35 +0000
parents 66f872f30e40
children 8bda65b88e49
line wrap: on
line diff
--- a/src/gaim-client.c	Mon Aug 15 22:48:20 2005 +0000
+++ b/src/gaim-client.c	Tue Aug 16 15:22:35 2005 +0000
@@ -10,6 +10,28 @@
 static DBusGConnection *bus;
 static DBusGProxy *gaim_proxy;
 
+static GList *garray_int_to_glist(GArray *array) {
+    GList *list = NULL;
+    int i;
+
+    for(i = 0; i < array->len; i++) 
+	list = g_list_append(list, GINT_TO_POINTER(g_array_index(array,gint,i)));
+
+    g_array_free(array, TRUE);
+    return list;
+}
+
+static GSList *garray_int_to_gslist(GArray *array) {
+    GSList *list = NULL;
+    int i;
+
+    for(i = 0; i < array->len; i++) 
+	list = g_slist_append(list, GINT_TO_POINTER(g_array_index(array,gint,i)));
+
+    g_array_free(array, TRUE);
+    return list;
+}
+
 #include "gaim-client-bindings.c"
 
 static void lose (const char *fmt, ...) G_GNUC_NORETURN G_GNUC_PRINTF (1, 2);