lua-users home
lua-l archive

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


On Mon, Feb 26, 2007 at 04:33:07PM -0800, Wesley Smith wrote:
> Is there a way from C that I can Null out a boxed pointer that has a
> reference to it as a userdata so that when I do lua_touserdata(L, -1)
> I will gett NULL?  Or is this horrible design?

See lua's liolib.c, the function aux_close(), it does this to mark a
file as closed.

Sam