1 /* Copyright 2004 Jonathan Brandmeyer
2  * Use, modification and distribution are subject to the
3  * Boost Software License, Version 1.0. (See accompanying file
4  * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5  *
6  * The purpose of this test is to determine if a function can be called from
7  * Python with a const value type as an argument, and whether or not the
8  * presence of a prototype without the cv-qualifier will work around the
9  * compiler's bug.
10  */
11 #include <boost/python.hpp>
12 using namespace boost::python;
13 
14 
15 #if BOOST_WORKAROUND(BOOST_MSVC, == 1200)
16 bool accept_const_arg( object );
17 #endif
18 
accept_const_arg(const object)19 bool accept_const_arg( const object )
20 {
21     return true;
22 }
23 
24 
BOOST_PYTHON_MODULE(const_argument_ext)25 BOOST_PYTHON_MODULE( const_argument_ext )
26 {
27     def( "accept_const_arg", accept_const_arg );
28 }
29