[luabind-cvs] luabind/luabind/luabind/detail policy.hpp,1.54,1.55
Brought to you by:
arvidn,
daniel_wallin
From: Arvid N. <ar...@us...> - 2006-03-26 20:34:17
|
Update of /cvsroot/luabind/luabind/luabind/luabind/detail In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17155/luabind/detail Modified Files: policy.hpp Log Message: added a primitive converter for objects of type LUA_TTHREAD to lua_State*. Fixed bug in class_info.cpp. added stack pops ti test.hpp where a test would fail, it still preserve the stack now. Removed obsolete tests of functor and added a test of call_function where the function that is called fails. Index: policy.hpp =================================================================== RCS file: /cvsroot/luabind/luabind/luabind/luabind/detail/policy.hpp,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- policy.hpp 21 Dec 2005 23:09:47 -0000 1.54 +++ policy.hpp 26 Mar 2006 20:34:13 -0000 1.55 @@ -345,6 +345,9 @@ PRIMITIVE_CONVERTER(double) { return static_cast<double>(lua_tonumber(L, index)); } PRIMITIVE_MATCHER(double) { if (lua_type(L, index) == LUA_TNUMBER) return 0; else return -1; } + PRIMITIVE_CONVERTER(lua_State*) { return lua_tothread(L, index); } + PRIMITIVE_MATCHER(lua_State*) { if (lua_type(L, index) == LUA_TTHREAD) return 0; else return -1; } + PRIMITIVE_CONVERTER(std::string) { return std::string(lua_tostring(L, index), lua_strlen(L, index)); } PRIMITIVE_MATCHER(std::string) { if (lua_type(L, index) == LUA_TSTRING) return 0; else return -1; } |