webmcp
diff libraries/multirand/multirand.c @ 426:9d15451c340a
Lua 5.3 compatibility: do not use luaL_checkint
author | jbe |
---|---|
date | Thu Jan 14 12:49:54 2016 +0100 (2016-01-14) |
parents | 593413f317f4 |
children |
line diff
1.1 --- a/libraries/multirand/multirand.c Tue Jan 12 20:03:17 2016 +0100 1.2 +++ b/libraries/multirand/multirand.c Thu Jan 14 12:49:54 2016 +0100 1.3 @@ -80,12 +80,12 @@ 1.4 } 1.5 1.6 static int multirand_string(lua_State *L) { 1.7 - int length; 1.8 + lua_Integer length; 1.9 const char *charset; 1.10 size_t charset_size; 1.11 luaL_Buffer buf; 1.12 lua_settop(L, 2); 1.13 - length = luaL_checkint(L, 1); 1.14 + length = luaL_checkinteger(L, 1); 1.15 charset = luaL_optlstring(L, 2, "abcdefghijklmnopqrstuvwxyz", &charset_size); 1.16 if (charset_size > 32767) { 1.17 return luaL_error(L, "Set of chars is too big.");