MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / lua_pushexternalstring

Function lua_pushexternalstring

third-party/lua-5.5.0/src/lapi.c:555–567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

553
554
555LUA_API const char *lua_pushexternalstring (lua_State *L,
556 const char *s, size_t len, lua_Alloc falloc, void *ud) {
557 TString *ts;
558 lua_lock(L);
559 api_check(L, len <= MAX_SIZE, "string too large");
560 api_check(L, s[len] == '\0', "string not ending with zero");
561 ts = luaS_newextlstr (L, s, len, falloc, ud);
562 setsvalue2s(L, L->top.p, ts);
563 api_incr_top(L);
564 luaC_checkGC(L);
565 lua_unlock(L);
566 return getstr(ts);
567}
568
569
570LUA_API const char *lua_pushstring (lua_State *L, const char *s) {

Callers 3

luaL_pushresultFunction · 0.85
setpathFunction · 0.85
createlibstrFunction · 0.85

Calls 1

luaS_newextlstrFunction · 0.85

Tested by

no test coverage detected