Comparison

util-src/crand.c @ 12575:1f6f05a98fcd

util-src: Remove Lua 5.1 compat macros Part of #1600
author Kim Alvefur <zash@zash.se>
date Fri, 01 Jul 2022 21:21:21 +0200
parent 12470:80f3123053e2
child 12976:a187600ec7d6
comparison
equal deleted inserted replaced
12574:18d33668c5fa 12575:1f6f05a98fcd
122 lua_pushlstring(L, buf, len); 122 lua_pushlstring(L, buf, len);
123 return 1; 123 return 1;
124 } 124 }
125 125
126 int luaopen_util_crand(lua_State *L) { 126 int luaopen_util_crand(lua_State *L) {
127 #if (LUA_VERSION_NUM > 501)
128 luaL_checkversion(L); 127 luaL_checkversion(L);
129 #endif
130 128
131 lua_createtable(L, 0, 2); 129 lua_createtable(L, 0, 2);
132 lua_pushcfunction(L, Lrandom); 130 lua_pushcfunction(L, Lrandom);
133 lua_setfield(L, -2, "bytes"); 131 lua_setfield(L, -2, "bytes");
134 132