MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / lua_pushstring

Function lua_pushstring

lib/lua/src/lapi.c:538–552  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

536
537
538LUA_API const char *lua_pushstring (lua_State *L, const char *s) {
539 lua_lock(L);
540 if (s == NULL)
541 setnilvalue(s2v(L->top.p));
542 else {
543 TString *ts;
544 ts = luaS_new(L, s);
545 setsvalue2s(L, L->top.p, ts);
546 s = getstr(ts); /* internal copy's address */
547 }
548 api_incr_top(L);
549 luaC_checkGC(L);
550 lua_unlock(L);
551 return s;
552}
553
554
555LUA_API const char *lua_pushvfstring (lua_State *L, const char *fmt,

Callers 15

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
luaL_newmetatableFunction · 0.85
luaL_getmetafieldFunction · 0.85
luaL_tolstringFunction · 0.85
luaL_requirefFunction · 0.85

Calls 1

luaS_newFunction · 0.85

Tested by

no test coverage detected