diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-11-10 15:38:10 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-11-10 15:38:10 -0200 |
commit | e885b91326986f1b5a341e9ff1444c4f46c6241a (patch) | |
tree | e3168da8b68a1dfbd91fdc4d6da095868f1ea658 | |
parent | fa1f72437858dfc1e756afd7f544b70c66cc3dd5 (diff) | |
download | lua-e885b91326986f1b5a341e9ff1444c4f46c6241a.tar.gz lua-e885b91326986f1b5a341e9ff1444c4f46c6241a.tar.bz2 lua-e885b91326986f1b5a341e9ff1444c4f46c6241a.zip |
'luaL_typeerror' deprecated
-rw-r--r-- | lauxlib.c | 8 | ||||
-rw-r--r-- | lauxlib.h | 3 | ||||
-rw-r--r-- | luaconf.h | 5 |
3 files changed, 6 insertions, 10 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.c,v 1.224 2010/10/29 12:52:21 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.225 2010/11/09 11:04:15 roberto Exp roberto $ |
3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -168,7 +168,7 @@ LUALIB_API int luaL_argerror (lua_State *L, int narg, const char *extramsg) { | |||
168 | } | 168 | } |
169 | 169 | ||
170 | 170 | ||
171 | LUALIB_API int luaL_typeerror (lua_State *L, int narg, const char *tname) { | 171 | static int typeerror (lua_State *L, int narg, const char *tname) { |
172 | const char *msg = lua_pushfstring(L, "%s expected, got %s", | 172 | const char *msg = lua_pushfstring(L, "%s expected, got %s", |
173 | tname, luaL_typename(L, narg)); | 173 | tname, luaL_typename(L, narg)); |
174 | return luaL_argerror(L, narg, msg); | 174 | return luaL_argerror(L, narg, msg); |
@@ -176,7 +176,7 @@ LUALIB_API int luaL_typeerror (lua_State *L, int narg, const char *tname) { | |||
176 | 176 | ||
177 | 177 | ||
178 | static void tag_error (lua_State *L, int narg, int tag) { | 178 | static void tag_error (lua_State *L, int narg, int tag) { |
179 | luaL_typeerror(L, narg, lua_typename(L, tag)); | 179 | typeerror(L, narg, lua_typename(L, tag)); |
180 | } | 180 | } |
181 | 181 | ||
182 | 182 | ||
@@ -241,7 +241,7 @@ LUALIB_API void *luaL_testudata (lua_State *L, int ud, const char *tname) { | |||
241 | 241 | ||
242 | LUALIB_API void *luaL_checkudata (lua_State *L, int ud, const char *tname) { | 242 | LUALIB_API void *luaL_checkudata (lua_State *L, int ud, const char *tname) { |
243 | void *p = luaL_testudata(L, ud, tname); | 243 | void *p = luaL_testudata(L, ud, tname); |
244 | if (p == NULL) luaL_typeerror(L, ud, tname); | 244 | if (p == NULL) typeerror(L, ud, tname); |
245 | return p; | 245 | return p; |
246 | } | 246 | } |
247 | 247 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.h,v 1.108 2010/07/02 11:38:13 roberto Exp roberto $ | 2 | ** $Id: lauxlib.h,v 1.109 2010/10/25 20:31:11 roberto Exp roberto $ |
3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -32,7 +32,6 @@ LUALIB_API void (luaL_checkversion_) (lua_State *L, lua_Number ver); | |||
32 | LUALIB_API int (luaL_getmetafield) (lua_State *L, int obj, const char *e); | 32 | LUALIB_API int (luaL_getmetafield) (lua_State *L, int obj, const char *e); |
33 | LUALIB_API int (luaL_callmeta) (lua_State *L, int obj, const char *e); | 33 | LUALIB_API int (luaL_callmeta) (lua_State *L, int obj, const char *e); |
34 | LUALIB_API const char *(luaL_tolstring) (lua_State *L, int idx, size_t *len); | 34 | LUALIB_API const char *(luaL_tolstring) (lua_State *L, int idx, size_t *len); |
35 | LUALIB_API int (luaL_typeerror) (lua_State *L, int narg, const char *tname); | ||
36 | LUALIB_API int (luaL_argerror) (lua_State *L, int numarg, const char *extramsg); | 35 | LUALIB_API int (luaL_argerror) (lua_State *L, int numarg, const char *extramsg); |
37 | LUALIB_API const char *(luaL_checklstring) (lua_State *L, int numArg, | 36 | LUALIB_API const char *(luaL_checklstring) (lua_State *L, int numArg, |
38 | size_t *l); | 37 | size_t *l); |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: luaconf.h,v 1.148 2010/10/29 17:52:46 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.149 2010/11/03 15:16:17 roberto Exp roberto $ |
3 | ** Configuration file for Lua | 3 | ** Configuration file for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -278,9 +278,6 @@ | |||
278 | #define lua_equal(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPEQ) | 278 | #define lua_equal(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPEQ) |
279 | #define lua_lessthan(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPLT) | 279 | #define lua_lessthan(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPLT) |
280 | 280 | ||
281 | /* compatibility with previous wrong spelling */ | ||
282 | #define luaL_typerror luaL_typeerror | ||
283 | |||
284 | /* | 281 | /* |
285 | @@ LUA_COMPAT_MODULE controls compatibility with previous | 282 | @@ LUA_COMPAT_MODULE controls compatibility with previous |
286 | ** module functions 'module' (Lua) and 'luaL_register' (C). | 283 | ** module functions 'module' (Lua) and 'luaL_register' (C). |