lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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