1 // Copyright Daniel Wallin 2009. Use, modification and distribution is
2 // subject to the Boost Software License, Version 1.0. (See accompanying
3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 #include <luabind/luabind.hpp>
7 #include <luabind/shared_ptr_converter.hpp>
18 int get_value(boost::shared_ptr
<X
> const& p
)
23 boost::shared_ptr
<X
> filter(boost::shared_ptr
<X
> const& p
)
28 void test_main(lua_State
* L
)
30 using namespace luabind
;
34 .def(constructor
<int>()),
35 def("get_value", &get_value
),
36 def("filter", &filter
)
41 "assert(get_value(x) == 1)\n"
45 "assert(x == filter(x))\n"