aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-11-10 15:38:10 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-11-10 15:38:10 -0200
commite885b91326986f1b5a341e9ff1444c4f46c6241a (patch)
treee3168da8b68a1dfbd91fdc4d6da095868f1ea658
parentfa1f72437858dfc1e756afd7f544b70c66cc3dd5 (diff)
downloadlua-e885b91326986f1b5a341e9ff1444c4f46c6241a.tar.gz
lua-e885b91326986f1b5a341e9ff1444c4f46c6241a.tar.bz2
lua-e885b91326986f1b5a341e9ff1444c4f46c6241a.zip
'luaL_typeerror' deprecated
-rw-r--r--lauxlib.c8
-rw-r--r--lauxlib.h3
-rw-r--r--luaconf.h5
3 files changed, 6 insertions, 10 deletions
diff --git a/lauxlib.c b/lauxlib.c
index 9391ae28..9dbf5519 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -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
171LUALIB_API int luaL_typeerror (lua_State *L, int narg, const char *tname) { 171static 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
178static void tag_error (lua_State *L, int narg, int tag) { 178static 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
242LUALIB_API void *luaL_checkudata (lua_State *L, int ud, const char *tname) { 242LUALIB_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
diff --git a/lauxlib.h b/lauxlib.h
index 88d35a11..c39b033b 100644
--- a/lauxlib.h
+++ b/lauxlib.h
@@ -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);
32LUALIB_API int (luaL_getmetafield) (lua_State *L, int obj, const char *e); 32LUALIB_API int (luaL_getmetafield) (lua_State *L, int obj, const char *e);
33LUALIB_API int (luaL_callmeta) (lua_State *L, int obj, const char *e); 33LUALIB_API int (luaL_callmeta) (lua_State *L, int obj, const char *e);
34LUALIB_API const char *(luaL_tolstring) (lua_State *L, int idx, size_t *len); 34LUALIB_API const char *(luaL_tolstring) (lua_State *L, int idx, size_t *len);
35LUALIB_API int (luaL_typeerror) (lua_State *L, int narg, const char *tname);
36LUALIB_API int (luaL_argerror) (lua_State *L, int numarg, const char *extramsg); 35LUALIB_API int (luaL_argerror) (lua_State *L, int numarg, const char *extramsg);
37LUALIB_API const char *(luaL_checklstring) (lua_State *L, int numArg, 36LUALIB_API const char *(luaL_checklstring) (lua_State *L, int numArg,
38 size_t *l); 37 size_t *l);
diff --git a/luaconf.h b/luaconf.h
index 3305434b..a3a820c1 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -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).