diff options
Diffstat (limited to 'src/lib_aux.c')
-rw-r--r-- | src/lib_aux.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib_aux.c b/src/lib_aux.c index 419650a9..25a3b5ce 100644 --- a/src/lib_aux.c +++ b/src/lib_aux.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include "lj_obj.h" | 19 | #include "lj_obj.h" |
20 | #include "lj_err.h" | 20 | #include "lj_err.h" |
21 | #include "lj_state.h" | ||
21 | #include "lj_lib.h" | 22 | #include "lj_lib.h" |
22 | 23 | ||
23 | /* -- Module registration ------------------------------------------------- */ | 24 | /* -- Module registration ------------------------------------------------- */ |
@@ -349,8 +350,21 @@ static int panic(lua_State *L) | |||
349 | 350 | ||
350 | LUALIB_API lua_State *luaL_newstate(void) | 351 | LUALIB_API lua_State *luaL_newstate(void) |
351 | { | 352 | { |
353 | #if LJ_64 | ||
354 | lua_State *L = lj_state_newstate(mem_alloc, mem_create()); | ||
355 | #else | ||
352 | lua_State *L = lua_newstate(mem_alloc, mem_create()); | 356 | lua_State *L = lua_newstate(mem_alloc, mem_create()); |
357 | #endif | ||
353 | if (L) G(L)->panic = panic; | 358 | if (L) G(L)->panic = panic; |
354 | return L; | 359 | return L; |
355 | } | 360 | } |
356 | 361 | ||
362 | #if LJ_64 | ||
363 | LUA_API lua_State *lua_newstate(lua_Alloc f, void *ud) | ||
364 | { | ||
365 | UNUSED(f); UNUSED(ud); | ||
366 | fprintf(stderr, "Must use luaL_newstate() for 64 bit target\n"); | ||
367 | return NULL; | ||
368 | } | ||
369 | #endif | ||
370 | |||