summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linit.c9
-rw-r--r--ltests.h5
2 files changed, 11 insertions, 3 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
diff --git a/ltests.h b/ltests.h
index 6a55e2db..0f9a4bc9 100644
--- a/ltests.h
+++ b/ltests.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.h,v 2.41 2014/11/24 14:56:56 roberto Exp roberto $ 2** $Id: ltests.h,v 2.42 2014/11/29 19:45:37 roberto Exp roberto $
3** Internal Header for Debugging of the Lua Implementation 3** Internal Header for Debugging of the Lua Implementation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -24,6 +24,9 @@
24#undef LUA_COMPAT_MODULE 24#undef LUA_COMPAT_MODULE
25 25
26 26
27/* test without preloding debug library */
28#define LUA_NODEBUGLIB
29
27#define LUA_DEBUG 30#define LUA_DEBUG
28 31
29 32