Mercurial > pidgin.yaz
changeset 23145:2012a85f8507
Update the dbus-analyze script to deal with multiline function
definitions of the following form:
type *
function(parameterlist);
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Tue, 13 May 2008 00:27:36 +0000 |
parents | d0ee799828d1 |
children | f1df88964b3d |
files | libpurple/dbus-analyze-functions.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/dbus-analyze-functions.py Mon May 12 23:09:30 2008 +0000 +++ b/libpurple/dbus-analyze-functions.py Tue May 13 00:27:36 2008 +0000 @@ -483,6 +483,7 @@ self.inputiter = iter(inputfile) self.functionregexp = \ re.compile("^%s(\w[^()]*)\(([^()]*)\)\s*;\s*$" % fprefix) + self.typeregexp = re.compile("^\w+\s*\*?\s*$") @@ -501,7 +502,7 @@ # accumulate lines until the parentheses are balance or an # empty line has been encountered myline = line.strip() - while myline.count("(") > myline.count(")"): + while (myline.count("(") > myline.count(")")) or self.typeregexp.match(myline): newline = self.inputiter.next().strip() if len(newline) == 0: break