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

Function RetRstBooleanToLua

src/vm/luavm/lmylib.cpp:122–132  ·  view source on GitHub ↗

* //3.往函数私有栈里存布尔类型返回值*/

Source from the content-addressed store, hash-verified

120/*
121 * //3.往函数私有栈里存布尔类型返回值*/
122static 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
134static inline int32_t RetFalse(const string &reason) {
135 LogPrint(BCLog::LUAVM, "Error: %s\n", reason);

Callers 10

ExVerifySignatureFuncFunction · 0.85
ExWriteDataDBFuncFunction · 0.85
ExDeleteDataDBFuncFunction · 0.85
ExModifyDataDBFuncFunction · 0.85
ExWriteOutputFuncFunction · 0.85
ExWriteOutAppOperateFuncFunction · 0.85
ExTransferContractAssetFunction · 0.85
ExTransferSomeAssetFunction · 0.85

Calls 2

lua_checkstackFunction · 0.85
lua_pushbooleanFunction · 0.85

Tested by

no test coverage detected