about summary refs log tree commit diff
path: root/src/libexpr/primops.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-10-03T15·38+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-10-03T15·38+0000
commit5fd44654dbca02f188957279eb25a33a3ecfe96b (patch)
tree12b0cb0d2e3018795f810314402450b91bc6b7ae /src/libexpr/primops.cc
parent3837fb233cccc8f65629749f07820afba04952a0 (diff)
* toXML: propagate the context to allow derivations to be used in the
  argument.

Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r--src/libexpr/primops.cc5
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())));
 }