On 5/2/17 12:17 PM, Mike Pall wrote:
That's not a good fix and not future-proof at all. Depending on
arbitrary unrelated defines makes this even worse.
A proper compatibility shim without any possibility of a symbol
clash looks like this:
#if LUA_VERSION_NUM < 502
static ... compat_luaL_setfuncs(...)
{
...
}
#else
#define compat_luaL_setfuncs(L, l, nup) luaL_setfuncs(L, l, nup)
#endif
And later use it like this:
...
compat_luaL_setfuncs(L, l, nup);
...