MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / lua_pushstring

Function lua_pushstring

src/Chain/libraries/glua/lapi.cpp:494–508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 15

lualib_http_get_req_pathFunction · 0.85
lualib_net_write_implFunction · 0.85
os_tmpnameFunction · 0.85
os_getenvFunction · 0.85
os_setlocaleFunction · 0.85
checkfieldFunction · 0.85
time_tostrFunction · 0.85

Calls 1

luaS_newFunction · 0.85

Tested by

no test coverage detected