diff options
Diffstat (limited to 'lbuiltin.c')
| -rw-r--r-- | lbuiltin.c | 18 |
1 files changed, 9 insertions, 9 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lbuiltin.c,v 1.119 2000/08/09 19:16:57 roberto Exp roberto $ | 2 | ** $Id: lbuiltin.c,v 1.120 2000/08/14 19:10:14 roberto Exp roberto $ |
| 3 | ** Built-in functions | 3 | ** Built-in functions |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -401,7 +401,7 @@ void luaB_getn (lua_State *L) { | |||
| 401 | } | 401 | } |
| 402 | 402 | ||
| 403 | 403 | ||
| 404 | /* auxiliar function */ | 404 | /* auxiliary function */ |
| 405 | static void t_move (lua_State *L, Hash *t, int from, int to) { | 405 | static void t_move (lua_State *L, Hash *t, int from, int to) { |
| 406 | TObject *p = luaH_setint(L, t, to); /* may change following `get' */ | 406 | TObject *p = luaH_setint(L, t, to); /* may change following `get' */ |
| 407 | *p = *luaH_getnum(t, from); | 407 | *p = *luaH_getnum(t, from); |
| @@ -613,16 +613,16 @@ static void deprecated_funcs (lua_State *L) { | |||
| 613 | #else | 613 | #else |
| 614 | 614 | ||
| 615 | /* | 615 | /* |
| 616 | ** gives an explicit error in any attempt to call an obsolet function | 616 | ** gives an explicit error in any attempt to call a deprecated function |
| 617 | */ | 617 | */ |
| 618 | static void obsolete_func (lua_State *L) { | 618 | static void deprecated_func (lua_State *L) { |
| 619 | luaL_verror(L, "function `%.20s' is obsolete", luaL_check_string(L, 1)); | 619 | luaL_verror(L, "function `%.20s' is deprecated", luaL_check_string(L, 1)); |
| 620 | } | 620 | } |
| 621 | 621 | ||
| 622 | 622 | ||
| 623 | #define num_deprecated 6 | 623 | #define num_deprecated 6 |
| 624 | 624 | ||
| 625 | static const char *const obsolete_names [num_deprecated] = { | 625 | static const char *const deprecated_names [num_deprecated] = { |
| 626 | "foreachvar", "nextvar", "rawgetglobal", | 626 | "foreachvar", "nextvar", "rawgetglobal", |
| 627 | "rawgettable", "rawsetglobal", "rawsettable" | 627 | "rawgettable", "rawsetglobal", "rawsettable" |
| 628 | }; | 628 | }; |
| @@ -631,9 +631,9 @@ static const char *const obsolete_names [num_deprecated] = { | |||
| 631 | static void deprecated_funcs (lua_State *L) { | 631 | static void deprecated_funcs (lua_State *L) { |
| 632 | int i; | 632 | int i; |
| 633 | for (i=0; i<num_deprecated; i++) { | 633 | for (i=0; i<num_deprecated; i++) { |
| 634 | lua_pushstring(L, obsolete_names[i]); | 634 | lua_pushstring(L, deprecated_names[i]); |
| 635 | lua_pushcclosure(L, obsolete_func, 1); | 635 | lua_pushcclosure(L, deprecated_func, 1); |
| 636 | lua_setglobal(L, obsolete_names[i]); | 636 | lua_setglobal(L, deprecated_names[i]); |
| 637 | } | 637 | } |
| 638 | } | 638 | } |
| 639 | 639 | ||
