* //3.往函数私有栈里存布尔类型返回值*/
| 120 | /* |
| 121 | * //3.往函数私有栈里存布尔类型返回值*/ |
| 122 | static inline int32_t RetRstBooleanToLua(lua_State *L, bool flag) { |
| 123 | //检测栈空间是否够 |
| 124 | if (lua_checkstack(L, sizeof(int32_t))) { |
| 125 | // LogPrint(BCLog::LUAVM, "RetRstBooleanToLua value:%d\n", flag); |
| 126 | lua_pushboolean(L, (int32_t)flag); |
| 127 | return 1; |
| 128 | } else { |
| 129 | LogPrint(BCLog::LUAVM, "%s\n", "RetRstBooleanToLua stack overflow"); |
| 130 | return 0; |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | static inline int32_t RetFalse(const string &reason) { |
| 135 | LogPrint(BCLog::LUAVM, "Error: %s\n", reason); |
no test coverage detected