MCPcopy Create free account
hub / github.com/Tencent/UnLua / Lpb_state

Function Lpb_state

Plugins/UnLuaExtensions/LuaProtobuf/Source/src/pb.cpp:204–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202}
203
204static int Lpb_state(lua_State *L) {
205 int top = lua_gettop(L);
206 lpb_lstate(L);
207 lua_rawgetp(L, LUA_REGISTRYINDEX, state_name);
208 if (top != 0) {
209 if (lua_isnil(L, 1))
210 lua_pushnil(L);
211 else {
212 luaL_checkudata(L, 1, PB_STATE);
213 lua_pushvalue(L, 1);
214 }
215 lua_rawsetp(L, LUA_REGISTRYINDEX, state_name);
216 }
217 return 1;
218}
219
220
221/* protobuf util routines */

Callers

nothing calls this directly

Calls 7

lua_gettopFunction · 0.85
lpb_lstateFunction · 0.85
lua_pushnilFunction · 0.85
luaL_checkudataFunction · 0.85
lua_pushvalueFunction · 0.85
lua_rawgetpFunction · 0.70
lua_rawsetpFunction · 0.70

Tested by

no test coverage detected