lua-users home
lua-l archive

RE: Lua type names and the __type metafield

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


> On Behalf Of Geoff Leyland
> Sent: maandag 8 oktober 2012 1:33
> 
> On 8/10/2012, at 11:40 AM, Rob Hoelz <rob@hoelz.ro> wrote:
> 
> > Hi list,
> >
> > I was thinking about this when I was out and about today: type() only
> > provides "raw" type information...
> 
> You probably already know, but this also came up in May: http://lua-
> users.org/lists/lua-l/2012-05/msg00684.html
> 
I think it was then that I wrote the typex library (as an example to a
template), see
https://github.com/Tieske/Lua_library_template/tree/master/udtype_example 
Typex traverses the registry to find the name of the metatable and returns
that as a second argument. The results of the registry traversal are then
cached to speed-up next searches.
Thijs

AltStyle によって変換されたページ (->オリジナル) /