lua-users home
lua-l archive

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


> But whats the outcome of all this now? If I get the referred thread
> from Liam correctly and his explanation about LUA_CORE then I should
> in general define this compiler switch if I intend to do anything
> with the "inside mechanisms" of Lua to be on the safe side?!
> 
> Is that correct?

Not exactly.

Lua is not structured for users to do stuff "inside" it. Lua has a
very well-defined API, and Lua is organized towards people that use
this API. Code in Lua either is inside this API or it is outside this
API. You will notice that even Lua itself is very strict about this
boundary. For instance, code inside the kernel does not calls API
functions. No function in the Lua distribution uses the API and at the
same time accesses inside mechanisms.

Of course, you are welcome to do whatever you want with the inside
mechanisms of Lua, but you must realize that there is no "safe side" in
this case. If you are writing code inside the kernel, certainly you must
define LUA_CORE (and you should not call API functions). If your code is
outside the kernel, you do not define LUA_CORE (and do not access inside
mechanisms). If your code is neither inside nor outside, probably you
should define LUA_CORE but be very careful with what you do.

-- Roberto