[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Is it normal that luaL_checkudata() makes my program to dye
- From: Sean Conner <sean@...>
- Date: Tue, 1 May 2018 17:56:38 -0400
It was thus said that the Great Laurent FAILLIE once stated:
> Hello,
>
> Reading example in https://www.lua.org/pil/28.2.html, I guessed that
> luaL_checkudata() only return a NULL pointer if the argument doesn't match
> an user data of the given type.
It raises an error if the item on the stack doesn't match. If you check
the manual, on the right hand side of the function prototype for
luaL_checkudata(), you should see a '[-0,+0,v]' which indicated it can throw
an error.
-spc