lua-users home
lua-l archive

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


> > Please tell us where are those places so we can correct them.
> [...]
> llimits.h
> lines 44, 46: changed type from int to long, since the comment says it
> might hold values that won't fit in 16 bits.

Actually the comment was wrong :) It is safe to use 16-bit ints there.


> lobject.c:62
> integer const larger than 16 bits makes my compiler complain (only warning,
> so it's no big deal) but it makes me wonder if the calculations may get wrong

The only problem is that the test is always false (and the compiler
is right about the warning). But the algorithm is ok.


Now, back to the bug:

> I tried the same example on linux, which gave the expected result:

Wich means we need to debug in your machine... Can you help with
the following tests?

- What happens if you write "test.func( self, idx )" instead of
the original "test:func( idx )"?

- What happens if you add one or more parameters to the function?

- What happens if you add one or more local variables to the function?

- Can you add the following code fragment in function luaF_getlocalname
(lfunc.c:126, just after "int i;")?

  for (i = 0; i<f->sizelocvars; i++)
    printf("%d: %s\n", i, getstr(f->locvars[i].varname));

What does it print (just before the error message)? (That function is
called to get a local name.)

-- Roberto