*fixed a compile issue for call stack tracing.

This commit is contained in:
Wang Renxin 2016-06-21 10:23:46 +08:00 committed by GitHub
parent 9c62bd9550
commit 59bbdd094c

View File

@ -3961,12 +3961,14 @@ static int _eval_routine(mb_interpreter_t* s, _ls_node_t** l, mb_value_t* va, un
result = _eval_script_routine(s, l, va, ca, r, has_arg, pop_arg); result = _eval_script_routine(s, l, va, ca, r, has_arg, pop_arg);
#ifdef MB_ENABLE_LAMBDA #ifdef MB_ENABLE_LAMBDA
} else if(r->type == _IT_LAMBDA && r->func.lambda.entry) { } else if(r->type == _IT_LAMBDA && r->func.lambda.entry) {
# ifdef MB_ENABLE_STACK_TRACE
_ls_node_t* top = _ls_back(s->stack_frames); _ls_node_t* top = _ls_back(s->stack_frames);
if(top) { if(top) {
char ln[32]; char ln[32];
sprintf(ln, "LAMBDA_0x%p", &r->func.lambda.ref); sprintf(ln, "LAMBDA_0x%p", &r->func.lambda.ref);
top->data = ln; top->data = ln;
} }
# endif /* MB_ENABLE_STACK_TRACE */
result = _eval_lambda_routine(s, l, va, ca, r, has_arg, pop_arg); result = _eval_lambda_routine(s, l, va, ca, r, has_arg, pop_arg);
#endif /* MB_ENABLE_LAMBDA */ #endif /* MB_ENABLE_LAMBDA */
} else if(r->type == _IT_NATIVE && r->func.native.entry) { } else if(r->type == _IT_NATIVE && r->func.native.entry) {