diff --git a/backends/libpurple/gen_dynamic_purple.py b/backends/libpurple/gen_dynamic_purple.py index e4cb8274..bebfad8c 100644 --- a/backends/libpurple/gen_dynamic_purple.py +++ b/backends/libpurple/gen_dynamic_purple.py @@ -54,6 +54,8 @@ def handle_header(header, method): for i in range(len(lines)): line = lines[i] if line.find(method) != -1: + if line.startswith(method): + line = lines[i-1][:-1] + line m = line[:-1] l = unicode(m).strip() if l.endswith(")"): @@ -76,6 +78,8 @@ def handle_header(header, method): or l.endswith(")")): continue; + m = m.replace("G_GNUC_NULL_TERMINATE", "") + if not m in definitions: print "found", method[:-1], "in", header definitions += [m]