Minor cleanup releated to attribute fix
This commit is contained in:
parent
1186926f30
commit
b0953fb466
@ -44,20 +44,6 @@ namespace chaiscript
|
|||||||
|
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
struct Dynamic_Object_Attribute
|
|
||||||
{
|
|
||||||
static Boxed_Value func(const std::string &t_type_name, const std::string &t_attr_name,
|
|
||||||
Dynamic_Object &t_do)
|
|
||||||
{
|
|
||||||
if (t_do.get_type_name() != t_type_name)
|
|
||||||
{
|
|
||||||
throw exception::bad_boxed_cast("Dynamic object type mismatch");
|
|
||||||
}
|
|
||||||
|
|
||||||
return t_do.get_attr(t_attr_name);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Proxy_Function implementation designed for calling a function
|
* A Proxy_Function implementation designed for calling a function
|
||||||
* that is automatically guarded based on the first param based on the
|
* that is automatically guarded based on the first param based on the
|
||||||
|
@ -1158,9 +1158,6 @@ namespace chaiscript
|
|||||||
)
|
)
|
||||||
), this->children[1]->text);
|
), this->children[1]->text);
|
||||||
|
|
||||||
// t_ss.add(fun(boost::function<Boxed_Value (dispatch::Dynamic_Object &)>(boost::bind(&dispatch::detail::Dynamic_Object_Attribute::func, this->children[0]->text,
|
|
||||||
// this->children[1]->text, _1))), this->children[1]->text);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (const exception::reserved_word_error &) {
|
catch (const exception::reserved_word_error &) {
|
||||||
throw exception::eval_error("Reserved word used as attribute '" + this->children[1]->text + "'");
|
throw exception::eval_error("Reserved word used as attribute '" + this->children[1]->text + "'");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user