diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-12-06 18:42:58 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-12-06 18:42:58 -0200 |
commit | 460968353f602af5986e706ff776c80455f1f8fa (patch) | |
tree | fa881515ddea0d2447f802db17fa46a636a2df6e /linit.c | |
parent | 32a1f54b9aba958429dd3fd249b62199071ed8aa (diff) | |
download | lua-460968353f602af5986e706ff776c80455f1f8fa.tar.gz lua-460968353f602af5986e706ff776c80455f1f8fa.tar.bz2 lua-460968353f602af5986e706ff776c80455f1f8fa.zip |
in test mode, debug library is not predefined (to allow testing
'preloadedlibs')
Diffstat (limited to 'linit.c')
-rw-r--r-- | linit.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: linit.c,v 1.34 2014/05/15 19:28:34 roberto Exp roberto $ | 2 | ** $Id: linit.c,v 1.35 2014/11/02 19:19:04 roberto Exp roberto $ |
3 | ** Initialization of libraries for lua.c and other clients | 3 | ** Initialization of libraries for lua.c and other clients |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -37,8 +37,10 @@ static const luaL_Reg loadedlibs[] = { | |||
37 | {LUA_OSLIBNAME, luaopen_os}, | 37 | {LUA_OSLIBNAME, luaopen_os}, |
38 | {LUA_STRLIBNAME, luaopen_string}, | 38 | {LUA_STRLIBNAME, luaopen_string}, |
39 | {LUA_MATHLIBNAME, luaopen_math}, | 39 | {LUA_MATHLIBNAME, luaopen_math}, |
40 | {LUA_DBLIBNAME, luaopen_debug}, | ||
41 | {LUA_UTF8LIBNAME, luaopen_utf8}, | 40 | {LUA_UTF8LIBNAME, luaopen_utf8}, |
41 | #if !defined(LUA_NODEBUGLIB) | ||
42 | {LUA_DBLIBNAME, luaopen_debug}, | ||
43 | #endif | ||
42 | #if defined(LUA_COMPAT_BITLIB) | 44 | #if defined(LUA_COMPAT_BITLIB) |
43 | {LUA_BITLIBNAME, luaopen_bit32}, | 45 | {LUA_BITLIBNAME, luaopen_bit32}, |
44 | #endif | 46 | #endif |
@@ -50,6 +52,9 @@ static const luaL_Reg loadedlibs[] = { | |||
50 | ** these libs are preloaded and must be required before used | 52 | ** these libs are preloaded and must be required before used |
51 | */ | 53 | */ |
52 | static const luaL_Reg preloadedlibs[] = { | 54 | static const luaL_Reg preloadedlibs[] = { |
55 | #if defined(LUA_NODEBUGLIB) | ||
56 | {LUA_DBLIBNAME, luaopen_debug}, | ||
57 | #endif | ||
53 | {NULL, NULL} | 58 | {NULL, NULL} |
54 | }; | 59 | }; |
55 | 60 | ||