diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-09-04T21·06+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-09-04T21·06+0000 |
commit | 75068e7d753cf6cbe45a4bf294000dca9bd41d8b (patch) | |
tree | c6274cc10caab08349b5585206034f41ca4a575f /src/libexpr/primops.cc | |
parent | aab88127321344d5818d823bff515d127108d058 (diff) |
* Use a proper namespace.
* Optimise header file usage a bit. * Compile the parser as C++.
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r-- | src/libexpr/primops.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 5dfe90a8f96c..3f915fc232a9 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -1,11 +1,16 @@ -#include <algorithm> - #include "build.hh" #include "misc.hh" #include "eval.hh" #include "globals.hh" -#include "nixexpr-ast.hh" +#include "store.hh" +#include "util.hh" #include "expr-to-xml.hh" +#include "nixexpr-ast.hh" + +#include <algorithm> + + +namespace nix { static Expr primBuiltins(EvalState & state, const ATermVector & args) @@ -472,7 +477,7 @@ static Expr primToString(EvalState & state, const ATermVector & args) be sensibly or completely represented (e.g., functions). */ static Expr primToXML(EvalState & state, const ATermVector & args) { - ostringstream out; + std::ostringstream out; printTermAsXML(strictEvalExpr(state, args[0]), out); return makeStr(toATerm(out.str())); } @@ -746,3 +751,6 @@ void EvalState::addPrimOps() addPrimOp("removeAttrs", 2, primRemoveAttrs); addPrimOp("relativise", 2, primRelativise); } + + +} |