aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops.cc
diff options
context:
space:
mode:
authorSilvan Mosberger <contact@infinisil.com>2020-12-18 14:38:49 +0100
committerSilvan Mosberger <contact@infinisil.com>2020-12-18 21:48:22 +0100
commitb70d22baca3e8826392b61aa53955c6da74b8724 (patch)
tree9a427c59c0ee0d4a43d7df2793f67df2129e0348 /src/libexpr/primops.cc
parent12e65078ef5c511196c9e48f7fdf71f6c0e5c89f (diff)
Replace Value type setters with mk* functions
Move clearValue inside Value mkInt instead of setInt mkBool instead of setBool mkString instead of setString mkPath instead of setPath mkNull instead of setNull mkAttrs instead of setAttrs mkList instead of setList* mkThunk instead of setThunk mkApp instead of setApp mkLambda instead of setLambda mkBlackhole instead of setBlackhole mkPrimOp instead of setPrimOp mkPrimOpApp instead of setPrimOpApp mkExternal instead of setExternal mkFloat instead of setFloat Add note that the static mk* function should be removed eventually
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r--src/libexpr/primops.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 4106f1ec8..45066e9cf 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -1434,7 +1434,7 @@ static void prim_readDir(EvalState & state, const Pos & pos, Value * * args, Val
Value * ent_val = state.allocAttr(v, state.symbols.create(ent.name));
if (ent.type == DT_UNKNOWN)
ent.type = getFileType(path + "/" + ent.name);
- mkStringNoCopy(*ent_val,
+ ent_val->mkString(
ent.type == DT_REG ? "regular" :
ent.type == DT_DIR ? "directory" :
ent.type == DT_LNK ? "symlink" :