diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-07-17 16:55:45 -0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-07-17 16:55:45 -0400 |
commit | 220818f758d2facc194f567f35ca677ef79393bd (patch) | |
tree | 7186b0dfbdeda8d81247b394c0e7a1e8e35181f5 /perl | |
parent | 3a9fdf2747bc7436fc3c1fd5f9accd5675d4295e (diff) | |
download | guix-220818f758d2facc194f567f35ca677ef79393bd.tar.gz |
queryPathInfo(): return hash in base-32 if desired
Cherry-picked from the no-manifests branch.
Diffstat (limited to 'perl')
-rw-r--r-- | perl/lib/Nix/Store.xs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perl/lib/Nix/Store.xs b/perl/lib/Nix/Store.xs index 8ca72b62a3..2ebff55756 100644 --- a/perl/lib/Nix/Store.xs +++ b/perl/lib/Nix/Store.xs @@ -86,7 +86,7 @@ SV * queryDeriver(char * path) } -SV * queryPathInfo(char * path) +SV * queryPathInfo(char * path, int base32) PPCODE: try { doInit(); @@ -95,7 +95,7 @@ SV * queryPathInfo(char * path) XPUSHs(&PL_sv_undef); else XPUSHs(sv_2mortal(newSVpv(info.deriver.c_str(), 0))); - string s = "sha256:" + printHash(info.hash); + string s = "sha256:" + (base32 ? printHash32(info.hash) : printHash(info.hash)); XPUSHs(sv_2mortal(newSVpv(s.c_str(), 0))); mXPUSHi(info.registrationTime); mXPUSHi(info.narSize); |