2
0
mirror of https://github.com/boostorg/python.git synced 2026-02-01 20:52:13 +00:00

- added new option for generating bindings: --multiple

- some refactoring of the code
- now detects forward declarations and prints a warning about them


[SVN r18187]
This commit is contained in:
Bruno da Silva de Oliveira
2003-04-05 17:05:12 +00:00
parent a86deed5f6
commit 8d2f012bcf
33 changed files with 591 additions and 128 deletions

View File

@@ -105,6 +105,7 @@ class GCCXMLParser(object):
else:
res = Type(decl.FullName(), const)
res.volatile = volatile
res.incomplete = decl.incomplete
return res
@@ -221,6 +222,7 @@ class GCCXMLParser(object):
bases = self.GetBases(element.get('bases'))
location = self.GetLocation(element.get('location'))
context = self.GetDecl(element.get('context'))
incomplete = bool(element.get('incomplete', False))
if isinstance(context, str):
class_ = Class(name, context, [], abstract, bases)
self.AddDecl(class_)
@@ -232,6 +234,7 @@ class GCCXMLParser(object):
# we have to add the declaration of the class before trying
# to parse its members, to avoid recursion.
class_.location = location
class_.incomplete = incomplete
self.Update(id, class_)
# now we can get the members
class_.members = self.GetMembers(element.get('members'))
@@ -258,14 +261,14 @@ class GCCXMLParser(object):
def ParseReferenceType(self, id, element):
type_ = self.GetType(element.get('type'))
expand = not isinstance(type_, FunctionType)
ref = ReferenceType(type_.name, type_.const, None, expand)
ref = ReferenceType(type_.name, type_.const, None, type_.incomplete, expand)
self.Update(id, ref)
def ParsePointerType(self, id, element):
type_ = self.GetType(element.get('type'))
expand = not isinstance(type_, FunctionType)
ref = PointerType(type_.name, type_.const, None, expand)
ref = PointerType(type_.name, type_.const, None, type_.incomplete, expand)
self.Update(id, ref)