Comparison

util-src/hashes.c @ 7818:54669df178c2

util-src: Make C modules assert that the Lua runtime matches what it was compiled for
author Kim Alvefur <zash@zash.se>
date Sun, 08 Jan 2017 14:21:08 +0100
parent 6789:6b180e77c97a
child 7835:a809dcfd0c5b
comparison
equal deleted inserted replaced
7816:2624f4ee34a2 7818:54669df178c2
210 { "scram_Hi_sha1", LscramHi }, 210 { "scram_Hi_sha1", LscramHi },
211 { NULL, NULL } 211 { NULL, NULL }
212 }; 212 };
213 213
214 LUALIB_API int luaopen_util_hashes(lua_State* L) { 214 LUALIB_API int luaopen_util_hashes(lua_State* L) {
215 #if (LUA_VERSION_NUM > 501)
216 luaL_checkversion(L);
217 #endif
215 lua_newtable(L); 218 lua_newtable(L);
216 luaL_setfuncs(L, Reg, 0);; 219 luaL_setfuncs(L, Reg, 0);;
217 lua_pushliteral(L, "-3.14"); 220 lua_pushliteral(L, "-3.14");
218 lua_setfield(L, -2, "version"); 221 lua_setfield(L, -2, "version");
219 return 1; 222 return 1;