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

Function lua_pushstring

third-party/lua-5.2.4/src/lapi.c:513–528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

511
512
513LUA_API const char *lua_pushstring (lua_State *L, const char *s) {
514 if (s == NULL) {
515 lua_pushnil(L);
516 return NULL;
517 }
518 else {
519 TString *ts;
520 lua_lock(L);
521 luaC_checkGC(L);
522 ts = luaS_new(L, s);
523 setsvalue2s(L, L->top, ts);
524 api_incr_top(L);
525 lua_unlock(L);
526 return getstr(ts);
527 }
528}
529
530
531LUA_API const char *lua_pushvfstring (lua_State *L, const char *fmt,

Callers 15

getargsFunction · 0.70
dolibraryFunction · 0.70
pushlineFunction · 0.70
luaB_typeFunction · 0.70
finishpcallFunction · 0.70
luaL_fileresultFunction · 0.70
luaL_execresultFunction · 0.70
luaL_getmetafieldFunction · 0.70
luaL_tolstringFunction · 0.70
luaL_requirefFunction · 0.70
ll_loadFunction · 0.70
ll_symFunction · 0.70

Calls 2

lua_pushnilFunction · 0.70
luaS_newFunction · 0.70

Tested by

no test coverage detected