pidgin: 39a315ca: Remove free_memory argument from D-Bus l...
qulogic at pidgin.im
qulogic at pidgin.im
Sun Oct 16 04:25:43 EDT 2011
----------------------------------------------------------------------
Revision: 39a315ca0bc392c66b472809cfd14e2ee087e74a
Parent: d82a7ce28750bfd9aecfe8c81daccdc0172e8cb3
Author: qulogic at pidgin.im
Date: 10/15/11 23:03:39
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/39a315ca0bc392c66b472809cfd14e2ee087e74a
Changelog:
Remove free_memory argument from D-Bus list functions. It's already
always set to FALSE in the auto-generated code.
Fixes #1747.
Changes against parent d82a7ce28750bfd9aecfe8c81daccdc0172e8cb3
patched libpurple/dbus-analyze-functions.py
patched libpurple/dbus-bindings.h
patched libpurple/dbus-server.c
-------------- next part --------------
============================================================
--- libpurple/dbus-server.c e3af9ea1260a561a289855c9a7ec43ae954cc7ca
+++ libpurple/dbus-server.c 42111b87610fa45ee3af8e31d77351fd98579437
@@ -300,7 +300,7 @@ dbus_int32_t *
}
dbus_int32_t *
-purple_dbusify_GList(GList *list, gboolean free_memory, dbus_int32_t *len)
+purple_dbusify_GList(GList *list, dbus_int32_t *len)
{
dbus_int32_t *array;
int i;
@@ -311,14 +311,11 @@ purple_dbusify_GList(GList *list, gboole
for (i = 0, elem = list; elem != NULL; elem = elem->next, i++)
array[i] = purple_dbus_pointer_to_id(elem->data);
- if (free_memory)
- g_list_free(list);
-
return array;
}
dbus_int32_t *
-purple_dbusify_GSList(GSList *list, gboolean free_memory, dbus_int32_t *len)
+purple_dbusify_GSList(GSList *list, dbus_int32_t *len)
{
dbus_int32_t *array;
int i;
@@ -329,14 +326,11 @@ purple_dbusify_GSList(GSList *list, gboo
for (i = 0, elem = list; elem != NULL; elem = elem->next, i++)
array[i] = purple_dbus_pointer_to_id(elem->data);
- if (free_memory)
- g_slist_free(list);
-
return array;
}
gpointer *
-purple_GList_to_array(GList *list, gboolean free_memory, dbus_int32_t *len)
+purple_GList_to_array(GList *list, dbus_int32_t *len)
{
gpointer *array;
int i;
@@ -347,14 +341,11 @@ purple_GList_to_array(GList *list, gbool
for (i = 0, elem = list; elem != NULL; elem = elem->next, i++)
array[i] = elem->data;
- if (free_memory)
- g_list_free(list);
-
return array;
}
gpointer *
-purple_GSList_to_array(GSList *list, gboolean free_memory, dbus_int32_t *len)
+purple_GSList_to_array(GSList *list, dbus_int32_t *len)
{
gpointer *array;
int i;
@@ -365,9 +356,6 @@ purple_GSList_to_array(GSList *list, gbo
for (i = 0, elem = list; elem != NULL; elem = elem->next, i++)
array[i] = elem->data;
- if (free_memory)
- g_slist_free(list);
-
return array;
}
============================================================
--- libpurple/dbus-analyze-functions.py 17f2d1b2713dae797c88eea72e1e7aa42c72248e
+++ libpurple/dbus-analyze-functions.py bdd1d7154be6c8290d8ff1970dbd6bf326825166
@@ -495,7 +495,7 @@ class ServerBinding (Binding):
if self.function.name in stringlists:
self.cdecls.append("\tchar **%s;" % name)
self.ccode.append("\tlist = %s;" % self.call)
- self.ccode.append("\t%s = (char **)purple_%s_to_array(list, FALSE, &%s_LEN);" % \
+ self.ccode.append("\t%s = (char **)purple_%s_to_array(list, &%s_LEN);" % \
(name, type[0], name))
self.cparamsout.append("DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &%s, %s_LEN" \
% (name, name))
@@ -507,7 +507,7 @@ class ServerBinding (Binding):
else:
self.cdecls.append("\tdbus_int32_t *%s;" % name)
self.ccode.append("\tlist = %s;" % self.call)
- self.ccode.append("\t%s = purple_dbusify_%s(list, FALSE, &%s_LEN);" % \
+ self.ccode.append("\t%s = purple_dbusify_%s(list, &%s_LEN);" % \
(name, type[0], name))
if (not (self.function.name in constlists)):
self.ccode.append("\tg_%s_free(list);" % type[0].lower()[1:])
============================================================
--- libpurple/dbus-bindings.h 55b8c581bc82b5fa70ee12d1b6e827ba16eb0b0e
+++ libpurple/dbus-bindings.h bebbe1122b524f649d0f49dee33ac45381c66db1
@@ -84,14 +84,10 @@ purple_dbus_message_iter_get_args_valist
int first_arg_type,
va_list var_args);
-dbus_int32_t* purple_dbusify_GList(GList *list, gboolean free_memory,
- dbus_int32_t *len);
-dbus_int32_t* purple_dbusify_GSList(GSList *list, gboolean free_memory,
- dbus_int32_t *len);
-gpointer* purple_GList_to_array(GList *list, gboolean free_memory,
- dbus_int32_t *len);
-gpointer* purple_GSList_to_array(GSList *list, gboolean free_memory,
- dbus_int32_t *len);
+dbus_int32_t* purple_dbusify_GList(GList *list, dbus_int32_t *len);
+dbus_int32_t* purple_dbusify_GSList(GSList *list, dbus_int32_t *len);
+gpointer* purple_GList_to_array(GList *list, dbus_int32_t *len);
+gpointer* purple_GSList_to_array(GSList *list, dbus_int32_t *len);
GHashTable *purple_dbus_iter_hash_table(DBusMessageIter *iter, DBusError *error);
const char* empty_to_null(const char *str);
More information about the Commits
mailing list