From 9f711ed8212665ab626e9ffffd35b4f0958fc9cb Mon Sep 17 00:00:00 2001 From: Bruno da Silva de Oliveira Date: Tue, 17 Jun 2003 23:25:16 +0000 Subject: [PATCH] - Changed "no_override" to "final" [SVN r18826] --- pyste/doc/pyste.txt | 12 ++++++------ pyste/src/infos.py | 2 +- pyste/src/pyste.py | 4 ++-- pyste/tests/virtual.pyste | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pyste/doc/pyste.txt b/pyste/doc/pyste.txt index b7494dc8..105aedaf 100644 --- a/pyste/doc/pyste.txt +++ b/pyste/doc/pyste.txt @@ -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] diff --git a/pyste/src/infos.py b/pyste/src/infos.py index 67b5f553..46113cbe 100644 --- a/pyste/src/infos.py +++ b/pyste/src/infos.py @@ -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) diff --git a/pyste/src/pyste.py b/pyste/src/pyste.py index 58910f43..8118b0ca 100644 --- a/pyste/src/pyste.py +++ b/pyste/src/pyste.py @@ -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 diff --git a/pyste/tests/virtual.pyste b/pyste/tests/virtual.pyste index f148ad97..ef966412 100644 --- a/pyste/tests/virtual.pyste +++ b/pyste/tests/virtual.pyste @@ -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')