lua-users home
lua-l archive

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


> > I then changed luaL_checktype to call lua_tag instead of lua_rawtag (file
> > lauxlib.c line 64) and now everything works just fine.
> >
> > The question is: am I doing something wrong? Or it's a bug in luaL_checktype
> > or in lua_rawtag?
>
> It's a bug in luaL_checktype; it should use lua_tag.
>
> -- Roberto

My mistake. Actually, it is not a bug, but a name mismatch. Until 4.0, we
used the term "type" to refer to "basic types"; only in 4.1 we changed it
to "basic types and user-defined types". So, luaL_checktype should be (and
will be) renamed to luaL_checkbasictype or luaL_checkrawtype. If we change
lua_rawtag to lua_tag there, we will break several other functions (next,
weakmode, rawset, etc.).

Sorry about that,

-- Roberto