Permalink
Browse files

use luaL_checkinteger for Lua 5.3

  • Loading branch information...
1 parent 63c7393 commit dd8853c9be77aeda8be02d1c05230f79ca54b8ec @mind04 mind04 committed with mind04 Jan 19, 2015
Showing with 4 additions and 0 deletions.
  1. +4 −0 pdns/lua-auth.cc
View
@@ -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;
}

0 comments on commit dd8853c

Please sign in to comment.