diff options
author | Daniel Veillard <veillard@redhat.com> | 2005-12-06 16:50:31 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2005-12-06 16:50:31 +0000 |
commit | 7ad55373678e0ff33e42c3642c05d236f96f62a8 (patch) | |
tree | ccd70c44cb215691510e460a8dac256b7d0958ba /docs/apibuild.py | |
parent | * include/libvir.h src/libvir.c src/virsh.c: adding the extraction (diff) | |
download | libvirt-7ad55373678e0ff33e42c3642c05d236f96f62a8.tar.gz libvirt-7ad55373678e0ff33e42c3642c05d236f96f62a8.tar.bz2 libvirt-7ad55373678e0ff33e42c3642c05d236f96f62a8.zip |
* docs/Makefile.am docs/apibuild.py docs/libvir-api.xml
docs/libvir-refs.xml: fix XML API generation
* include/libvir.h src/libvir.c src/virsh.c: fix the info memory
API again, use KB, not bytes so that an unsigned long is sufficient.
Daniel
Diffstat (limited to 'docs/apibuild.py')
-rwxr-xr-x | docs/apibuild.py | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/docs/apibuild.py b/docs/apibuild.py index 972f500b8..4385fb586 100755 --- a/docs/apibuild.py +++ b/docs/apibuild.py @@ -963,6 +963,9 @@ class CParser: # preprocessor and comments since they are logically not part of # the program structure. # + def push(self, tok): + self.lexer.push(tok) + def token(self): global ignored_words @@ -1228,7 +1231,28 @@ class CParser: self.type = self.type + " " + token[1] token = self.token() - if token[0] == "name" and (token[1] == "long" or token[1] == "short"): + if token[0] == "name" and token[1] == "long": + if self.type == "": + self.type = token[1] + else: + self.type = self.type + " " + token[1] + + # some read ahead for long long + oldtmp = token + token = self.token() + if token[0] == "name" and token[1] == "long": + self.type = self.type + " " + token[1] + else: + self.push(token) + token = oldtmp + + if token[0] == "name" and token[1] == "int": + if self.type == "": + self.type = tmp[1] + else: + self.type = self.type + " " + tmp[1] + + elif token[0] == "name" and token[1] == "short": if self.type == "": self.type = token[1] else: |