about summary refs log tree commit diff
path: root/src/fstate.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-07-10T18·48+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-07-10T18·48+0000
commite5fbf5804192fa62d0edab0f6b323cc0c8d890f9 (patch)
treeecc024478f0e30692cb12560b9a8b9ae79c30bcf /src/fstate.cc
parent8511571f653fcfbb724061dac330c544b6048722 (diff)
* A command to register successor fstate expressions.
  Unifying substitutes and successors isn't very feasible for now,
  since substitutes are only used when no path with a certain is
  known.  Therefore, a normal form of some expression stored as a
  substitute would not be used unless the expression itself was
  missing.

Diffstat (limited to 'src/fstate.cc')
-rw-r--r--src/fstate.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/fstate.cc b/src/fstate.cc
index 97532c162c1f..a597b6df6b77 100644
--- a/src/fstate.cc
+++ b/src/fstate.cc
@@ -179,6 +179,12 @@ Hash writeTerm(ATerm t, const string & suffix, string * p)
 }
 
 
+void registerSuccessor(const Hash & fsHash, const Hash & scHash)
+{
+    setDB(nixDB, dbSuccessors, fsHash, scHash);
+}
+
+
 FState storeSuccessor(FState fs, FState sc, StringSet & paths)
 {
     if (fs == sc) return sc;
@@ -186,7 +192,7 @@ FState storeSuccessor(FState fs, FState sc, StringSet & paths)
     string path;
     Hash fsHash = hashTerm(fs);
     Hash scHash = writeTerm(sc, "-s-" + (string) fsHash, &path);
-    setDB(nixDB, dbSuccessors, fsHash, scHash);
+    registerSuccessor(fsHash, scHash);
     paths.insert(path);
 
 #if 0