removed and deprecated functions really removed from the code base
This commit is contained in:
21
lbaselib.c
21
lbaselib.c
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lbaselib.c,v 1.262 2011/06/16 14:12:24 roberto Exp roberto $
|
** $Id: lbaselib.c,v 1.263 2011/07/02 15:56:43 roberto Exp roberto $
|
||||||
** Basic library
|
** Basic library
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@@ -120,11 +120,6 @@ static int luaB_setmetatable (lua_State *L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int luaB_removed (lua_State *L) {
|
|
||||||
return luaL_error(L, "removed function");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int luaB_rawequal (lua_State *L) {
|
static int luaB_rawequal (lua_State *L) {
|
||||||
luaL_checkany(L, 1);
|
luaL_checkany(L, 1);
|
||||||
luaL_checkany(L, 2);
|
luaL_checkany(L, 2);
|
||||||
@@ -355,14 +350,6 @@ static int luaB_load (lua_State *L) {
|
|||||||
return load_aux(L, status);
|
return load_aux(L, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if defined(LUA_COMPAT_LOADSTRING)
|
|
||||||
#define luaB_loadstring luaB_load
|
|
||||||
#else
|
|
||||||
#define luaB_loadstring luaB_removed
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* }====================================================== */
|
/* }====================================================== */
|
||||||
|
|
||||||
|
|
||||||
@@ -454,12 +441,13 @@ static const luaL_Reg base_funcs[] = {
|
|||||||
{"collectgarbage", luaB_collectgarbage},
|
{"collectgarbage", luaB_collectgarbage},
|
||||||
{"dofile", luaB_dofile},
|
{"dofile", luaB_dofile},
|
||||||
{"error", luaB_error},
|
{"error", luaB_error},
|
||||||
{"getfenv", luaB_removed},
|
|
||||||
{"getmetatable", luaB_getmetatable},
|
{"getmetatable", luaB_getmetatable},
|
||||||
{"ipairs", luaB_ipairs},
|
{"ipairs", luaB_ipairs},
|
||||||
{"loadfile", luaB_loadfile},
|
{"loadfile", luaB_loadfile},
|
||||||
{"load", luaB_load},
|
{"load", luaB_load},
|
||||||
{"loadstring", luaB_loadstring},
|
#if defined(LUA_COMPAT_LOADSTRING)
|
||||||
|
{"loadstring", luaB_load},
|
||||||
|
#endif
|
||||||
{"next", luaB_next},
|
{"next", luaB_next},
|
||||||
{"pairs", luaB_pairs},
|
{"pairs", luaB_pairs},
|
||||||
{"pcall", luaB_pcall},
|
{"pcall", luaB_pcall},
|
||||||
@@ -469,7 +457,6 @@ static const luaL_Reg base_funcs[] = {
|
|||||||
{"rawget", luaB_rawget},
|
{"rawget", luaB_rawget},
|
||||||
{"rawset", luaB_rawset},
|
{"rawset", luaB_rawset},
|
||||||
{"select", luaB_select},
|
{"select", luaB_select},
|
||||||
{"setfenv", luaB_removed},
|
|
||||||
{"setmetatable", luaB_setmetatable},
|
{"setmetatable", luaB_setmetatable},
|
||||||
{"tonumber", luaB_tonumber},
|
{"tonumber", luaB_tonumber},
|
||||||
{"tostring", luaB_tostring},
|
{"tostring", luaB_tostring},
|
||||||
|
|||||||
11
lmathlib.c
11
lmathlib.c
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lmathlib.c,v 1.78 2010/11/12 15:47:34 roberto Exp roberto $
|
** $Id: lmathlib.c,v 1.79 2010/11/18 18:38:27 roberto Exp roberto $
|
||||||
** Standard mathematical library
|
** Standard mathematical library
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@@ -134,15 +134,12 @@ static int math_log (lua_State *L) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(LUA_COMPAT_LOG10)
|
||||||
static int math_log10 (lua_State *L) {
|
static int math_log10 (lua_State *L) {
|
||||||
#if !defined(LUA_COMPAT_LOG10)
|
|
||||||
return luaL_error(L, "function " LUA_QL("log10")
|
|
||||||
" is deprecated; use log(x, 10) instead");
|
|
||||||
#else
|
|
||||||
lua_pushnumber(L, l_tg(log10)(luaL_checknumber(L, 1)));
|
lua_pushnumber(L, l_tg(log10)(luaL_checknumber(L, 1)));
|
||||||
return 1;
|
return 1;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int math_exp (lua_State *L) {
|
static int math_exp (lua_State *L) {
|
||||||
lua_pushnumber(L, l_tg(exp)(luaL_checknumber(L, 1)));
|
lua_pushnumber(L, l_tg(exp)(luaL_checknumber(L, 1)));
|
||||||
@@ -252,7 +249,9 @@ static const luaL_Reg mathlib[] = {
|
|||||||
{"fmod", math_fmod},
|
{"fmod", math_fmod},
|
||||||
{"frexp", math_frexp},
|
{"frexp", math_frexp},
|
||||||
{"ldexp", math_ldexp},
|
{"ldexp", math_ldexp},
|
||||||
|
#if defined(LUA_COMPAT_LOG10)
|
||||||
{"log10", math_log10},
|
{"log10", math_log10},
|
||||||
|
#endif
|
||||||
{"log", math_log},
|
{"log", math_log},
|
||||||
{"max", math_max},
|
{"max", math_max},
|
||||||
{"min", math_min},
|
{"min", math_min},
|
||||||
|
|||||||
17
loadlib.c
17
loadlib.c
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: loadlib.c,v 1.98 2011/04/08 19:17:36 roberto Exp roberto $
|
** $Id: loadlib.c,v 1.99 2011/06/28 17:13:28 roberto Exp roberto $
|
||||||
** Dynamic library loader for Lua
|
** Dynamic library loader for Lua
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
**
|
**
|
||||||
@@ -569,17 +569,6 @@ static int ll_seeall (lua_State *L) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
static int ll_seeall (lua_State *L) {
|
|
||||||
return luaL_error(L, "deprecated function");
|
|
||||||
}
|
|
||||||
|
|
||||||
static int ll_module (lua_State *L) {
|
|
||||||
return luaL_error(L, "deprecated function");
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/* }====================================================== */
|
/* }====================================================== */
|
||||||
|
|
||||||
@@ -610,13 +599,17 @@ static void setpath (lua_State *L, const char *fieldname, const char *envname1,
|
|||||||
static const luaL_Reg pk_funcs[] = {
|
static const luaL_Reg pk_funcs[] = {
|
||||||
{"loadlib", ll_loadlib},
|
{"loadlib", ll_loadlib},
|
||||||
{"searchpath", ll_searchpath},
|
{"searchpath", ll_searchpath},
|
||||||
|
#if defined(LUA_COMPAT_MODULE)
|
||||||
{"seeall", ll_seeall},
|
{"seeall", ll_seeall},
|
||||||
|
#endif
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static const luaL_Reg ll_funcs[] = {
|
static const luaL_Reg ll_funcs[] = {
|
||||||
|
#if defined(LUA_COMPAT_MODULE)
|
||||||
{"module", ll_module},
|
{"module", ll_module},
|
||||||
|
#endif
|
||||||
{"require", ll_require},
|
{"require", ll_require},
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|||||||
14
ltablib.c
14
ltablib.c
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: ltablib.c,v 1.59 2010/12/17 12:15:34 roberto Exp roberto $
|
** $Id: ltablib.c,v 1.60 2011/07/02 16:01:44 roberto Exp roberto $
|
||||||
** Library for Table Manipulation
|
** Library for Table Manipulation
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@@ -20,11 +20,6 @@
|
|||||||
(luaL_checktype(L, n, LUA_TTABLE), luaL_len(L, n))
|
(luaL_checktype(L, n, LUA_TTABLE), luaL_len(L, n))
|
||||||
|
|
||||||
|
|
||||||
static int removedfunc (lua_State *L) {
|
|
||||||
return luaL_error(L, "removed function");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(LUA_COMPAT_MAXN)
|
#if defined(LUA_COMPAT_MAXN)
|
||||||
static int maxn (lua_State *L) {
|
static int maxn (lua_State *L) {
|
||||||
lua_Number max = 0;
|
lua_Number max = 0;
|
||||||
@@ -40,8 +35,6 @@ static int maxn (lua_State *L) {
|
|||||||
lua_pushnumber(L, max);
|
lua_pushnumber(L, max);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
#define maxn removedfunc
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -267,10 +260,9 @@ static int sort (lua_State *L) {
|
|||||||
|
|
||||||
static const luaL_Reg tab_funcs[] = {
|
static const luaL_Reg tab_funcs[] = {
|
||||||
{"concat", tconcat},
|
{"concat", tconcat},
|
||||||
{"foreach", removedfunc},
|
#if defined(LUA_COMPAT_MAXN)
|
||||||
{"foreachi", removedfunc},
|
|
||||||
{"getn", removedfunc},
|
|
||||||
{"maxn", maxn},
|
{"maxn", maxn},
|
||||||
|
#endif
|
||||||
{"insert", tinsert},
|
{"insert", tinsert},
|
||||||
{"pack", pack},
|
{"pack", pack},
|
||||||
{"unpack", unpack},
|
{"unpack", unpack},
|
||||||
|
|||||||
Reference in New Issue
Block a user