mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
fix std::nullptr_t getter and pusher
according to http://sol2.readthedocs.io/en/latest/tutorial/ownership.html it should be that way
This commit is contained in:
parent
08b5204dee
commit
62b21b1cec
|
@ -227,7 +227,7 @@ namespace sol {
|
|||
};
|
||||
|
||||
template<>
|
||||
struct pusher<std::nullptr_t> {
|
||||
struct getter<std::nullptr_t> {
|
||||
static std::nullptr_t get(lua_State*, int = -1) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -527,6 +527,13 @@ namespace sol {
|
|||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct pusher<std::nullptr_t> {
|
||||
static int push(lua_State* L, std::nullptr_t) {
|
||||
return stack::push(L, nil);
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct pusher<this_state> {
|
||||
static int push(lua_State*, const this_state&) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user