MCPcopy Create free account
hub / github.com/crownengine/crown / lua_loadx

Function lua_loadx

3rdparty/luajit/src/lj_load.c:48–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48LUA_API int lua_loadx(lua_State *L, lua_Reader reader, void *data,
49 const char *chunkname, const char *mode)
50{
51 LexState ls;
52 int status;
53 ls.rfunc = reader;
54 ls.rdata = data;
55 ls.chunkarg = chunkname ? chunkname : "?";
56 ls.mode = mode;
57 lj_buf_init(L, &ls.sb);
58 status = lj_vm_cpcall(L, NULL, &ls, cpparser);
59 lj_lex_cleanup(L, &ls);
60 lj_gc_check(L);
61 return status;
62}
63
64LUA_API int lua_load(lua_State *L, lua_Reader reader, void *data,
65 const char *chunkname)

Callers 4

lib_base.cFile · 0.85
lua_loadFunction · 0.85
luaL_loadfilexFunction · 0.85
luaL_loadbufferxFunction · 0.85

Calls 2

lj_buf_initFunction · 0.85
lj_lex_cleanupFunction · 0.85

Tested by

no test coverage detected