comparison OrthancFramework/Sources/Lua/LuaFunctionCall.cpp @ 4819:70d2a97ca8cb openssl-3.x

integration mainline->openssl-3.x
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 25 Nov 2021 13:12:32 +0100
parents 94616af363ec
children 7053502fbf97
comparison
equal deleted inserted replaced
4785:61da49321754 4819:70d2a97ca8cb
144 { 144 {
145 throw OrthancException(ErrorCode_LuaReturnsNoString); 145 throw OrthancException(ErrorCode_LuaReturnsNoString);
146 } 146 }
147 } 147 }
148 148
149 void LuaFunctionCall::ExecuteToInt(int& result)
150 {
151 ExecuteInternal(1);
152
153 int top = lua_gettop(context_.lua_);
154 if (lua_isnumber(context_.lua_, top))
155 {
156 result = static_cast<int>(lua_tointeger(context_.lua_, top));
157 }
158 else
159 {
160 throw OrthancException(ErrorCode_LuaReturnsNoString);
161 }
162 }
149 163
150 void LuaFunctionCall::PushStringMap(const std::map<std::string, std::string>& value) 164 void LuaFunctionCall::PushStringMap(const std::map<std::string, std::string>& value)
151 { 165 {
152 Json::Value json = Json::objectValue; 166 Json::Value json = Json::objectValue;
153 167