diff --git a/single/sol/sol.hpp b/single/sol/sol.hpp index f9b5eb9c..638f5a49 100644 --- a/single/sol/sol.hpp +++ b/single/sol/sol.hpp @@ -20,8 +20,8 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // This file was generated with a script. -// Generated 2016-08-20 01:06:43.957511 UTC -// This header was generated with sol v2.11.4 (revision 1ae78e1) +// Generated 2016-08-20 01:37:43.229767 UTC +// This header was generated with sol v2.11.5 (revision e31ed71) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP @@ -4860,10 +4860,12 @@ namespace sol { index = lua_absindex(L, index); T arr; get_field(L, static_cast(-1), index); - optional sizehint = pop>(L); - if (sizehint) { - detail::reserve(arr, *sizehint); + int isnum; + std::size_t sizehint = static_cast(lua_tointegerx(L, -1, &isnum)); + if (isnum == 0) { + detail::reserve(arr, sizehint); } + lua_pop(L, 1); #if SOL_LUA_VERSION >= 503 // This method is HIGHLY performant over regular table iteration thanks to the Lua API changes in 5.3 for (lua_Integer i = 0; ; ++i, lua_pop(L, 1)) { diff --git a/sol/stack_get.hpp b/sol/stack_get.hpp index dc7363eb..1c71a9e3 100644 --- a/sol/stack_get.hpp +++ b/sol/stack_get.hpp @@ -83,14 +83,15 @@ namespace sol { typedef typename T::value_type V; tracking.use(1); - index = lua_absindex(L, index); T arr; get_field(L, static_cast(-1), index); - optional sizehint = pop>(L); - if (sizehint) { - detail::reserve(arr, *sizehint); + int isnum; + std::size_t sizehint = static_cast(lua_tointegerx(L, -1, &isnum)); + if (isnum == 0) { + detail::reserve(arr, sizehint); } + lua_pop(L, 1); #if SOL_LUA_VERSION >= 503 // This method is HIGHLY performant over regular table iteration thanks to the Lua API changes in 5.3 for (lua_Integer i = 0; ; ++i, lua_pop(L, 1)) {