From 47f29db9649f26878953c8f351d0938765280352 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Thu, 7 Jul 2016 17:02:11 -0400 Subject: [PATCH] qq so close to perfect --- sol/function_types.hpp | 2 +- sol/usertype_metatable.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sol/function_types.hpp b/sol/function_types.hpp index 6927f605..203fb0f2 100644 --- a/sol/function_types.hpp +++ b/sol/function_types.hpp @@ -78,7 +78,7 @@ namespace sol { static int push(lua_State* L, constructor_wrapper c) { lua_CFunction cf = call_detail::call_user; int closures = stack::push(L, make_user(std::move(c))); - return stack::push(L, c_closure(cf, 1)); + return stack::push(L, c_closure(cf, closures)); } }; diff --git a/sol/usertype_metatable.hpp b/sol/usertype_metatable.hpp index 6634423e..861a6c85 100644 --- a/sol/usertype_metatable.hpp +++ b/sol/usertype_metatable.hpp @@ -90,7 +90,7 @@ namespace sol { struct add_destructor_tag {}; struct check_destructor_tag {}; struct verified_tag {} const verified{}; - struct simple_tag {} const simple; + struct simple_tag {} const simple{}; template struct is_constructor : std::false_type {};