MCPcopy Create free account
hub / github.com/DFHack/dfhack / lua_pushstring

Function lua_pushstring

depends/lua/src/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

init_run_scriptFunction · 0.85
PushInterfaceKeysMethod · 0.85
signal_typeid_errorFunction · 0.85
get_consoleFunction · 0.85
dfhack_lineedit_syncFunction · 0.85
dfhack_lineeditFunction · 0.85
convert_to_exceptionFunction · 0.85
push_simple_errorFunction · 0.85
PushModuleMethod · 0.85
PushModulePublicMethod · 0.85
init_interpreterFunction · 0.85

Calls 1

luaS_newFunction · 0.85

Tested by

no test coverage detected