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:
@@ -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 );
|
||||
}
|
||||
|
||||
@@ -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
|
||||
"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user