enigma-devel
[Top][All Lists]
Advanced

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

Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows


From: Tacvek
Subject: Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows
Date: Sun, 23 Jul 2006 14:07:53 -0400


----- Original Message ----- From: "Ronald Lamprecht" <address@hidden>
To: "Tacvek" <address@hidden>
Cc: <address@hidden>
Sent: Sunday, July 23, 2006 3:19 AM
Subject: Re: [Enigma-devel] Lua 5.1 "luaL_error" problems on Windows



I can try. Unfortunately this means that we would be deviating from
a normal Lua static library, which Debian will not appreciate.

Why should Debian not appreciate Enigma using C++ exceptions in Lua on Windows compilations?

If the changes limit to the header includes like
extern "C" {
#include "lualib.h"
#include "tolua++.h"
}
we should be able to limit the Lua C++ compilation to Windows/MinGW.

Well of course, there is more to it then that.
First of all Such a change is difficult to limit to MinGW.
I have a basic patch. It comments out the 'extern "C"' c lines,
and explicitly compiles the lib-src/lua directory as C++ code.

I had to disable building tools, as tolua++'s executable
would not compile cleanly as c++. And it would not link cleanly to
a C++ liblua.


Even with these changes I'm still getting linking errors. But it is likely a trivial problem
as it seems to be all calls to liblua code that are causing this.


I'll play with it some more and see if I can get it working.

I can certainly work on this patch. Are you aware of any catch-alls that might be
in the unwind path of a lua exception?

luaconf.h:
/* C++ exceptions */
#define LUAI_THROW(L,c) throw(c)
#define LUAI_TRY(L,c,a) try { a } catch(...) \
{ if ((c)->status == 0) (c)->status = -1; }
#define luai_jmpbuf int  /* dummy variable */



Oh... Yikes. I was aksing about Enigma accidentally cathing lua's exceptions in a catch all. This looks like Lua may end up accidentally catching enigma's exceptions. That line would definately need to be edited.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]