From 7850d3d27910c30232dd09dd86ee8afdaad26b90 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 1 Jun 2016 14:49:12 +0200 Subject: Make the store directory a member variable of Store --- perl/lib/Nix/Store.xs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'perl') diff --git a/perl/lib/Nix/Store.xs b/perl/lib/Nix/Store.xs index 7a5458113675..697fd79f9b09 100644 --- a/perl/lib/Nix/Store.xs +++ b/perl/lib/Nix/Store.xs @@ -161,8 +161,7 @@ SV * topoSortPaths(...) SV * followLinksToStorePath(char * path) CODE: try { - store(); - RETVAL = newSVpv(followLinksToStorePath(path).c_str(), 0); + RETVAL = newSVpv(store()->followLinksToStorePath(path).c_str(), 0); } catch (Error & e) { croak("%s", e.what()); } @@ -289,7 +288,7 @@ SV * makeFixedOutputPath(int recursive, char * algo, char * hash, char * name) PPCODE: try { HashType ht = parseHashType(algo); - Path path = makeFixedOutputPath(recursive, ht, + Path path = store()->makeFixedOutputPath(recursive, ht, parseHash16or32(ht, hash), name); XPUSHs(sv_2mortal(newSVpv(path.c_str(), 0))); } catch (Error & e) { -- cgit 1.4.1