diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-03-07T22·55+0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-03-07T22·55+0100 |
commit | 28bba8c44f484eae38e8a15dcec73cfa999156f6 (patch) | |
tree | f5e009a14192dc56a741703d08c622cf7236dc5b /src/libexpr/primops.cc | |
parent | 8057a192e3254c936fa0bcb5715e09600a28e8f8 (diff) |
Prevent config.h from being clobbered
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r-- | src/libexpr/primops.cc | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index f66b24b7708a..f8f893d69683 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -1107,21 +1107,6 @@ static void prim_unsafeDiscardOutputDependency(EvalState & state, Value * * args } -/* Return the cryptographic hash of a string in base-16. */ -static void prim_hashString(EvalState & state, Value * * args, Value & v) -{ - string type = state.forceStringNoCtx(*args[0]); - HashType ht = parseHashType(type); - if (ht == htUnknown) - throw Error(format("unknown hash type `%1%'") % type); - - PathSet context; // discarded - string s = state.forceString(*args[1], context); - - mkString(v, printHash(hashString(ht, s)), context); -}; - - /************************************************************* * Versions *************************************************************/ @@ -1249,7 +1234,6 @@ void EvalState::createBaseEnv() addPrimOp("__stringLength", 1, prim_stringLength); addPrimOp("__unsafeDiscardStringContext", 1, prim_unsafeDiscardStringContext); addPrimOp("__unsafeDiscardOutputDependency", 1, prim_unsafeDiscardOutputDependency); - addPrimOp("__hashString", 2, prim_hashString); // Versions addPrimOp("__parseDrvName", 1, prim_parseDrvName); |