MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / lua_pushstring

Function lua_pushstring

3rd/lua-5.4.3/src/lapi.c:532–546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

530
531
532LUA_API const char *lua_pushstring (lua_State *L, const char *s) {
533 lua_lock(L);
534 if (s == NULL)
535 setnilvalue(s2v(L->top));
536 else {
537 TString *ts;
538 ts = luaS_new(L, s);
539 setsvalue2s(L, L->top, ts);
540 s = getstr(ts); /* internal copy's address */
541 }
542 api_incr_top(L);
543 luaC_checkGC(L);
544 lua_unlock(L);
545 return s;
546}
547
548
549LUA_API const char *lua_pushvfstring (lua_State *L, const char *fmt,

Callers 15

range_formatFunction · 0.85
type_formatFunction · 0.85
PushDiagnosticToLuaFunction · 0.85
spell_suggestFunction · 0.85
createargtableFunction · 0.85
dolibraryFunction · 0.85
pushmodeFunction · 0.85
luaB_typeFunction · 0.85
math_typeFunction · 0.85
pushglobalfuncnameFunction · 0.85
luaL_fileresultFunction · 0.85
luaL_execresultFunction · 0.85

Calls 1

luaS_newFunction · 0.85

Tested by

no test coverage detected