xo-interpreter2: VSM.start_eval() returns const ref
If copied get unstable value, since may be moved away on next gc
This commit is contained in:
parent
d369ef8f53
commit
c704e59f02
2 changed files with 2 additions and 2 deletions
|
|
@ -119,7 +119,7 @@ namespace xo {
|
|||
/** evaluate expression @p expr
|
||||
* Require: must first start interactive/batch session
|
||||
**/
|
||||
VsmResult start_eval(obj<AExpression> expr);
|
||||
const VsmResult & start_eval(obj<AExpression> expr);
|
||||
|
||||
/** borrow calling thread to run indefinitely,
|
||||
* until halt instruction
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ namespace xo {
|
|||
return VsmResultExt(VsmResult(*p_value), remaining);
|
||||
}
|
||||
|
||||
VsmResult
|
||||
const VsmResult &
|
||||
DVirtualSchematikaMachine::start_eval(obj<AExpression> expr)
|
||||
{
|
||||
this->pc_ = VsmInstr::c_eval;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue