From 8da65bf5cf0ceeabbc7e68c7fa445d0aa0d60c38 Mon Sep 17 00:00:00 2001 From: paladin-t Date: Thu, 7 Jan 2016 21:31:05 +0800 Subject: [PATCH] *fixed a wrong scope linkage issue with lambda. --- core/my_basic.c | 2 +- core/my_basic.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/my_basic.c b/core/my_basic.c index 61dceed..5a3c2c6 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -6364,7 +6364,7 @@ _running_context_t* _link_lambda_scope_chain(mb_interpreter_t* s, _lambda_t* lam } if(weak) - result = _push_weak_scope_by_routine(s, lambda->scope, 0); + result = _push_weak_scope_by_routine(s, result, 0); else result = _push_scope_by_routine(s, running); diff --git a/core/my_basic.h b/core/my_basic.h index eb69e87..607ce77 100755 --- a/core/my_basic.h +++ b/core/my_basic.h @@ -90,7 +90,7 @@ extern "C" { #endif /* MB_ENABLE_CLASS */ #ifndef MB_ENABLE_LAMBDA -# define MB_ENABLE_LAMBDA /* The Lambda is still under development */ +# define MB_ENABLE_LAMBDA #endif /* MB_ENABLE_LAMBDA */ #ifndef MB_COMPACT_MODE