MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / lua_pushstring

Function lua_pushstring

ThirdParty/lua/lua/lapi.c:484–499  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

482
483
484LUA_API const char *lua_pushstring (lua_State *L, const char *s) {
485 if (s == NULL) {
486 lua_pushnil(L);
487 return NULL;
488 }
489 else {
490 TString *ts;
491 lua_lock(L);
492 luaC_checkGC(L);
493 ts = luaS_new(L, s);
494 setsvalue2s(L, L->top, ts);
495 api_incr_top(L);
496 lua_unlock(L);
497 return getstr(ts);
498 }
499}
500
501
502LUA_API const char *lua_pushvfstring (lua_State *L, const char *fmt,

Callers 15

PushStringFunction · 0.85
luaopen_baseFunction · 0.85
pushglobalfuncnameFunction · 0.85
luaL_fileresultFunction · 0.85
luaL_execresultFunction · 0.85
luaL_newmetatableFunction · 0.85
luaL_getmetafieldFunction · 0.85
luaL_tolstringFunction · 0.85
luaL_requirefFunction · 0.85
lsys_loadFunction · 0.85
lsys_symFunction · 0.85
pusherrorFunction · 0.85

Calls 2

lua_pushnilFunction · 0.85
luaS_newFunction · 0.85

Tested by

no test coverage detected