[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.3.0 (rc0) now available
- From: Peter Melnichenko <mpeterval@...>
- Date: Sat, 13 Dec 2014 14:56:27 +0400
Hello! Is it intended that in stacktraces standard C functions are
sometimes reported as `_G.function` and sometimes simply as
`function`? E.g. trying lua -e 'error("msg")' on the command line
sometimes gives
lua: (command line):1: msg
stack traceback:
[C]: in function 'error'
(command line):1: in main chunk
[C]: in ?
and sometimes
lua: (command line):1: msg
stack traceback:
[C]: in function '_G.error'
(command line):1: in main chunk
[C]: in ?
Peter
On Fri, Dec 12, 2014 at 3:10 PM, Alek Paunov <alex@declera.com> wrote:
> Hi Charles,
>
> On 12.12.2014 13:01, ForthCAD wrote:
>>
>> I compile LUAC.exe linked LUA.DLL _dynamic library_.
>> Probably, there would be no error when linking with the a LUA.lib static
>> library.
>>
>> I think the problem is that 'luaU_dump', 'luaP_opmodes', 'luaP_opnames'
>> are
>> not exported from DLL.
>>
>> For instance, the 'luaU_dump' look like :
>>
>> int luaU_dump(lua_State *L, const Proto *f, lua_Writer w, void *data,
>> int strip) {
>> ...
>> }
>>
>> But, to link with DLL, should be:
>>
>> LUA_API int luaU_dump(lua_State *L, const Proto *f, lua_Writer w, void
>> *data,
>> int strip) {
>> ...
>> }
>>
>
> The same patch could be seen in current Fedora packaging of Lua:
>
> http://pkgs.fedoraproject.org/cgit/lua.git/tree/lua-5.2.2-luac-shared-link-fix.patch
>
> Kind regards,
> Alek
>
>