something something nice things

This commit is contained in:
ThePhD 2019-04-23 10:29:59 -04:00
parent 468ac367a0
commit 2d470857b4
No known key found for this signature in database
GPG Key ID: 1509DB1C0F702BFA
3 changed files with 36 additions and 12 deletions

View File

@ -153,10 +153,6 @@ namespace sol { namespace stack {
Real* mem = static_cast<Real*>(memory);
return *mem;
}
else if constexpr(std::is_pointer_v<T> && std::is_void_v<std::remove_pointer_t<T>>) {
tracking.use(1);
return lua_touserdata(L, index);
}
else {
return stack_detail::unchecked_unqualified_get<detail::as_value_tag<T>>(L, index, tracking);
}
@ -839,6 +835,22 @@ namespace sol { namespace stack {
}
};
template <>
struct unqualified_getter<void*> {
static void* get(lua_State* L, int index, record& tracking) {
tracking.use(1);
return lua_touserdata(L, index);
}
};
template <>
struct unqualified_getter<const void*> {
static const void* get(lua_State* L, int index, record& tracking) {
tracking.use(1);
return lua_touserdata(L, index);
}
};
template <typename T>
struct unqualified_getter<detail::as_value_tag<T>> {
static T* get_no_lua_nil(lua_State* L, int index, record& tracking) {

View File

@ -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 2019-04-23 14:18:30.819548 UTC
// This header was generated with sol v3.0.1-beta2 (revision 47bc7f6)
// Generated 2019-04-23 14:29:43.918566 UTC
// This header was generated with sol v3.0.1-beta2 (revision 468ac36)
// https://github.com/ThePhD/sol2
#ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP

View File

@ -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 2019-04-23 14:18:30.519015 UTC
// This header was generated with sol v3.0.1-beta2 (revision 47bc7f6)
// Generated 2019-04-23 14:29:43.637794 UTC
// This header was generated with sol v3.0.1-beta2 (revision 468ac36)
// https://github.com/ThePhD/sol2
#ifndef SOL_SINGLE_INCLUDE_HPP
@ -11590,10 +11590,6 @@ namespace sol { namespace stack {
Real* mem = static_cast<Real*>(memory);
return *mem;
}
else if constexpr(std::is_pointer_v<T> && std::is_void_v<std::remove_pointer_t<T>>) {
tracking.use(1);
return lua_touserdata(L, index);
}
else {
return stack_detail::unchecked_unqualified_get<detail::as_value_tag<T>>(L, index, tracking);
}
@ -12276,6 +12272,22 @@ namespace sol { namespace stack {
}
};
template <>
struct unqualified_getter<void*> {
static void* get(lua_State* L, int index, record& tracking) {
tracking.use(1);
return lua_touserdata(L, index);
}
};
template <>
struct unqualified_getter<const void*> {
static const void* get(lua_State* L, int index, record& tracking) {
tracking.use(1);
return lua_touserdata(L, index);
}
};
template <typename T>
struct unqualified_getter<detail::as_value_tag<T>> {
static T* get_no_lua_nil(lua_State* L, int index, record& tracking) {