Hello,

+/* Lua and it's flavors */ +#define SWIG_LUA_LUA 1 +#define SWIG_LUA_ELUA 2 +#define SWIG_LUA_ELUAC 3 >These names seem obscure. Something like "SWIG_LUA_TARGET_..." >(matching the macro against which these are compared), or >"SWIG_LUA_FLAVOR_..." (matching the comment) would be better.
I agree that the names do not make things very obvious at the first skim.
We could change this.

 +#if (SWIG_LUA_TARGET == SWIG_LUA_LUA) ...normal lua code... +# else ...elua code... +#endif >There are a bunch of #if tests like that in the patch. Putting the >elua code into the #else, leaving it unnamed, sort of says "this is >the default case", which of course isn't true. >It would be better to reverse that and use something like: #if (SWIG_LUA_TARGET == SWIG_LUA_TARGET_ELUA) ...elua code... # else // SWIG_LUA_TARGET_LUA ...normal lua code... #endif >Note that this then is much more likely to do the right thing without >code modification in the case that _additional_ values for >SWIG_LUA_TARGET are added later (for other variant Lua flavors), as in >general such modifications will share most of the behavior with >standard Lua, not with elua.
True, I guess I wrote this keeping just Lua and eLua in mind. I will change this.

 +#if (SWIG_LUA_TARGET == SWIG_LUA_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_ELUAC) +# define LRO_STRVAL(v) {{.p = (char *) v}, LUA_TSTRING} >Is that portable?!
The macro works well with all builds of eLua, for all eLua platforms. (Ideally,
LTR requires a C99 compliant compiler such as GCC).

Miles: Thank you for your comments and suggestions.

William: I will start working on this and send you a patch very soon.

Thanks, Raman