[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: utf-8 support in Lua 5.3.0
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 15 Apr 2014 15:18:21 -0300
> The `lpeg.so` made for Lua 5.2 by `luarocks install lpeg` under Ubuntu 12.04
> is loaded without error by Lua 5.3.
>
> However, the result of running it is not as expected in the case
> of position matches.
>
> [...]
>
> If instead I build lpeg from source, obtained by `luarocks download lpeg`
> and `luarocks unpack lpeg`, changing LUADIR to the
> 5.3.0-work2 directory, and doing `luarocks --local make`,
> the same thing happens.
>
> If instead of `luarocks --local make` I just say `make`,
> after `make clean` of course, the same thing happens.
I have been using LPeg with Lua 5.3 for some time, and I did not have
any of these problems. Your example runs just fine here. As you
are having the same results as when you ran Lua 5.3 with LPeg for 5.2
(where those wrong results were expected), it seems that somehow
your compilation of LPeg is still using the 5.2 header files.
> The result seems to be the concatenation of an address and
> the correct value 4. That address has the same relationship
> to the address of _G as shown above: last 3 hex digits 008
> where G has last 3 hex digits 3c0.
This seems a mismatch between the lua_Integer seen by Lua and the one
seen by LPeg. (LPeg pushes a result with 4 bytes where Lua expects an
argument with 8.) Another indication that LPeg is not seeing the correct
header files.
-- Roberto