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

Function lua_pushstring

extlibs/lua/src/lapi.c:509–523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

507
508
509LUA_API const char *lua_pushstring (lua_State *L, const char *s) {
510 lua_lock(L);
511 if (s == NULL)
512 setnilvalue(s2v(L->top));
513 else {
514 TString *ts;
515 ts = luaS_new(L, s);
516 setsvalue2s(L, L->top, ts);
517 s = getstr(ts); /* internal copy's address */
518 }
519 api_incr_top(L);
520 luaC_checkGC(L);
521 lua_unlock(L);
522 return s;
523}
524
525
526LUA_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