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

Function luaX_newstring

third-party/lua-5.1.5/src/llex.c:117–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115
116
117TString *luaX_newstring (LexState *ls, const char *str, size_t l) {
118 lua_State *L = ls->L;
119 TString *ts = luaS_newlstr(L, str, l);
120 TValue *o = luaH_setstr(L, ls->fs->h, ts); /* entry for `str' */
121 if (ttisnil(o)) {
122 setbvalue(o, 1); /* make sure `str' will not be collected */
123 luaC_checkGC(L);
124 }
125 return ts;
126}
127
128
129static void inclinenumber (LexState *ls) {

Callers 4

read_long_stringFunction · 0.70
read_stringFunction · 0.70
llexFunction · 0.70
anchor_tokenFunction · 0.70

Calls 2

luaH_setstrFunction · 0.85
luaS_newlstrFunction · 0.70

Tested by

no test coverage detected