about summary refs log tree commit diff
path: root/src/pathlocks.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-10-08T15·06+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-10-08T15·06+0000
commit6baa2c442035fb06652a7fad9d51df1ce41c05f9 (patch)
treec77e57b30ea01fd7ae76ca04a7d8bbc13a1a3979 /src/pathlocks.cc
parentb9f4942bd2f8aae44db6caa5a4ebe5680880fec2 (diff)
* Get rid of identifiers since they are redundant now. This greatly
  simplifies stuff.

* The format of Nix expressions and the database schema changed
  because of this, so it's best to delete old Nix installations.

Diffstat (limited to 'src/pathlocks.cc')
-rw-r--r--src/pathlocks.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pathlocks.cc b/src/pathlocks.cc
index 93f456ace6..ff0226c84e 100644
--- a/src/pathlocks.cc
+++ b/src/pathlocks.cc
@@ -13,20 +13,20 @@
 static StringSet lockedPaths; /* !!! not thread-safe */
 
 
-PathLocks::PathLocks(const Strings & _paths)
+PathLocks::PathLocks(const PathSet & _paths)
 {
     /* Note that `fds' is built incrementally so that the destructor
        will only release those locks that we have already acquired. */
 
     /* Sort the paths.  This assures that locks are always acquired in
        the same order, thus preventing deadlocks. */
-    Strings paths(_paths);
+    Paths paths(_paths.begin(), _paths.end());
     paths.sort();
     
     /* Acquire the lock for each path. */
-    for (Strings::iterator i = paths.begin(); i != paths.end(); i++) {
-        string path = *i;
-        string lockPath = path + ".lock";
+    for (Paths::iterator i = paths.begin(); i != paths.end(); i++) {
+        Path path = *i;
+        Path lockPath = path + ".lock";
 
         debug(format("locking path `%1%'") % path);
 
@@ -64,6 +64,6 @@ PathLocks::~PathLocks()
     for (list<int>::iterator i = fds.begin(); i != fds.end(); i++)
         close(*i);
 
-    for (Strings::iterator i = paths.begin(); i != paths.end(); i++)
+    for (Paths::iterator i = paths.begin(); i != paths.end(); i++)
         lockedPaths.erase(*i);
 }