1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00

Make the store directory a member variable of Store

This commit is contained in:
Eelco Dolstra 2016-06-01 14:49:12 +02:00
parent 1b5b654fe2
commit 7850d3d279
35 changed files with 315 additions and 296 deletions

View file

@ -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) {