# HG changeset patch # User Richard Laager # Date 1180764035 0 # Node ID f187d935486b4e77850a2a9b2e221a0ea9f858f1 # Parent df911a06e09eca8acdaf074f7aab43c611b53995 The DBus bindings have a lot of warnings about calling g_free() on a const char *RESULT. o_sukhodolsky created a patch to eliminate all the g_free()s, which seems wrong. (The DBus code appears to copy the bytes.) This revision changes the types to char * as necessary. References #1344 diff -r df911a06e09e -r f187d935486b libpurple/dbus-analyze-functions.py --- a/libpurple/dbus-analyze-functions.py Sat Jun 02 04:39:53 2007 +0000 +++ b/libpurple/dbus-analyze-functions.py Sat Jun 02 06:00:35 2007 +0000 @@ -2,7 +2,6 @@ import string import sys - # types translated into "int" simpletypes = ["int", "gint", "guint", "gboolean"] @@ -362,7 +361,10 @@ self.ccode.append("\t%s;" % self.call) # just call the function def outputstring(self, type, name, const): - self.cdecls.append("\tconst char *%s;" % name) + if const: + self.cdecls.append("\tconst char *%s;" % name) + else: + self.cdecls.append("\tchar *%s;" % name) self.ccode.append("\t%s = null_to_empty(%s);" % (name, self.call)) self.cparamsout.append(("STRING", name)) self.addouttype("s", name)