Mercurial > pidgin.yaz
changeset 28430:9d620811c67c
merge of '03bd656c160ca6bc98b9cc43670b534d7d2c3c88'
and '14cd2c46309b8cfa9e732fa8df5ed2f096684c27'
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Sun, 23 Aug 2009 21:42:12 +0000 |
parents | b168718d1072 (diff) ea6e571ebe4d (current diff) |
children | 500d1e806264 |
files | pidgin/pixmaps/toolbar/22/scalable/voice-call.svg pidgin/pixmaps/toolbar/22/voice-call.png pidgin/pixmaps/toolbar/32/scalable/voice-call.svg pidgin/pixmaps/toolbar/32/voice-call.png pidgin/pixmaps/toolbar/48/scalable/voice-call.svg pidgin/pixmaps/toolbar/48/voice-call.png |
diffstat | 1 files changed, 21 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/dbus-analyze-functions.py Sun Aug 23 10:07:21 2009 +0000 +++ b/libpurple/dbus-analyze-functions.py Sun Aug 23 21:42:12 2009 +0000 @@ -181,15 +181,20 @@ def processoutput(self, type, name): + const = False + unsigned = False # the "void" type is simple ... if type == ["void"]: return self.outputvoid(type, name) - const = False if type[0] == "const": type = type[1:] const = True + if type[0] == "unsigned": + type = type[1:] + unsigned = True + # a string if type == ["char", pointer] or type == ["gchar", pointer]: return self.outputstring(type, name, const) @@ -197,7 +202,7 @@ # simple types (ints, booleans, enums, ...) if (len(type) == 1) and \ ((type[0] in simpletypes) or (type[0].startswith("Purple"))): - return self.outputsimple(type, name) + return self.outputsimple(type, name, unsigned) # pointers ... if (len(type) == 2) and (type[1] == pointer): @@ -303,10 +308,13 @@ # self.returncode.append("NULLIFY(%s);" % name) self.returncode.append("return %s;" % name); - def outputsimple(self, type, name): + def outputsimple(self, type, name, us): self.functiontype = type[0] self.decls.append("%s %s = 0;" % (type[0], name)) - self.outputparams.append(("G_TYPE_INT", name)) + if us: + self.outputparams.append(("G_TYPE_UINT", name)) + else: + self.outputparams.append(("G_TYPE_INT", name)) self.returncode.append("return %s;" % name); # we could add "const" to the return type but this would probably @@ -455,11 +463,16 @@ if not const: self.ccodeout.append("\tg_free(%s);" % name) - def outputsimple(self, type, name): - self.cdecls.append("\tdbus_int32_t %s;" % name) + def outputsimple(self, type, name, us): + if us: + self.cdecls.append("\tdbus_uint32_t %s;" % name) + self.cparamsout.append(("UINT32", name)) + self.addouttype("u", name) + else: + self.cdecls.append("\tdbus_int32_t %s;" % name) + self.cparamsout.append(("INT32", name)) + self.addouttype("i", name) self.ccode.append("\t%s = %s;" % (name, self.call)) - self.cparamsout.append(("INT32", name)) - self.addouttype("i", name) def outputpurplestructure(self, type, name): self.cdecls.append("\tdbus_int32_t %s;" % name)