lua-users home
lua-l archive

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


On Wed, 30 Nov 2011 16:40:28 -0200, Roberto Ierusalimschy wrote:
Probably, because in lobject.c,
--
int luaO_int2fb (lu_int32 x) {
--
should be:
--
int luaO_int2fb (unsigned int x) {
--
so that it matches the declaration in lobject.h.

Sure. Does Lua compile OK after that correction?

Yes, it does. And it even runs on my 80186 based IP camera then, btw. ;-)

I still wonder about the signed/unsigned asymmetry, though.

What "asymmetry"? Do you mean the parameter being unsigned?

luaO_int2fb gets an "unsigned int" and returns an "int". luaO_fb2int has "converts back" as comment, but returns an "int" where returning an "unsigned int" would seem more "symmetrical" to me. This is probably nitpicking, but it just catched my eye. It's probably not worth any discussion...

Regards,
  Johann