MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / GetDataInt

Function GetDataInt

src/vm/luavm/lmylib.cpp:206–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206static bool GetDataInt(lua_State *L, int32_t &intValue) {
207 //从栈里取int 高度
208 if (!lua_isinteger(L, -1 - 0)) {
209 LogPrint(BCLog::LUAVM, "%s\n", "data is not integer");
210 return false;
211 } else {
212 int32_t value = (int32_t)lua_tointeger(L, -1 - 0);
213 // LogPrint(BCLog::LUAVM, "GetDataInt:%d\n", value);
214 intValue = value;
215 return true;
216 }
217}
218
219static bool GetDataString(lua_State *L, vector<std::shared_ptr<std::vector<uint8_t>>> &ret) {
220 //从栈里取一串字符串

Callers 3

ExIntegerToByte4FuncFunction · 0.85
ExGetBlockHashFuncFunction · 0.85
ExGetBlockTimestampFunction · 0.85

Calls 1

lua_isintegerFunction · 0.85

Tested by

no test coverage detected