Update of /cvsroot/luabind/luabind/luabind/luabind
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29680/luabind
Modified Files:
Tag: beta7-devel2
adopt_policy.hpp iterator_policy.hpp
Log Message:
def_readwrite and def_readonly will now return references if the bound memeber type is not a primitive type
Index: adopt_policy.hpp
===================================================================
RCS file: /cvsroot/luabind/luabind/luabind/luabind/adopt_policy.hpp,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -u -d -r1.10.2.1 -r1.10.2.2
--- adopt_policy.hpp 23 Oct 2005 21:37:16 -0000 1.10.2.1
+++ adopt_policy.hpp 24 Oct 2005 09:44:00 -0000 1.10.2.2
@@ -27,12 +27,17 @@
#include <luabind/config.hpp>
#include <luabind/detail/policy.hpp>
#include <luabind/detail/implicit_cast.hpp>
+#include <boost/mpl/bool.hpp>
+#include <luabind/back_reference_fwd.hpp>
namespace luabind { namespace detail
{
template<class Direction = lua_to_cpp>
struct adopt_pointer
{
+ typedef boost::mpl::bool_<false> is_value_converter;
+ typedef adopt_pointer type;
+
template<class T>
T* apply(lua_State* L, by_pointer<T>, int index)
{
@@ -75,6 +80,9 @@
template<>
struct adopt_pointer<cpp_to_lua>
{
+ typedef boost::mpl::bool_<false> is_value_converter;
+ typedef adopt_pointer type;
+
template<class T>
void apply(lua_State* L, T* ptr)
{
@@ -87,7 +95,7 @@
// if there is a back_reference, then the
// ownership will be removed from the
// back reference and put on the lua stack.
- if (move_back_reference::move(L, ptr))
+ if (luabind::move_back_reference(L, ptr))
{
object_rep* obj = static_cast<object_rep*>(lua_touserdata(L, -1));
obj->set_flags(obj->flags() | object_rep::owner);
Index: iterator_policy.hpp
===================================================================
RCS file: /cvsroot/luabind/luabind/luabind/luabind/iterator_policy.hpp,v
retrieving revision 1.3
retrieving revision 1.3.4.1
diff -u -d -r1.3 -r1.3.4.1
--- iterator_policy.hpp 5 Jul 2003 22:13:59 -0000 1.3
+++ iterator_policy.hpp 24 Oct 2005 09:44:00 -0000 1.3.4.1
@@ -28,6 +28,7 @@
#include <luabind/detail/policy.hpp>
#include <luabind/detail/implicit_cast.hpp>
#include <luabind/detail/convert_to_lua.hpp>
+#include <boost/mpl/bool.hpp>
namespace luabind { namespace detail
{
@@ -64,6 +65,9 @@
struct iterator_converter
{
+ typedef boost::mpl::bool_<false> is_value_converter;
+ typedef iterator_converter type;
+
template<class T>
void apply(lua_State* L, const T& c)
{
|