]> granicus.if.org Git - pdns/commitdiff
use luaL_checkinteger for Lua 5.3
authorKees Monshouwer <mind04@monshouwer.org>
Mon, 19 Jan 2015 09:18:53 +0000 (10:18 +0100)
committermind04 <mind04@monshouwer.org>
Mon, 19 Jan 2015 09:18:53 +0000 (10:18 +0100)
pdns/lua-auth.cc

index 8010ed2ad6a05b2ba3c4eabd3e9209f877e924d3..4e977ae30c6cea93fa224ac795f117eda3011133 100644 (file)
@@ -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;
 }