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

- Changed "no_override" to "final"

[SVN r18826]
This commit is contained in:
Bruno da Silva de Oliveira
2003-06-17 23:25:16 +00:00
parent 73e2ab5125
commit 9f711ed821
4 changed files with 11 additions and 11 deletions

View File

@@ -234,15 +234,15 @@ The string inside the brackets is the same as the name of the operator in C++.[b
[h2 Virtual Member Functions]
Pyste automatically generates wrappers for virtual member functions, but you
may want to disable this behaviour (for performance reasons, or to let the code
more clean) if you do not plan to override the functions in Python. To do
this, use the function [^no_override]:
may want to disable this behaviour (for performance reasons, or to let the
code more clean) if you do not plan to override the functions in Python. To do
this, use the function [^final]:
C = Class('C', 'C.h')
no_override(C.foo) # C::foo is a virtual member function
final(C.foo) # C::foo is a virtual member function
No wrapper code will be generated for the virtual member function C::foo that
way.
No virtual wrapper code will be generated for the virtual member function
C::foo that way.
[page:1 Policies]

View File

@@ -216,5 +216,5 @@ def add_method(info, name, rename=None):
else:
added.append((name, rename))
def no_override(info):
def final(info):
info._Attribute('no_override', True)

View File

@@ -39,7 +39,7 @@ from policies import *
from CppParser import CppParser, CppParserError
import time
__VERSION__ = '0.9.4'
__VERSION__ = '0.9.5'
def RecursiveIncludes(include):
'Return a list containg the include dir and all its subdirectories'
@@ -139,7 +139,7 @@ def CreateContext():
context['use_shared_ptr'] = infos.use_shared_ptr
context['use_auto_ptr'] = infos.use_auto_ptr
context['add_method'] = infos.add_method
context['no_override'] = infos.no_override
context['final'] = infos.final
# policies
context['return_internal_reference'] = return_internal_reference
context['with_custodian_and_ward'] = with_custodian_and_ward

View File

@@ -1,6 +1,6 @@
C = Class('virtual_::C', 'virtual.h')
no_override(C.dummy)
final(C.dummy)
D = Class('virtual_::D', 'virtual.h')
no_override(D.dummy)
final(D.dummy)
Function('virtual_::call_f', 'virtual.h')
Function('virtual_::call_dummy', 'virtual.h')