From 62b21b1cecbaa3e49ad163a76d2bc83ef0d091a8 Mon Sep 17 00:00:00 2001 From: FYP Date: Tue, 26 Jul 2016 00:31:31 +0300 Subject: [PATCH] fix std::nullptr_t getter and pusher according to http://sol2.readthedocs.io/en/latest/tutorial/ownership.html it should be that way --- sol/stack_get.hpp | 2 +- sol/stack_push.hpp | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sol/stack_get.hpp b/sol/stack_get.hpp index ad8fd3cc..78b1ac87 100644 --- a/sol/stack_get.hpp +++ b/sol/stack_get.hpp @@ -227,7 +227,7 @@ namespace sol { }; template<> - struct pusher { + struct getter { static std::nullptr_t get(lua_State*, int = -1) { return nullptr; } diff --git a/sol/stack_push.hpp b/sol/stack_push.hpp index bcefe3da..98a8bda5 100644 --- a/sol/stack_push.hpp +++ b/sol/stack_push.hpp @@ -527,6 +527,13 @@ namespace sol { } }; + template<> + struct pusher { + static int push(lua_State* L, std::nullptr_t) { + return stack::push(L, nil); + } + }; + template<> struct pusher { static int push(lua_State*, const this_state&) {