]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
lua_typename now uses lua_type 5200/head
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Fri, 24 Mar 2017 10:44:01 +0000 (11:44 +0100)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Fri, 24 Mar 2017 10:44:01 +0000 (11:44 +0100)
luawrapper 84c01a4

ext/luawrapper/include/LuaContext.hpp

index 6ee104880ef6a6e54535d25b00d4a79cbff7e9ae..9416c906c3539cce6e7b04172d8b56418f957a35 100644 (file)
@@ -1626,7 +1626,7 @@ private:
 
         const auto& firstElem = Reader<typename std::decay<TFirstType>::type>::read(state, index);
         if (!firstElem)
-            throw WrongTypeException(lua_typename(state, index), typeid(TFirstType));
+            throw WrongTypeException(lua_typename(state, lua_type(state, index)), typeid(TFirstType));
 
         Binder<TCallback, const TFirstType&> binder{ callback, *firstElem };
         return readIntoFunction(state, retValueTag, binder, index + 1, othersTags...);
@@ -1640,7 +1640,7 @@ private:
 
         const auto& firstElem = Reader<typename std::decay<TFirstType>::type>::read(state, index);
         if (!firstElem)
-            throw WrongTypeException(lua_typename(state, index), typeid(TFirstType));
+            throw WrongTypeException(lua_typename(state, lua_type(state, index)), typeid(TFirstType));
 
         Binder<TCallback, const TFirstType&> binder{ callback, *firstElem };
         return readIntoFunction(state, retValueTag, binder, index + 1, othersTags...);