lua-users home
lua-l archive

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


>>>>> "Roberto" == Roberto Ierusalimschy <roberto@inf.puc-rio.br> writes:

 >> I am wondering about the unreported issue of lua_rawlen returning
 >> size_t while luaH_getn used by it returns lua_Unsigned (this is also
 >> the only warning when compiling with /W3). This was fixed in 5.4.0
 >> but will it be so for 5.3.X?

 Roberto> Could you share with us what is this unreported issue? What is
 Roberto> exactly the bug?

I guess it's the fact that size_t might (e.g. on 32-bit systems) be a
smaller type than lua_Unsigned, so the compiler might warn about the
truncation. But the value can't overflow a size_t, so there's no real
issue here other than the compiler warning.

In 5.4 lua_rawlen seems to return lua_Unsigned rather than size_t.
Obviously that can't be changed in 5.3.x.

-- 
Andrew.