diff options
Diffstat (limited to 'lauxlib.c')
-rw-r--r-- | lauxlib.c | 8 |
1 files changed, 4 insertions, 4 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 | ||