mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Use stack::push to push new_table in basic_table_core
This commit is contained in:
parent
6803b989d0
commit
465c0ff502
|
@ -219,8 +219,8 @@ namespace sol {
|
||||||
stack::check<basic_table_core>(lua_state(), -1, handler);
|
stack::check<basic_table_core>(lua_state(), -1, handler);
|
||||||
#endif // Safety
|
#endif // Safety
|
||||||
}
|
}
|
||||||
basic_table_core(lua_State* L, new_table nt)
|
basic_table_core(lua_State* L, const new_table& nt)
|
||||||
: base_t(L, (lua_createtable(L, nt.sequence_hint, nt.map_hint), -1)) {
|
: base_t(L, -stack::push(L, nt)) {
|
||||||
if (!is_stack_based<meta::unqualified_t<base_type>>::value) {
|
if (!is_stack_based<meta::unqualified_t<base_type>>::value) {
|
||||||
lua_pop(L, 1);
|
lua_pop(L, 1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user