aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-01-20 11:41:07 +0100
committerKim Alvefur <zash@zash.se>2017-01-20 11:41:07 +0100
commit41485b40ab1d4eb1a49047bc3274a0e604e76c88 (patch)
treec85d7821ac66d0252434618fa8ad29ed8f170919
parentb3954db458e82553466badae2730f3309a452327 (diff)
downloadprosody-41485b40ab1d4eb1a49047bc3274a0e604e76c88.tar.gz
prosody-41485b40ab1d4eb1a49047bc3274a0e604e76c88.zip
util.crand: Switch to luaL_checkinteger since checkint is deprecated in Lua 5.3
-rw-r--r--util-src/crand.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util-src/crand.c b/util-src/crand.c
index 177511ce..547ceb55 100644
--- a/util-src/crand.c
+++ b/util-src/crand.c
@@ -57,7 +57,7 @@ int Lrandom(lua_State *L) {
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 @@ int Lrandom(lua_State *L) {
*/
return 2;
}
+
#endif
#if defined(WITH_GETRANDOM)