From: Kees Monshouwer Date: Mon, 19 Jan 2015 09:18:53 +0000 (+0100) Subject: use luaL_checkinteger for Lua 5.3 X-Git-Tag: rec-3.7.0-rc1~10^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=60586abc93e119ef6cc48189b21e2588017887b3;p=pdns use luaL_checkinteger for Lua 5.3 --- diff --git a/pdns/lua-auth.cc b/pdns/lua-auth.cc index 8010ed2ad..4e977ae30 100644 --- a/pdns/lua-auth.cc +++ b/pdns/lua-auth.cc @@ -131,7 +131,11 @@ static DNSPacket* ldp_checkDNSPacket(lua_State *L) { static int ldp_setRcode(lua_State *L) { DNSPacket *p=ldp_checkDNSPacket(L); +#if LUA_VERSION_NUM < 503 int rcode = luaL_checkint(L, 2); +#else + int rcode = (int)luaL_checkinteger(L, 2); +#endif p->setRcode(rcode); return 0; }