Changeset 367bf20 in nscp for modules/LUAScript
- Timestamp:
- 04/03/08 19:47:01 (5 years ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2, stable
- Children:
- 9567d4b, eb30340
- Parents:
- b7ed6ac
- File:
-
- 1 edited
-
modules/LUAScript/script_wrapper.hpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
modules/LUAScript/script_wrapper.hpp
rb7ed6ac r367bf20 57 57 } 58 58 std::wstring extract_string(lua_State *L) { 59 return strEx::string_to_wstring(lua_tostring( L, lua_gettop( L ) )); 59 int top = lua_gettop(L); 60 if (lua_isstring(L, top)) 61 return strEx::string_to_wstring(lua_tostring( L, lua_gettop( L ) )); 62 return _T("<NOT_A_STRING>"); 60 63 } 61 64 std::wstring pop_string(lua_State *L) { 62 std::wstring ret = strEx::string_to_wstring(lua_tostring( L, lua_gettop( L ) )); 65 std::wstring ret; 66 int top = lua_gettop(L); 67 if (lua_isstring(L, top)) 68 ret = strEx::string_to_wstring(lua_tostring( L, top)); 69 else if (lua_isnil(L, top)) 70 ret = _T("<NIL>"); 71 else if (lua_istable(L, top)) 72 ret = _T("<TABLE>"); 73 else if (lua_isnumber(L, top)) 74 ret = _T("<NUMBER>"); 75 else if (lua_iscfunction(L, top)) 76 ret = _T("<C-FUNCTION>"); 77 else 78 ret = _T("<UNKNOWN>"); 63 79 lua_pop(L, 1); 64 80 return ret;
Note: See TracChangeset
for help on using the changeset viewer.








