Mercurial > hg > orthanc
diff Core/Lua/LuaFunctionCall.cpp @ 1010:160dfe770618 lua-scripting
refactoring
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 09 Jul 2014 17:05:00 +0200 |
parents | 1b1d51e9f1a2 |
children | 92f4bf2c5d73 |
line wrap: on
line diff
--- a/Core/Lua/LuaFunctionCall.cpp Wed Jul 09 16:11:44 2014 +0200 +++ b/Core/Lua/LuaFunctionCall.cpp Wed Jul 09 17:05:00 2014 +0200 @@ -266,6 +266,10 @@ { result = std::string(lua_tostring(lua, top)); } + else if (lua_isboolean(lua, top)) + { + result = static_cast<bool>(lua_toboolean(lua, top)); + } else { LOG(WARNING) << "Unsupported Lua type when returning Json";