diff --git a/pyste/NEWS b/pyste/NEWS index 1f2aa55d..28bcbbfe 100644 --- a/pyste/NEWS +++ b/pyste/NEWS @@ -1,3 +1,7 @@ +08 May 2003 +Fixed bug where in a certain cases the GCCXMLParser would end up with multiple +declarations of the same class + 22 Apr 2003 - Now shows a warning when the user tries to export a forward-declared class. Forward-declared classes are ignored by the AllFromHeader construct. - Fixed a bug where classes, functions and enums where being exported, even if excluded from a AllFromHeader construct. diff --git a/pyste/src/GCCXMLParser.py b/pyste/src/GCCXMLParser.py index e6ca1e55..7248ee6f 100644 --- a/pyste/src/GCCXMLParser.py +++ b/pyste/src/GCCXMLParser.py @@ -219,24 +219,24 @@ class GCCXMLParser(object): def ParseClass(self, id, element): name = element.get('name') abstract = bool(int(element.get('abstract', '0'))) - 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) + class_ = Class(name, context, [], abstract, []) self.AddDecl(class_) else: # a nested class visib = element.get('access', Scope.public) class_ = NestedClass( - name, context.FullName(), visib, [], abstract, bases) + name, context.FullName(), visib, [], abstract, []) # we have to add the declaration of the class before trying - # to parse its members, to avoid recursion. + # to parse its members and bases, to avoid recursion. class_.location = location class_.incomplete = incomplete self.Update(id, class_) - # now we can get the members + # now we can get the members and the bases + class_.bases = self.GetBases(element.get('bases')) class_.members = self.GetMembers(element.get('members')) diff --git a/pyste/src/pyste.py b/pyste/src/pyste.py index f3dcfbd9..b1e54e26 100644 --- a/pyste/src/pyste.py +++ b/pyste/src/pyste.py @@ -34,7 +34,7 @@ from policies import * from CppParser import CppParser, CppParserError import time -__VERSION__ = '0.7.5' +__VERSION__ = '0.7.6' def RecursiveIncludes(include): 'Return a list containg the include dir and all its subdirectories'