MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / luaX_newstring

Function luaX_newstring

lua/llex.c:119–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 4

read_long_stringFunction · 0.85
read_stringFunction · 0.85
llexFunction · 0.85
anchor_tokenFunction · 0.85

Calls 2

luaS_newlstrFunction · 0.85
luaH_setstrFunction · 0.85

Tested by

no test coverage detected