Skip to content

Commit

Permalink
pull in the modified doxy2swig provided by adrin
Browse files Browse the repository at this point in the history
  • Loading branch information
Björn Esser committed Jan 9, 2014
1 parent 148ddb2 commit 4efb5d8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/.doxy2swig.py
Expand Up @@ -149,7 +149,7 @@ def parse_Comment(self, node):

def add_text(self, value):
"""Adds text corresponding to `value` into `self.pieces`."""
if type(value) in (types.ListType, types.TupleType):
if isinstance(value, list) or isinstance(value, tuple):
self.pieces.extend(value)
else:
self.pieces.append(value)
Expand Down Expand Up @@ -209,13 +209,13 @@ def do_compounddef(self, node):
kind = node.attributes['kind'].value
if kind in ('class', 'struct'):
prot = node.attributes['prot'].value
if prot <> 'public':
if prot != 'public':
return
names = ('compoundname', 'briefdescription',
'detaileddescription', 'includes')
first = self.get_specific_nodes(node, names)
for n in names:
if first.has_key(n):
if n in first:
self.parse(first[n])
self.add_text(['";','\n'])
for n in node.childNodes:
Expand Down Expand Up @@ -279,7 +279,7 @@ def do_memberdef(self, node):
if name[:8] == 'operator': # Don't handle operators yet.
return

if not first.has_key('definition') or \
if not ('definition' in first) or \
kind in ['variable', 'typedef']:
return

Expand Down Expand Up @@ -371,7 +371,7 @@ def do_doxygenindex(self, node):
if not os.path.exists(fname):
fname = os.path.join(self.my_dir, fname)
if not self.quiet:
print "parsing file: %s"%fname
print ("parsing file: %s", fname)
p = Doxy2SWIG(fname, self.include_function_definition, self.quiet)
p.generate()
self.pieces.extend(self.clean_pieces(p.pieces))
Expand Down Expand Up @@ -447,4 +447,4 @@ def main():


if __name__ == '__main__':
main()
main()

0 comments on commit 4efb5d8

Please sign in to comment.