[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Request consideration for a new function : luaL_getfield
- From: Benoit Germain <bnt.germain@...>
- Date: Wed, 22 Jun 2011 08:35:18 +0200
2011/6/22 liam mail <liam.list@googlemail.com>:
>
>
> Similar to luaL_getmetafield.
>
> http://www.lua.org/manual/5.1/manual.html#luaL_getmetafield
>
This makes me think that maybe lua_[g|s]etuservaluefield(lua_State *L,
int obj) could be useful to manipulate fields from a userdata's
uservalue table without having to push it on the stack first. I omit
the const char *e parameter for the the function to use the top of the
stack as the index, just like lua_gettable() does.Bbut we already have
lua_getuservalue(), so one should find a different, yet appropriate,
name :-)
--
Benoit.