Add object dependency tracking to make sure that during nested function calls all returned values are not prematurely destructed.
All tests pass on vc2008 now.
This commit is contained in:
@@ -132,10 +132,6 @@ namespace chaiscript
|
||||
|
||||
virtual ~Dispatch_Function() {}
|
||||
|
||||
virtual Boxed_Value operator()(const std::vector<Boxed_Value> ¶ms) const
|
||||
{
|
||||
return dispatch(m_funcs.begin(), m_funcs.end(), params);
|
||||
}
|
||||
|
||||
virtual int get_arity() const
|
||||
{
|
||||
@@ -167,6 +163,12 @@ namespace chaiscript
|
||||
return "";
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual Boxed_Value do_call(const std::vector<Boxed_Value> ¶ms) const
|
||||
{
|
||||
return dispatch(m_funcs.begin(), m_funcs.end(), params);
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<std::pair<std::string, Proxy_Function > > m_funcs;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user