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

- HeaderExporter now doesn't export names that begin with "_"

- Bug in ClassExporter, was adding an attribute to the members of base classes in GenerateVirtualMethods


[SVN r18516]
This commit is contained in:
Bruno da Silva de Oliveira
2003-05-23 19:13:52 +00:00
parent c81af4ffe0
commit 19eff7791d
4 changed files with 26 additions and 10 deletions

View File

@@ -747,13 +747,14 @@ class _VirtualWrapperGenerator(object):
This method creates the instance variable self.virtual_methods.
'''
def IsVirtual(m):
return m.virtual and m.visibility != Scope.private
return isinstance(m, Method) and m.virtual and m.visibility != Scope.private
all_members = self.class_.members[:]
all_methods = [x for x in self.class_.members if IsVirtual(x)]
for base in self.bases:
for base_member in base.members:
base_member.class_ = self.class_.FullName()
all_members.append(base_member)
base_methods = [x.Copy() for x in self.bases.members if IsVirtual(x)]
for base_method in base_methods:
base_method.class_ = self.class_.FullName()
all_methods.append(base_method)
# extract the virtual methods, avoiding duplications. The duplication
# must take in account the full signature without the class name, so
@@ -771,10 +772,9 @@ class _VirtualWrapperGenerator(object):
params = ', '.join([x.FullName() for x in method.parameters])
return '%s %s(%s) %s' % (result, method.name, params, const)
all_members = [x for x in all_members if type(x) == Method]
self.virtual_methods = []
already_added = {}
for member in all_members:
for member in all_methods:
sig = MethodSig(member)
if IsVirtual(member) and not sig in already_added:
self.virtual_methods.append(member)