| 52 | } |
| 53 | |
| 54 | static luabind::internal_string to_string(luabind::object const& o) |
| 55 | { |
| 56 | using namespace luabind; |
| 57 | if (o.type() == LUA_TSTRING) |
| 58 | return object_cast<luabind::internal_string>(o); |
| 59 | lua_State* L = o.lua_state(); |
| 60 | LUABIND_CHECK_STACK(L); |
| 61 | |
| 62 | std::stringstream s; |
| 63 | |
| 64 | if (o.type() == LUA_TNUMBER) |
| 65 | { |
| 66 | s << object_cast<float>(o); |
| 67 | return luabind::internal_string(s.str().c_str()); |
| 68 | } |
| 69 | |
| 70 | s << "<" << lua_typename(L, o.type()) << ">"; |
| 71 | return s.str().c_str(); |
| 72 | } |
| 73 | |
| 74 | void strreplaceall(luabind::internal_string& str, LPCSTR S, LPCSTR N) |
| 75 | { |
no test coverage detected