lua-users home
lua-l archive

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


Sorry, Liam, but I actually overlooked your answers (as they were directly placed adjacent to the questions (and not seperated as the last comment).
Shame on me for this...

But going to them in detail I have to make a few remarks. I placed them after your remarks.
Hope the color does not get lost...

Am 30.09.2012 17:32, schrieb liam mail:
On 30 September 2012 15:34, Seppl Vorderhörer
<Seppl.Vorderhoerer@t-online.de> wrote:
LUA_CORE
This leads for me to two questions:
1.) Can this switch not be also lead to problems in "normal" C code
not poking around in internals of Lua?
Not that I am aware of.
Have you been aware, that this switch does not only add some internals but in the case described actually CHANGES the code?
I'm specifically thinking about a number of API's which are actually macros instead of functions. Although I'm pretty sure that
there is no risk, why take the chance at all?

2.) Why is this switch necessary at all? Why would I want code to
"know" that it's part of the core and behave differently?
LUA_CORE as you have seen defines other internally used macros if it
is defined and this is not what is wanted when a user simply includes
the public API headers.
Same remark as above:
I'd agree with you if it were just additional macros, but I do not agree on macros changing the code.
And even if I want to have special macros not been seen from users just including the headers then this could be solved by seperate
headers etc. Placing something inside a header and then hiding via a surrounding "not enabled" macro is surely possible but if you
think that Lua is designed as embedded language which is specifically made to be included as source then I do not know if it's the
best way.
Fixing this behaviour is easy: Either compiling with LUA_CORE
This is not surprising as you are using internal details.

Liam



Sorry, Liam, but I actually overlooked your answers (as they were directly placed adjacent to the questions (and not seperated as the last comment).
Shame on me for this...

But going to them in detail I have to make a few remarks:
1.) Can this switch not be also lead to problems in "normal" C code
not poking around in internals of Lua?
Not that I am aware of.
Have you been aware, that the m