diff --git a/lix/libexpr/eval-cache.cc b/lix/libexpr/eval-cache.cc index e4e5dabee..2fb950b77 100644 --- a/lix/libexpr/eval-cache.cc +++ b/lix/libexpr/eval-cache.cc @@ -352,7 +352,7 @@ Value * EvalCache::getRootValue(EvalState & state) ref EvalCache::getRoot() { - return make_ref(*this, std::nullopt); + return make_ref(ref(*this), std::nullopt); } AttrCursor::AttrCursor( diff --git a/lix/libstore/binary-cache-store.cc b/lix/libstore/binary-cache-store.cc index 43872c7cb..f300a44ba 100644 --- a/lix/libstore/binary-cache-store.cc +++ b/lix/libstore/binary-cache-store.cc @@ -532,7 +532,7 @@ try { ref BinaryCacheStore::getFSAccessor() { - return make_ref(*this, config().localNarCache); + return make_ref(ref(*this), config().localNarCache); } kj::Promise> diff --git a/lix/libstore/remote-store.cc b/lix/libstore/remote-store.cc index e24c578b7..b3c74ab73 100644 --- a/lix/libstore/remote-store.cc +++ b/lix/libstore/remote-store.cc @@ -1022,7 +1022,7 @@ try { ref RemoteStore::getFSAccessor() { - return make_ref(*this); + return make_ref(ref(*this)); } static Logger::Fields readFields(Source & from) diff --git a/lix/libutil/ref.hh b/lix/libutil/ref.hh index ab7e60e7b..44858e482 100644 --- a/lix/libutil/ref.hh +++ b/lix/libutil/ref.hh @@ -39,7 +39,7 @@ public: } template> T2> - ref(T2 & r) : p(r.shared_from_this()) + explicit ref(T2 & r) : p(r.shared_from_this()) { }