diff options
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r-- | src/libexpr/primops.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 926ea7b80927..babd6df37b8a 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -507,8 +507,9 @@ static Expr primToPath(EvalState & state, const ATermVector & args) static Expr primToXML(EvalState & state, const ATermVector & args) { std::ostringstream out; - printTermAsXML(strictEvalExpr(state, args[0]), out); - return makeStr(toATerm(out.str())); + ATermList context = ATempty; + printTermAsXML(strictEvalExpr(state, args[0]), out, context); + return wrapInContext(context, makeStr(toATerm(out.str()))); } |