Skip to content

Commit 4a7b8fe

Browse files
author
Bruno da Silva de Oliveira
committed
- Wrapper for protected and private pure virtual functions are now generated
[SVN r19922]
1 parent fc56544 commit 4a7b8fe

4 files changed

Lines changed: 12 additions & 5 deletions

File tree

pyste/NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
4 September 2003
2+
Now it is possible to override protected and private pure virtual functions
3+
in Python, as requested by Roman Yakovenko.
4+
15
23 August 2003
26
Fixed bug where some Imports where not writing their include files.
37
Now whenever the declarations change, the cache files are rebuilt

pyste/src/Pyste/ClassExporter.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -797,9 +797,12 @@ def GenerateVirtualMethods(self):
797797
This method creates the instance variable self.virtual_methods.
798798
'''
799799
def IsVirtual(m):
800-
return type(m) is Method and \
801-
m.virtual and \
802-
m.visibility != Scope.private
800+
if type(m) is Method:
801+
pure_virtual = m.abstract and m.virtual
802+
virtual = m.virtual and m.visibility != Scope.private
803+
return virtual or pure_virtual
804+
else:
805+
return False
803806

804807
# extract the virtual methods, avoiding duplications. The duplication
805808
# must take in account the full signature without the class name, so

pyste/src/Pyste/FunctionExporter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def GenerateOverloads(self, declarations, codeunit):
6161
overload = self.OverloadName(decl)
6262
if overload and overload not in codes:
6363
code = 'BOOST_PYTHON_FUNCTION_OVERLOADS(%s, %s, %i, %i)' %\
64-
(overload, decl.FullName(), decl.minArgs, decl_.maxArgs)
64+
(overload, decl.FullName(), decl.minArgs, decl.maxArgs)
6565
codeunit.Write('declaration', code + '\n')
6666
codes[overload] = None
6767

pyste/src/Pyste/pyste.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
import time
4444
import declarations
4545

46-
__version__ = '0.9.22'
46+
__version__ = '0.9.23'
4747

4848
def RecursiveIncludes(include):
4949
'Return a list containg the include dir and all its subdirectories'

0 commit comments

Comments
 (0)