[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua_rawtag() vs. lua_tag()
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 8 Aug 2001 14:47:44 -0300
>What's the difference between the lua_rawtag() and lua_tag() functions in
>4.1-alpha?
In Lua, userdata and tables can have user-defined tags. In 4.1, these are
now (finally!) called types. Types are identified in C by their tags and in
Lua by their names (and also tag, but tags will no get much use from now on
in Lua, only in C).
So, lua_tag returns the tag of a value,, which may be a user-define tag.
lua_rawtag is but returns the tag of the basic (raw) type of a value, that is
either userdata or tag. These raw values are defined in lua.h.
--lhf