2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-25 06:22:15 +00:00

- fixed bug where non-public virtual methods where being exported

- fixed " call_method<%s>"  to " call_method< %s >"


[SVN r17860]
This commit is contained in:
Bruno da Silva de Oliveira
2003-03-12 21:26:45 +00:00
parent cd06018820
commit 0f1dc1fd50

View File

@@ -334,7 +334,7 @@ class ClassExporter(Exporter):
def ExportVirtualMethods(self):
# check if this class has any virtual methods
has_virtual_methods = False
for member in self.class_.members:
for member in self.public_members:
if type(member) == Method and member.virtual:
has_virtual_methods = True
break
@@ -605,7 +605,7 @@ class _VirtualWrapperGenerator(object):
param_names_str = ', '.join(param_names)
if param_names_str:
param_names_str = ', ' + param_names_str
decl += indent*2 + '%s%scall_method<%s>(self, "%s"%s);\n' %\
decl += indent*2 + '%s%scall_method< %s >(self, "%s"%s);\n' %\
(return_str, python, result, rename, param_names_str)
decl += indent + '}\n'
@@ -675,11 +675,15 @@ class _VirtualWrapperGenerator(object):
def VirtualMethods(self):
return [m for m in self.class_.members if type(m) == Method and m.virtual]
def IsVirtual(m):
return type(m) == Method and m.virtual and m.visibility == Scope.public
return [m for m in self.class_.members if IsVirtual(m)]
def Constructors(self):
return [m for m in self.class_.members if isinstance(m, Constructor)]
def IsValid(m):
return isinstance(m, Constructor) and m.visibility == Scope.public
return [m for m in self.class_.members if IsValid(m)]
def GenerateDefinitions(self):