MCPcopy Create free account
hub / github.com/Tencent/xLua / xlua_setglobal

Function xlua_setglobal

WebGLPlugins/xlua.c:329–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327}
328
329LUA_API int xlua_setglobal (lua_State *L, const char *name) {
330 int top = lua_gettop(L);
331 lua_pushcfunction(L, c_lua_setglobal);
332 lua_pushstring(L, name);
333 lua_pushvalue(L, top);
334 lua_remove(L, top);
335 return lua_pcall(L, 2, 0, 0);
336}
337
338LUA_API int xlua_tryget_cachedud(lua_State *L, int key, int cache_ref) {
339 lua_rawgeti(L, LUA_REGISTRYINDEX, cache_ref);

Callers

nothing calls this directly

Calls 5

lua_gettopFunction · 0.85
lua_pushstringFunction · 0.85
lua_pushvalueFunction · 0.85
lua_removeFunction · 0.85
lua_pcallFunction · 0.85

Tested by

no test coverage detected