[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Why is the stack cleared on panic?
- From: Alexander Gladysh <agladysh@...>
- Date: Mon, 10 Jan 2011 19:51:07 +0300
On Mon, Jan 10, 2011 at 19:37, Julio Merino <jmmv84@gmail.com> wrote:
> On Mon, Jan 10, 2011 at 4:29 PM, Alexander Gladysh <agladysh@gmail.com> wrote:
>> On Mon, Jan 10, 2011 at 18:50, Julio Merino <jmmv84@gmail.com> wrote:
>> Um. This looks like you intend to work from C++ with Lua, compiled as C.
>> In general, this is not a good idea.
> Yep, I found that the hard way. That said I'd prefer the ability to
> use prebuilt Lua libraries shipped as binary packages (for your
> preferred distro). Is that a bad idea in general too? (Maybe yes
> based on the amount of settings in luaconf.h... but I'm very new
> around here!)
No, that is not a bad idea, if your use case allow it, this is the
best way to do it.
OTOH, C++ and Lua, compiled in plain C, really do not play well together.
You may try to use LuaJIT 2, it is ABI-compatible with most of plain C
modules (at least ones who play by the rules), and (I have an
impression that) it covers C/C++ error handling, if built correctly. I
did not check it myself though.
Alexander.