Comparison

util-src/crand.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 7439:4cccaa33b0a1
child 7823:9b66ada1487c
comparison
equal deleted inserted replaced
7816:2624f4ee34a2 7818:54669df178c2
128 #endif 128 #endif
129 } 129 }
130 #endif 130 #endif
131 131
132 int luaopen_util_crand(lua_State *L) { 132 int luaopen_util_crand(lua_State *L) {
133 #if (LUA_VERSION_NUM > 501)
134 luaL_checkversion(L);
135 #endif
133 lua_newtable(L); 136 lua_newtable(L);
134 lua_pushcfunction(L, Lrandom); 137 lua_pushcfunction(L, Lrandom);
135 lua_setfield(L, -2, "bytes"); 138 lua_setfield(L, -2, "bytes");
136 #ifdef ENABLE_SEEDING 139 #ifdef ENABLE_SEEDING
137 lua_pushcfunction(L, Lseed); 140 lua_pushcfunction(L, Lseed);