Ver Fonte

'debug' library is loaded by default

Roberto Ierusalimschy há 14 anos atrás
pai
commit
8c21f463ed
2 ficheiros alterados com 7 adições e 18 exclusões
  1. 1 4
      linit.c
  2. 6 14
      luaconf.h

+ 1 - 4
linit.c

@@ -1,5 +1,5 @@
 /*
-** $Id: linit.c,v 1.28 2010/07/02 11:38:13 roberto Exp roberto $
+** $Id: linit.c,v 1.29 2010/10/25 14:32:36 roberto Exp roberto $
 ** Initialization of libraries for lua.c and other clients        
 ** See Copyright Notice in lua.h
 */
@@ -36,9 +36,7 @@ static const luaL_Reg loadedlibs[] = {
   {LUA_STRLIBNAME, luaopen_string},
   {LUA_BITLIBNAME, luaopen_bit32},
   {LUA_MATHLIBNAME, luaopen_math},
-#if defined(LUA_COMPAT_DEBUGLIB)
   {LUA_DBLIBNAME, luaopen_debug},
-#endif
   {NULL, NULL}
 };
 
@@ -47,7 +45,6 @@ static const luaL_Reg loadedlibs[] = {
 ** these libs are preloaded and must be required before used
 */
 static const luaL_Reg preloadedlibs[] = {
-  {LUA_DBLIBNAME, luaopen_debug},
   {NULL, NULL}
 };
 

+ 6 - 14
luaconf.h

@@ -1,5 +1,5 @@
 /*
-** $Id: luaconf.h,v 1.149 2010/11/03 15:16:17 roberto Exp roberto $
+** $Id: luaconf.h,v 1.150 2010/11/10 17:38:10 roberto Exp roberto $
 ** Configuration file for Lua
 ** See Copyright Notice in lua.h
 */
@@ -229,7 +229,7 @@
 ** You can define it to get all options, or change specific options
 ** to fit your specific needs.
 */
-#if defined(LUA_COMPAT_ALL)
+#if defined(LUA_COMPAT_ALL)	/* { */
 
 /*
 @@ LUA_COMPAT_UNPACK controls the presence of global 'unpack'.
@@ -238,8 +238,8 @@
 #define LUA_COMPAT_UNPACK
 
 /*
-@@ LUA_COMPAT_CPCALL controls the presence of macro 'lua_cpcall'.
-** You can call your C function directly (with light C functions)
+@@ macro 'lua_cpcall' emulates deprecated function lua_cpcall.
+** You can call your C function directly (with light C functions).
 */
 #define lua_cpcall(L,f,u)  \
 	(lua_pushcfunction(L, (f)), \
@@ -258,14 +258,6 @@
 */
 #define LUA_COMPAT_MAXN
 
-/*
-@@ LUA_COMPAT_DEBUGLIB controls compatibility with preloading
-** the debug library.
-** You should add 'require"debug"' everywhere you need the debug
-** library.
-*/
-#define LUA_COMPAT_DEBUGLIB
-
 /*
 @@ The following macros supply trivial compatibility for some
 ** changes in the API. The macros themselves document how to
@@ -275,7 +267,7 @@
 
 #define lua_objlen(L,i)		lua_rawlen(L, (i))
 
-#define lua_equal(L,idx1,idx2)	lua_compare(L,(idx1),(idx2),LUA_OPEQ)
+#define lua_equal(L,idx1,idx2)		lua_compare(L,(idx1),(idx2),LUA_OPEQ)
 #define lua_lessthan(L,idx1,idx2)	lua_compare(L,(idx1),(idx2),LUA_OPLT)
 
 /*
@@ -284,7 +276,7 @@
 */
 #define LUA_COMPAT_MODULE
 
-#endif  /* LUA_COMPAT_ALL */
+#endif				/* } */
 
 /* }================================================================== */