MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / lua_pushstring

Function lua_pushstring

source/extern/lua/lapi.c:491–505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

489
490
491LUA_API const char *lua_pushstring (lua_State *L, const char *s) {
492 lua_lock(L);
493 if (s == NULL)
494 setnilvalue(L->top);
495 else {
496 TString *ts;
497 ts = luaS_new(L, s);
498 setsvalue2s(L, L->top, ts);
499 s = getstr(ts); /* internal copy's address */
500 }
501 api_incr_top(L);
502 luaC_checkGC(L);
503 lua_unlock(L);
504 return s;
505}
506
507
508LUA_API const char *lua_pushvfstring (lua_State *L, const char *fmt,

Callers 15

pushImguiEnumsFunction · 0.85
luaB_typeFunction · 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
checkfieldFunction · 0.85
lsys_loadFunction · 0.85
lsys_symFunction · 0.85

Calls 1

luaS_newFunction · 0.85

Tested by

no test coverage detected