Use shared ref to pass the State.

This commit is contained in:
Sergey Pepyakin
2017-12-17 18:29:06 +03:00
parent 2d2645b7ac
commit 5077aae512
7 changed files with 278 additions and 37 deletions

View File

@ -84,7 +84,7 @@ impl<St> FuncInstance<St> {
pub fn invoke(
func: Rc<FuncInstance<St>>,
args: Vec<RuntimeValue>,
state: &mut St,
state: &St,
) -> Result<Option<RuntimeValue>, Error> {
enum InvokeKind<St> {
Internal(FunctionContext<St>),