[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: C module compatibility
- From: Andrew Gierth <andrew@...>
- Date: Tue, 09 Apr 2019 00:26:38 +0100
>>>>> "Antonin" == Antonin Décimo <antonin.decimo@gmail.com> writes:
Antonin> +#if LUA_VERSION_NUM > 502 && !defined(LUA_COMPAT_APIINTCASTS)
Antonin> +#define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n)))
Antonin> +#endif
Antonin> +
Antonin> +#if LUA_VERSION_NUM > 501
Antonin> +#if !defined(LUA_COMPAT_MODULE)
Antonin> +#define luaL_register(L,_,funcs) luaL_setfuncs((L),funcs,0)
Antonin> +#endif
This is emulating the old API on new systems. I would strongly
discourage this approach; instead, emulate the new API on old systems
instead.
--
Andrew.