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

- Fix a bug where a declaration was appearing more than once in an intermediate class in an hierarchy not fully-exported

[SVN r19489]
This commit is contained in:
Bruno da Silva de Oliveira
2003-08-08 02:56:04 +00:00
parent 53726746b8
commit f2b51da0ab
2 changed files with 11 additions and 10 deletions

View File

@@ -111,8 +111,9 @@ class ClassExporter(Exporter):
just export one type and automatically get all the members from the
base classes.
'''
valid_members = (Method, ClassVariable, NestedClass, ClassOperator,
ConverterOperator, ClassEnumeration)
valid_members = (Method, ClassVariable, NestedClass, ClassEnumeration)
# these don't work INVESTIGATE!: (ClassOperator, ConverterOperator)
fullnames = [x.FullName() for x in self.class_]
for level in self.class_.hierarchy:
level_exported = False
for base in level:
@@ -120,17 +121,17 @@ class ClassExporter(Exporter):
if base.FullName() not in exported_names:
for member in base:
if type(member) in valid_members:
member = copy.deepcopy(member)
#if type(member) not in (ClassVariable,:
# member.class_ = self.class_.FullName()
self.class_.AddMember(member)
member_copy = copy.deepcopy(member)
member_copy.class_ = self.class_.FullName()
if member_copy.FullName() not in fullnames:
self.class_.AddMember(member)
else:
level_exported = True
if level_exported:
break
def IsValid(member):
return isinstance(member, valid_members) and member.visibility == Scope.public
self.public_members = [x for x in self.class_ if IsValid(x)]
self.public_members = [x for x in self.class_ if IsValid(x)]
def Write(self, codeunit):

View File

@@ -10,12 +10,12 @@ import sys
#=============================================================================
if sys.platform == 'win32':
includes = '-ID:/programming/libraries/boost-cvs/boost -IC:/Python/include'
includes = '-ID:/programming/libraries/boost-cvs/boost -ID:/Bin/Python/include'
build_pyste_cmd = 'python ../src/Pyste/pyste.py %s ' % includes
compile_single_cmd = 'icl /nologo /GR /GX -c %s -I. ' % includes
link_single_cmd = 'link /nologo /DLL '\
'/libpath:D:/programming/libraries/boost-cvs/lib /libpath:C:/Python/libs '\
'boost_python.lib python22.lib /out:_%s.dll '
'/libpath:D:/programming/libraries/boost-cvs/lib /libpath:D:/Bin/Python/libs '\
'boost_python.lib python23.lib /out:_%s.dll '
obj_ext = 'obj'
#=============================================================================