changeset 17649:f187d935486b

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
author Richard Laager <rlaager@wiktel.com>
date Sat, 02 Jun 2007 06:00:35 +0000
parents df911a06e09e
children a90e2e720762
files libpurple/dbus-analyze-functions.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)