]> 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:57:55 +0000 (10:57 +0100)
pdns/lua-auth.cc

index 24e454d9687b3b25fe728db1824abfcf9d60890c..20596888156c2c656ceb0c897be37b1ca153f4ed 100644 (file)
@@ -137,7 +137,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;
 }