[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: luaL_checkudata with negative index
- From: "Jérôme VUARAND" <jerome.vuarand@...>
- Date: Sun, 9 Apr 2006 13:45:04 -0400
2006/4/9, Mildred <ml.mildred593@online.fr>:
> Isn't it a little confusing for the user to get an error mesage like
> "parameter #-1 not valid, userdata expected, got ..." ?
It is. It took me a while to understand why it was not working. But
instead of cutting the feature a little adjustment of the message
would do the trick. Maybe an alternative version of checkudata with
another argument being the message to display in case of error would
be even better. Maybe we can just see this patch as a compability fix
with Lua 5.0.2 for people using checkudata that way. It doesn't change
the new way lauxlib manages metatable, it only reorders some
instructions.
Doub.