| 204 | } |
| 205 | |
| 206 | static 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 | |
| 219 | static bool GetDataString(lua_State *L, vector<std::shared_ptr<std::vector<uint8_t>>> &ret) { |
| 220 | //从栈里取一串字符串 |
no test coverage detected