diff --git a/single/sol/sol.hpp b/single/sol/sol.hpp index 5d9bb8c8..07691701 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 2017-09-22 22:53:40.988986 UTC -// This header was generated with sol v2.18.3 (revision 290a671) +// Generated 2017-09-24 00:26:27.067649 UTC +// This header was generated with sol v2.18.3 (revision 6d879f5) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP @@ -6553,6 +6553,9 @@ namespace sol { namespace stack { + template + struct extensible {}; + template struct field_getter; template @@ -6562,12 +6565,16 @@ namespace sol { template struct getter; template + struct userdata_getter; + template struct popper; template struct pusher; template ::value, typename = void> struct checker; template + struct userdata_checker; + template struct check_getter; struct probe { @@ -7075,6 +7082,14 @@ namespace stack { }; } // namespace stack_detail + template + struct userdata_checker { + template + static bool check(lua_State*, int, type, Handler&&, record&) { + return false; + } + }; + template struct checker { template @@ -7410,7 +7425,14 @@ namespace stack { template struct checker, type::userdata, C> { template - static bool check(types, lua_State* L, type indextype, int index, Handler&& handler, record& tracking) { + static bool check(types, lua_State* L, int index, type indextype, Handler&& handler, record& tracking) { +#ifdef SOL_ENABLE_INTEROP + userdata_checker> uc; + (void)uc; + if (uc.check(L, index, indextype, handler, tracking)) { + return true; + } +#endif // interop extensibility tracking.use(1); if (indextype != type::userdata) { handler(L, index, type::userdata, indextype, "value is not a valid userdata"); @@ -7456,7 +7478,7 @@ namespace stack { template static bool check(lua_State* L, int index, Handler&& handler, record& tracking) { const type indextype = type_of(L, index); - return checker, type::userdata, C>{}.check(types(), L, indextype, index, std::forward(handler), tracking); + return checker, type::userdata, C>{}.check(types(), L, index, indextype, std::forward(handler), tracking); } }; @@ -7618,6 +7640,13 @@ namespace sol { namespace sol { namespace stack { + template + struct userdata_getter { + static std::pair get(lua_State*, int, void*, record&) { + return { false, nullptr }; + } + }; + template struct getter { static T& get(lua_State* L, int index, record& tracking) { @@ -8202,7 +8231,16 @@ namespace stack { struct getter> { static T* get_no_lua_nil(lua_State* L, int index, record& tracking) { tracking.use(1); - void** pudata = static_cast(lua_touserdata(L, index)); + void* rawdata = lua_touserdata(L, index); +#ifdef SOL_ENABLE_INTEROP + userdata_getter> ug; + (void)ug; + auto ugr = ug.get(L, index, rawdata, tracking); + if (ugr.first) { + return ugr.second; + } +#endif // interop extensibility + void** pudata = static_cast(rawdata); void* udata = *pudata; return get_no_lua_nil_from(L, udata, index, tracking); }