Merge branch 'main' into devtools
This commit is contained in:
@@ -21,8 +21,12 @@ namespace dynamic {
|
|||||||
using Map_sptr = std::shared_ptr<Map>;
|
using Map_sptr = std::shared_ptr<Map>;
|
||||||
using List_sptr = std::shared_ptr<List>;
|
using List_sptr = std::shared_ptr<List>;
|
||||||
|
|
||||||
|
struct none {};
|
||||||
|
|
||||||
|
inline constexpr none NONE = {};
|
||||||
|
|
||||||
using Value = std::variant<
|
using Value = std::variant<
|
||||||
std::monostate,
|
none,
|
||||||
Map_sptr,
|
Map_sptr,
|
||||||
List_sptr,
|
List_sptr,
|
||||||
std::string,
|
std::string,
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ dynamic::Value lua::LuaState::tovalue(int idx) {
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case LUA_TNIL:
|
case LUA_TNIL:
|
||||||
case LUA_TNONE:
|
case LUA_TNONE:
|
||||||
return std::monostate();
|
return dynamic::NONE;
|
||||||
case LUA_TBOOLEAN:
|
case LUA_TBOOLEAN:
|
||||||
return lua_toboolean(L, idx) == 1;
|
return lua_toboolean(L, idx) == 1;
|
||||||
case LUA_TNUMBER: {
|
case LUA_TNUMBER: {
|
||||||
|
|||||||
Reference in New Issue
Block a user