about summary refs log tree commit diff
path: root/src/libexpr/eval.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-03-30T18·05+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-03-30T18·05+0000
commit47df476daa568af9f645b6a039c028e602a7e44b (patch)
treedcdef8f161a8f0ecd522cedfaf1d1c8d6e431ca3 /src/libexpr/eval.hh
parentc9170be2bd2e735b37db7e7b4ccaca86835cb5c5 (diff)
* More operators / primops.
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r--src/libexpr/eval.hh18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index 28ec2e3989a7..87ab7733ada2 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -104,19 +104,9 @@ static inline void mkBool(Value & v, bool b)
 }
 
 
-static inline void mkString(Value & v, const char * s)
-{
-    v.type = tString;
-    v.string.s = s;
-    v.string.context = 0;
-}
-
-
-static inline void mkPath(Value & v, const char * s)
-{
-    v.type = tPath;
-    v.path = s;
-}
+void mkString(Value & v, const char * s);
+void mkString(Value & v, const string & s, const PathSet & context);
+void mkPath(Value & v, const char * s);
 
 
 typedef std::map<Path, PathSet> DrvRoots;
@@ -177,6 +167,7 @@ public:
     void forceAttrs(Value & v);
     void forceList(Value & v);
     void forceFunction(Value & v); // either lambda or primop
+    string forceStringNoCtx(Value & v);
 
     /* String coercion.  Converts strings, paths and derivations to a
        string.  If `coerceMore' is set, also converts nulls, integers,
@@ -234,7 +225,6 @@ Expr strictEvalExpr(EvalState & state, Expr e);
 
 /* Specific results. */
 string evalString(EvalState & state, Expr e, PathSet & context);
-string evalStringNoCtx(EvalState & state, Expr e);
 int evalInt(EvalState & state, Expr e);
 bool evalBool(EvalState & state, Expr e);
 ATermList evalList(EvalState & state, Expr e);