util-src: Make C modules assert that the Lua runtime matches what it was compiled for

This commit is contained in:
Kim Alvefur 2017-01-08 14:21:08 +01:00
parent ef391bf6c4
commit 5b10d245e3
9 changed files with 27 additions and 0 deletions

View file

@ -125,6 +125,9 @@ static int lc_local_addresses(lua_State* L) {
}
int luaopen_util_net(lua_State* L) {
#if (LUA_VERSION_NUM > 501)
luaL_checkversion(L);
#endif
luaL_Reg exports[] = {
{ "local_addresses", lc_local_addresses },
{ NULL, NULL }