[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: why not add any static objects into lua_State? Was: Re: issue following array example in pil chapter 28.2
- From: Xavier Wang <weasley.wx@...>
- Date: Tue, 21 Feb 2012 00:58:04 +0800
This bug occurs because David mixed two different lua vm, lua use a
dummynode in ltable.c, and many LUAI_DDEF objects. So if this objects
are all in G(L), the mix of different lua will not cause crash, Any
discuss about this topic?
2012/2/20 David Rio <driodeiros@gmail.com>:
> Thanks Phillip! That was the issue.
>
> -drd
>
> On Sun, Feb 19, 2012 at 23:11, Philipp Janda <siffiejoe@gmx.net> wrote:
>> On 20.02.2012 02:02, David Rio wrote:
>>>
>>> Tet me try to simplify the amount of code necessary to reproduce
>>> the issue:
>>>
>>> --------------------$ cat compile.sh
>>> #!/bin/bash
>>> rm -f *.o *.so
>>> gcc -g -c ldrdlib.c
>>> gcc -g -Wall -shared -llua -o mylib.so ldrdlib.o
>>
>>
>> I don't have access to a Mac, so I can't say for sure, but it seems your gcc
>> invocation is wrong. According to [1] it probably should be something like:
>> gcc -g -Wall -bundle -undefined dynamic_lookup -o mylib.so ldrdlib.o
>>
>> [1]: http://lua-users.org/wiki/BuildingModules
>>
>> HTH,
>> Philipp
>>
>>
>