Merge branch 'master' of github.com:ChaiScript/ChaiScript

This commit is contained in:
Jonathan Turner
2012-05-20 10:17:43 -07:00
9 changed files with 184 additions and 81 deletions

View File

@@ -213,6 +213,29 @@ namespace chaiscript
chaiscript::detail::Dispatch_Engine &m_de;
};
/// Creates a new scope then pops it on destruction
struct Stack_Push_Pop
{
Stack_Push_Pop(chaiscript::detail::Dispatch_Engine &t_de)
: m_de(t_de)
{
m_de.new_stack();
}
~Stack_Push_Pop()
{
m_de.pop_stack();
}
private:
// explicitly unimplemented copy and assignment
Stack_Push_Pop(const Scope_Push_Pop &);
Stack_Push_Pop& operator=(const Scope_Push_Pop &);
chaiscript::detail::Dispatch_Engine &m_de;
};
}
}
}