summaryrefslogtreecommitdiff
path: root/linit.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-12-06 18:42:58 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-12-06 18:42:58 -0200
commit460968353f602af5986e706ff776c80455f1f8fa (patch)
treefa881515ddea0d2447f802db17fa46a636a2df6e /linit.c
parent32a1f54b9aba958429dd3fd249b62199071ed8aa (diff)
downloadlua-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.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/linit.c b/linit.c
index 96378037..304c8093 100644
--- a/linit.c
+++ b/linit.c
@@ -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*/
52static const luaL_Reg preloadedlibs[] = { 54static 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