aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-02-13 17:39:34 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-02-13 17:39:34 -0200
commit547e47649fa086e49c146464a2d4a33de713d4b7 (patch)
tree934f65dbc061d3f738324046966b00327262ab15
parent41dd32e18ecbb298437c124cbab60de1f90babbb (diff)
downloadlua-547e47649fa086e49c146464a2d4a33de713d4b7.tar.gz
lua-547e47649fa086e49c146464a2d4a33de713d4b7.tar.bz2
lua-547e47649fa086e49c146464a2d4a33de713d4b7.zip
'luaL_typeerror' spelled right
-rw-r--r--lauxlib.c8
-rw-r--r--lauxlib.h8
2 files changed, 10 insertions, 6 deletions
diff --git a/lauxlib.c b/lauxlib.c
index c716c0db..0e0167e9 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lauxlib.c,v 1.178 2008/06/13 18:45:35 roberto Exp roberto $ 2** $Id: lauxlib.c,v 1.179 2008/07/03 14:21:41 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*/
@@ -52,7 +52,7 @@ LUALIB_API int luaL_argerror (lua_State *L, int narg, const char *extramsg) {
52} 52}
53 53
54 54
55LUALIB_API int luaL_typerror (lua_State *L, int narg, const char *tname) { 55LUALIB_API int luaL_typeerror (lua_State *L, int narg, const char *tname) {
56 const char *msg = lua_pushfstring(L, "%s expected, got %s", 56 const char *msg = lua_pushfstring(L, "%s expected, got %s",
57 tname, luaL_typename(L, narg)); 57 tname, luaL_typename(L, narg));
58 return luaL_argerror(L, narg, msg); 58 return luaL_argerror(L, narg, msg);
@@ -60,7 +60,7 @@ LUALIB_API int luaL_typerror (lua_State *L, int narg, const char *tname) {
60 60
61 61
62static void tag_error (lua_State *L, int narg, int tag) { 62static void tag_error (lua_State *L, int narg, int tag) {
63 luaL_typerror(L, narg, lua_typename(L, tag)); 63 luaL_typeerror(L, narg, lua_typename(L, tag));
64} 64}
65 65
66 66
@@ -176,7 +176,7 @@ LUALIB_API void *luaL_testudata (lua_State *L, int ud, const char *tname) {
176 176
177LUALIB_API void *luaL_checkudata (lua_State *L, int ud, const char *tname) { 177LUALIB_API void *luaL_checkudata (lua_State *L, int ud, const char *tname) {
178 void *p = luaL_testudata(L, ud, tname); 178 void *p = luaL_testudata(L, ud, tname);
179 if (p == NULL) luaL_typerror(L, ud, tname); 179 if (p == NULL) luaL_typeerror(L, ud, tname);
180 return p; 180 return p;
181} 181}
182 182
diff --git a/lauxlib.h b/lauxlib.h
index 34172b9a..819e4d27 100644
--- a/lauxlib.h
+++ b/lauxlib.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lauxlib.h,v 1.93 2007/06/22 15:39:34 roberto Exp roberto $ 2** $Id: lauxlib.h,v 1.94 2008/01/03 17:07:59 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*/
@@ -34,7 +34,7 @@ LUALIB_API void (luaL_register) (lua_State *L, const char *libname,
34LUALIB_API int (luaL_getmetafield) (lua_State *L, int obj, const char *e); 34LUALIB_API int (luaL_getmetafield) (lua_State *L, int obj, const char *e);
35LUALIB_API int (luaL_callmeta) (lua_State *L, int obj, const char *e); 35LUALIB_API int (luaL_callmeta) (lua_State *L, int obj, const char *e);
36LUALIB_API const char *luaL_tolstring (lua_State *L, int idx, size_t *len); 36LUALIB_API const char *luaL_tolstring (lua_State *L, int idx, size_t *len);
37LUALIB_API int (luaL_typerror) (lua_State *L, int narg, const char *tname); 37LUALIB_API int (luaL_typeerror) (lua_State *L, int narg, const char *tname);
38LUALIB_API int (luaL_argerror) (lua_State *L, int numarg, const char *extramsg); 38LUALIB_API int (luaL_argerror) (lua_State *L, int numarg, const char *extramsg);
39LUALIB_API const char *(luaL_checklstring) (lua_State *L, int numArg, 39LUALIB_API const char *(luaL_checklstring) (lua_State *L, int numArg,
40 size_t *l); 40 size_t *l);
@@ -161,6 +161,10 @@ LUALIB_API void (luaL_pushresult) (luaL_Buffer *B);
161 161
162#define luaL_reg luaL_Reg 162#define luaL_reg luaL_Reg
163 163
164
165/* compatibility with previous wrong spelling */
166#define luaL_typerror luaL_typeerror
167
164#endif 168#endif
165 169
166 170