Software /
code /
prosody
Diff
util-src/crand.c @ 7823:9b66ada1487c
util.crand: Switch to luaL_checkinteger since checkint is deprecated in Lua 5.3
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 20 Jan 2017 11:41:07 +0100 |
parent | 7818:54669df178c2 |
child | 7824:56552733742e |
line wrap: on
line diff
--- a/util-src/crand.c Fri Jan 13 18:29:30 2017 +0100 +++ b/util-src/crand.c Fri Jan 20 11:41:07 2017 +0100 @@ -57,7 +57,7 @@ unsigned char *buf; #endif int ret = 0; - size_t len = (size_t)luaL_checkint(L, 1); + size_t len = (size_t)luaL_checkinteger(L, 1); #ifdef BUFLEN len = len > BUFLEN ? BUFLEN : len; #else @@ -71,6 +71,7 @@ */ return 2; } + #endif #if defined(WITH_GETRANDOM)