[luabind-cvs] luabind/luabind/luabind object.hpp,1.36.2.3,1.36.2.4
Brought to you by:
arvidn,
daniel_wallin
From: Arvid N. <ar...@us...> - 2006-01-01 23:58:29
|
Update of /cvsroot/luabind/luabind/luabind/luabind In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22841/luabind Modified Files: Tag: luabind_rc_0_7 object.hpp Log Message: optimized operator<< for object Index: object.hpp =================================================================== RCS file: /cvsroot/luabind/luabind/luabind/luabind/object.hpp,v retrieving revision 1.36.2.3 retrieving revision 1.36.2.4 diff -u -d -r1.36.2.3 -r1.36.2.4 --- object.hpp 1 Jan 2006 19:41:53 -0000 1.36.2.3 +++ object.hpp 1 Jan 2006 23:58:20 -0000 1.36.2.4 @@ -225,8 +225,10 @@ detail::stack_pop pop(interpreter, 1); value_wrapper_traits<ValueWrapper>::unwrap(interpreter , static_cast<ValueWrapper const&>(v)); - return os << std::string(lua_tostring(interpreter, -1) - , lua_strlen(interpreter, -1)); + char const* p = lua_tostring(interpreter, -1); + int len = lua_strlen(interpreter, -1); + std::copy(p, p + len, std::ostream_iterator<char>(os)); + return os; } #undef LUABIND_BINARY_OP_DEF |