[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: luaL_getn bug(well sort of)
- From: "Bilyk, Alex" <ABilyk@...>
- Date: Fri, 4 Apr 2003 18:28:17 -0800
Well, in Lua 5 Beta I am using there is no function named luaL_getn. There is however a function aux_getn used internally by the table library. This function assumes the table always being at index 1. If this is what got promoted to luaL_getn, then I would agree with you on that such an assumption is a problem Lua 4 didn't have. Looks like an oversight that needs to be fixed unless this behavior is intentional.
AB
> -----Original Message-----
> From: jimmyp_gr [mailto:jimmyp@hal.csd.auth.gr]
> Sent: Friday, April 04, 2003 5:11 PM
> To: Multiple recipients of list
> Subject: Re: luaL_getn bug(well sort of)
>
>
> --- In lua-l@yahoogroups.com, "Bilyk, Alex" <ABilyk@m...> wrote:
> > I think in Lua 5 you are supposed to say
> >
> > local tbl = {}
> > local table_size = tbl : getn()
> >
> > In which case the table is always the first parameter.
> > Also, correct me if I am wrong Lua 5 Beta doesn't define luaL_getn
> but rather luaB_getn. I don't have the latest beta though.
> >
> > AB
> I think you misunderstood my post. I was talking about int
> luaL_getn(lua_State *L, int t) defined in the aux library for getting
> the size of a vector table from within C and not the lua version of
> getn with wich I have had no problems yet.
>
>
>