use a global void value for returning unknown values
This commit is contained in:
@@ -411,6 +411,11 @@ namespace chaiscript
|
||||
return detail::const_var_impl(t);
|
||||
}
|
||||
|
||||
inline Boxed_Value void_var() {
|
||||
static const auto v = Boxed_Value(Boxed_Value::Void_Type());
|
||||
return v;
|
||||
}
|
||||
|
||||
inline Boxed_Value const_var(bool b) {
|
||||
static const auto t = detail::const_var_impl(true);
|
||||
static const auto f = detail::const_var_impl(false);
|
||||
|
||||
@@ -268,7 +268,7 @@ namespace chaiscript
|
||||
{
|
||||
static Boxed_Value handle()
|
||||
{
|
||||
return Boxed_Value(Boxed_Value::Void_Type());
|
||||
return void_var();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user