MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / lua_pushstring

Function lua_pushstring

third-party/lua-5.5.0/src/lapi.c:570–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

568
569
570LUA_API const char *lua_pushstring (lua_State *L, const char *s) {
571 lua_lock(L);
572 if (s == NULL)
573 setnilvalue(s2v(L->top.p));
574 else {
575 TString *ts;
576 ts = luaS_new(L, s);
577 setsvalue2s(L, L->top.p, ts);
578 s = getstr(ts); /* internal copy's address */
579 }
580 api_incr_top(L);
581 luaC_checkGC(L);
582 lua_unlock(L);
583 return s;
584}
585
586
587LUA_API const char *lua_pushvfstring (lua_State *L, const char *fmt,

Callers 15

createargtableFunction · 0.70
dolibraryFunction · 0.70
pushmodeFunction · 0.70
luaB_typeFunction · 0.70
math_typeFunction · 0.70
pushglobalfuncnameFunction · 0.70
luaL_fileresultFunction · 0.70
luaL_execresultFunction · 0.70
luaL_newmetatableFunction · 0.70
luaL_getmetafieldFunction · 0.70
luaL_tolstringFunction · 0.70
luaL_requirefFunction · 0.70

Calls 1

luaS_newFunction · 0.70

Tested by

no test coverage detected