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:
Roland Conybeare 2026-03-26 17:08:39 -04:00
commit c704e59f02
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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;