about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libexpr/eval.cc13
-rw-r--r--src/libexpr/primops.cc2
2 files changed, 3 insertions, 12 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index 81ce7d9a3020..87b6bc991574 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -1355,17 +1355,8 @@ bool EvalState::eqValues(Value & v1, Value & v2)
         case tBool:
             return v1.boolean == v2.boolean;
 
-        case tString: {
-            /* Compare both the string and its context. */
-            if (strcmp(v1.string.s, v2.string.s) != 0) return false;
-            const char * * p = v1.string.context, * * q = v2.string.context;
-            if (!p && !q) return true;
-            if (!p || !q) return false;
-            for ( ; *p && *q; ++p, ++q)
-                if (strcmp(*p, *q) != 0) return false;
-            if (*p || *q) return false;
-            return true;
-        }
+        case tString:
+            return strcmp(v1.string.s, v2.string.s) == 0;
 
         case tPath:
             return strcmp(v1.path, v2.path) == 0;
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 993d290eb318..feb0227acb76 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -1297,7 +1297,7 @@ void EvalState::createBaseEnv()
        language feature gets added.  It's not necessary to increase it
        when primops get added, because you can just use `builtins ?
        primOp' to check. */
-    mkInt(v, 2);
+    mkInt(v, 3);
     addConstant("__langVersion", v);
 
     // Miscellaneous