[vlc-commits] Replace dump_enums/dump_funcs methods by generic dump() method

Olivier Aubert git at videolan.org
Thu Jun 14 15:27:18 CEST 2012


vlc/python | branch: master | Olivier Aubert <olivier.aubert at liris.cnrs.fr> | Fri Jun  8 16:13:01 2012 +0200| [b61b4d98b157ecc2341a8488683e60c874eca9a1] | committer: Olivier Aubert

Replace dump_enums/dump_funcs methods by generic dump() method

> http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=b61b4d98b157ecc2341a8488683e60c874eca9a1
---

 generate.py |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/generate.py b/generate.py
index eb8993b..ae08a99 100755
--- a/generate.py
+++ b/generate.py
@@ -391,16 +391,12 @@ class Parser(object):
         for f in self.funcs:
             f.check()
 
-    def __dump(self, attr):
+    def dump(self, attr):
         sys.stderr.write('%s==== %s ==== %s\n' % (_NL_, attr, self.version))
         for a in getattr(self, attr, ()):
             a.dump()
 
-    def dump_enums(self):  # for debug
-        self.__dump('enums')
 
-    def dump_funcs(self):  # for debug
-        self.__dump('funcs')
 
     def parse_enums(self):
         """Parse header file for enum type definitions.
@@ -1188,8 +1184,8 @@ Parse VLC include files and generate bindings code for Python or Java.""")
 
     p = Parser(args, opts.version)
     if opts.debug:
-        p.dump_enums()
-        p.dump_funcs()
+        for t in ('enums', 'funcs', 'callbacks'):
+            p.dump(t)
 
     if opts.java:
         g = JavaGenerator(p)



More information about the vlc-commits mailing list