From 465c0ff5021c11624563512744b4e0b0f21caae5 Mon Sep 17 00:00:00 2001 From: Ilya Averyanov Date: Tue, 19 Dec 2017 16:39:39 +0300 Subject: [PATCH] Use stack::push to push new_table in basic_table_core --- sol/table_core.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sol/table_core.hpp b/sol/table_core.hpp index 9c5fee5d..0cd52d28 100644 --- a/sol/table_core.hpp +++ b/sol/table_core.hpp @@ -219,8 +219,8 @@ namespace sol { stack::check(lua_state(), -1, handler); #endif // Safety } - basic_table_core(lua_State* L, new_table nt) - : base_t(L, (lua_createtable(L, nt.sequence_hint, nt.map_hint), -1)) { + basic_table_core(lua_State* L, const new_table& nt) + : base_t(L, -stack::push(L, nt)) { if (!is_stack_based>::value) { lua_pop(L, 1); }