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

merged const_argument fixes from the main trunk

[SVN r25925]
This commit is contained in:
Aleksey Gurtovoy
2004-10-29 03:21:18 +00:00
parent c99bd3ab00
commit d65734aac4
2 changed files with 6 additions and 14 deletions

View File

@@ -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 );
}

View File

@@ -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
"""