MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / luaX_newstring

Function luaX_newstring

Source/Misc/lua/src/lua.c:6830–6837  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6828
6829
6830TString *luaX_newstring (LexState *ls, const char *str, size_t l) {
6831lua_State *L = ls->L;
6832TString *ts = luaS_newlstr(L, str, l);
6833TValue *o = luaH_setstr(L, ls->fs->h, ts); /* entry for `str' */
6834if (ttisnil(o))
6835setbvalue(o, 1); /* make sure `str' will not be collected */
6836return ts;
6837}
6838
6839
6840static 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