diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2002-12-12 10:04:22 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2002-12-12 10:04:22 +0000 |
commit | 000eafb5a722a1050dd80cf934526193fc2e8965 (patch) | |
tree | 4f53ae5ec12623211fd3a0389c9c42dc1c9875a2 /doc/apibuild.py | |
parent | 024b57019fd4fb5dcbdd7fec7e3d54230e7102da (diff) | |
download | libxml2-000eafb5a722a1050dd80cf934526193fc2e8965.tar.gz |
fixups to the api builder, gives enum values, fix functype return type
* doc/apibuild.py doc/libxml2-api.xml: fixups to the api builder,
gives enum values, fix functype return type
Daniel
Diffstat (limited to 'doc/apibuild.py')
-rwxr-xr-x | doc/apibuild.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/apibuild.py b/doc/apibuild.py index 3c482460..3e94e931 100755 --- a/doc/apibuild.py +++ b/doc/apibuild.py @@ -745,6 +745,7 @@ class CParser: name = token[1] signature = self.signature if signature != None: + type = string.split(type, '(')[0] d = self.mergeFunctionComment(name, ((type, None), signature), 1) self.index.add(name, self.filename, not self.is_header, @@ -853,7 +854,7 @@ class CParser: name = None self.comment = None comment = "" - value = "" + value = "0" while token != None: if token[0] == "sep" and token[1] == "{": token = self.token() @@ -874,9 +875,9 @@ class CParser: self.enums.append((name, value, comment)) name = token[1] comment = "" - value = "" token = self.token() if token[0] == "op" and token[1][0] == "=": + value = "" if len(token[1]) > 1: value = token[1][1:] token = self.token() @@ -884,6 +885,12 @@ class CParser: token[1] != '}'): value = value + token[1] token = self.token() + else: + try: + value = "%d" % (int(value) + 1) + except: + print "Failed to compute value of enum %s" % (name) + value="" if token[0] == "sep" and token[1] == ",": token = self.token() else: |