MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / luaS_newlstr

Function luaS_newlstr

ThirdParty/lua/lua/lstring.c:151–159  ·  view source on GitHub ↗

** new string (with explicit length) */

Source from the content-addressed store, hash-verified

149** new string (with explicit length)
150*/
151TString *luaS_newlstr (lua_State *L, const char *str, size_t l) {
152 if (l <= LUAI_MAXSHORTLEN) /* short string? */
153 return internshrstr(L, str, l);
154 else {
155 if (l + 1 > (MAX_SIZE - sizeof(TString))/sizeof(char))
156 luaM_toobig(L);
157 return createstrobj(L, str, l, LUA_TLNGSTR, G(L)->seed);
158 }
159}
160
161
162/*

Callers 8

luaV_concatFunction · 0.85
luaX_newstringFunction · 0.85
luaO_tostringFunction · 0.85
pushstrFunction · 0.85
LoadStringFunction · 0.85
lua_pushlstringFunction · 0.85
lua_concatFunction · 0.85
luaS_newFunction · 0.85

Calls 4

internshrstrFunction · 0.85
luaM_toobigFunction · 0.85
createstrobjFunction · 0.85
GFunction · 0.50

Tested by

no test coverage detected