From 6baa2c442035fb06652a7fad9d51df1ce41c05f9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 8 Oct 2003 15:06:59 +0000 Subject: * 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. --- src/pathlocks.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/pathlocks.cc') diff --git a/src/pathlocks.cc b/src/pathlocks.cc index 93f456ace693..ff0226c84e5c 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::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); } -- cgit 1.4.1