aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lauxlib.c b/lauxlib.c
index fd4acbd1..769586b6 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -185,7 +185,7 @@ LUALIB_API int luaL_argerror (lua_State *L, int arg, const char *extramsg) {
185} 185}
186 186
187 187
188static int typeerror (lua_State *L, int arg, const char *tname) { 188int luaL_typeerror (lua_State *L, int arg, const char *tname) {
189 const char *msg; 189 const char *msg;
190 const char *typearg; /* name for the type of the actual argument */ 190 const char *typearg; /* name for the type of the actual argument */
191 if (luaL_getmetafield(L, arg, "__name") == LUA_TSTRING) 191 if (luaL_getmetafield(L, arg, "__name") == LUA_TSTRING)
@@ -200,7 +200,7 @@ static int typeerror (lua_State *L, int arg, const char *tname) {
200 200
201 201
202static void tag_error (lua_State *L, int arg, int tag) { 202static void tag_error (lua_State *L, int arg, int tag) {
203 typeerror(L, arg, lua_typename(L, tag)); 203 luaL_typeerror(L, arg, lua_typename(L, tag));
204} 204}
205 205
206 206
@@ -339,7 +339,7 @@ LUALIB_API void *luaL_testudata (lua_State *L, int ud, const char *tname) {
339 339
340LUALIB_API void *luaL_checkudata (lua_State *L, int ud, const char *tname) { 340LUALIB_API void *luaL_checkudata (lua_State *L, int ud, const char *tname) {
341 void *p = luaL_testudata(L, ud, tname); 341 void *p = luaL_testudata(L, ud, tname);
342 if (p == NULL) typeerror(L, ud, tname); 342 luaL_argexpected(L, p != NULL, ud, tname);
343 return p; 343 return p;
344} 344}
345 345