diff options
Diffstat (limited to 'src/lj_load.c')
-rw-r--r-- | src/lj_load.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_load.c b/src/lj_load.c index dbd36ac7..0aab4884 100644 --- a/src/lj_load.c +++ b/src/lj_load.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include "lj_obj.h" | 15 | #include "lj_obj.h" |
16 | #include "lj_gc.h" | 16 | #include "lj_gc.h" |
17 | #include "lj_err.h" | 17 | #include "lj_err.h" |
18 | #include "lj_str.h" | 18 | #include "lj_buf.h" |
19 | #include "lj_func.h" | 19 | #include "lj_func.h" |
20 | #include "lj_frame.h" | 20 | #include "lj_frame.h" |
21 | #include "lj_vm.h" | 21 | #include "lj_vm.h" |
@@ -54,7 +54,7 @@ LUA_API int lua_loadx(lua_State *L, lua_Reader reader, void *data, | |||
54 | ls.rdata = data; | 54 | ls.rdata = data; |
55 | ls.chunkarg = chunkname ? chunkname : "?"; | 55 | ls.chunkarg = chunkname ? chunkname : "?"; |
56 | ls.mode = mode; | 56 | ls.mode = mode; |
57 | lj_str_initbuf(&ls.sb); | 57 | lj_buf_init(L, &ls.sb); |
58 | status = lj_vm_cpcall(L, NULL, &ls, cpparser); | 58 | status = lj_vm_cpcall(L, NULL, &ls, cpparser); |
59 | lj_lex_cleanup(L, &ls); | 59 | lj_lex_cleanup(L, &ls); |
60 | lj_gc_check(L); | 60 | lj_gc_check(L); |
@@ -159,7 +159,7 @@ LUALIB_API int luaL_loadstring(lua_State *L, const char *s) | |||
159 | LUA_API int lua_dump(lua_State *L, lua_Writer writer, void *data) | 159 | LUA_API int lua_dump(lua_State *L, lua_Writer writer, void *data) |
160 | { | 160 | { |
161 | cTValue *o = L->top-1; | 161 | cTValue *o = L->top-1; |
162 | api_check(L, L->top > L->base); | 162 | lj_checkapi(L->top > L->base, "top slot empty"); |
163 | if (tvisfunc(o) && isluafunc(funcV(o))) | 163 | if (tvisfunc(o) && isluafunc(funcV(o))) |
164 | return lj_bcwrite(L, funcproto(funcV(o)), writer, data, 0); | 164 | return lj_bcwrite(L, funcproto(funcV(o)), writer, data, 0); |
165 | else | 165 | else |