Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Replace call to luaL_typerror with a custom error message
The function luaL_typerror was removed from public API in Lua 5.2. This
commit replaces it with calls to luaL_argerror and a custom error
message.
  • Loading branch information
ittner committed Nov 17, 2010
1 parent fc22d5b commit e394f70
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion luaiconv.c
Expand Up @@ -81,7 +81,8 @@ static iconv_t get_iconv_t(lua_State *L, int i) {
luaL_error(L, "attempt to use an invalid " ICONV_TYPENAME);
return cd;
}
luaL_typerror(L, i, ICONV_TYPENAME);
luaL_argerror(L, i, lua_pushfstring(L, ICONV_TYPENAME " expected, got %s",
luaL_typename(L, i)));
return NULL;
}

Expand Down

0 comments on commit e394f70

Please sign in to comment.