From d65734aac4dffbbe78ac3e7350506ac561ecc73a Mon Sep 17 00:00:00 2001 From: Aleksey Gurtovoy Date: Fri, 29 Oct 2004 03:21:18 +0000 Subject: [PATCH] merged const_argument fixes from the main trunk [SVN r25925] --- test/const_argument.cpp | 16 +++++----------- test/const_argument.py | 4 +--- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/test/const_argument.cpp b/test/const_argument.cpp index 04c72316..6c5a8945 100644 --- a/test/const_argument.cpp +++ b/test/const_argument.cpp @@ -14,23 +14,17 @@ using namespace boost::python; BOOST_TT_BROKEN_COMPILER_SPEC( object ) -#if !BOOST_WORKAROUND(BOOST_MSVC, == 1200) -bool accept_const_arg_noproto( const object ) -{ - return true; -} +#if BOOST_WORKAROUND(BOOST_MSVC, == 1200) +bool accept_const_arg( object ); #endif -bool accept_const_arg_with_proto( object ); -bool accept_const_arg_with_proto( const object ) +bool accept_const_arg( const object ) { return true; } + BOOST_PYTHON_MODULE( const_argument_ext ) { -#if !BOOST_WORKAROUND(BOOST_MSVC, == 1200) - def( "accept_const_arg_noproto", accept_const_arg_noproto ); -#endif - def( "accept_const_arg_with_proto", accept_const_arg_with_proto ); + def( "accept_const_arg", accept_const_arg ); } diff --git a/test/const_argument.py b/test/const_argument.py index 2f1f4a06..15e87e80 100644 --- a/test/const_argument.py +++ b/test/const_argument.py @@ -3,9 +3,7 @@ # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) """ >>> from const_argument_ext import * ->>> accept_const_arg_noproto(1) -1 ->>> accept_const_arg_with_proto(1) +>>> accept_const_arg(1) 1 """