*fixed a multiple disposing bug.
This commit is contained in:
parent
e9ffc75852
commit
ae3597a8ba
3
HISTORY
3
HISTORY
@ -1,3 +1,6 @@
|
||||
Oct. 14 2017
|
||||
Fixed a multiple disposing bug with the PRINT statement
|
||||
|
||||
Oct. 9 2017
|
||||
Improved expression evaluation speed
|
||||
|
||||
|
@ -17424,6 +17424,14 @@ static int _std_print(mb_interpreter_t* s, void** l) {
|
||||
case _DT_FUNC: /* Fall through */
|
||||
case _DT_ROUTINE:
|
||||
result = _calc_expression(s, &ast, &val_ptr);
|
||||
if(val_ptr->type == _DT_ROUTINE) {
|
||||
#ifdef MB_ENABLE_LAMBDA
|
||||
if(val_ptr->data.routine->type != MB_RT_LAMBDA)
|
||||
val_ptr->is_ref = true;
|
||||
#else /* MB_ENABLE_LAMBDA */
|
||||
val_ptr->is_ref = true;
|
||||
#endif /* MB_ENABLE_LAMBDA */
|
||||
}
|
||||
_REF(val_ptr)
|
||||
_UNREF(val_ptr)
|
||||
_print:
|
||||
|
Loading…
x
Reference in New Issue
Block a user