| 46 | } |
| 47 | |
| 48 | LUA_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 | |
| 64 | LUA_API int lua_load(lua_State *L, lua_Reader reader, void *data, |
| 65 | const char *chunkname) |
no test coverage detected