pidgin.custom_smiley: 41922067: Update the dbus-analyze script to deal w...

sadrul at pidgin.im sadrul at pidgin.im
Mon May 12 22:50:44 EDT 2008


-----------------------------------------------------------------
Revision: 41922067c9cef0b5e6f8a40439c8239e6f2b2a2f
Ancestor: c134ff23eba5faac09c13e731e792fa612c91a9a
Author: sadrul at pidgin.im
Date: 2008-05-13T00:27:36
Branch: im.pidgin.pidgin.custom_smiley
URL: http://d.pidgin.im/viewmtn/revision/info/41922067c9cef0b5e6f8a40439c8239e6f2b2a2f

Modified files:
        libpurple/dbus-analyze-functions.py

ChangeLog: 

Update the dbus-analyze script to deal with multiline function
definitions of the following form:

type *
function(parameterlist);

-------------- next part --------------
============================================================
--- libpurple/dbus-analyze-functions.py	3ebafc9c1756e3ac61d1f587a1eaee4c4774c9f9
+++ libpurple/dbus-analyze-functions.py	e3d3eebe5969b306f13554b2b2b438e3e982a0aa
@@ -483,6 +483,7 @@ class BindingSet:
         self.inputiter = iter(inputfile)
         self.functionregexp = \
              re.compile("^%s(\w[^()]*)\(([^()]*)\)\s*;\s*$" % fprefix)    
+        self.typeregexp = re.compile("^\w+\s*\*?\s*$")
 
 
                 
@@ -501,7 +502,7 @@ class BindingSet:
             # 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


More information about the Commits mailing list