diff options
author | Kai Wohlfahrt <kai.wohlfahrt@gmail.com> | 2020-11-21 22:06:15 +0000 |
---|---|---|
committer | Kai Wohlfahrt <kai.wohlfahrt@gmail.com> | 2020-11-21 22:06:15 +0000 |
commit | df83b6df68a7a7d71747c1d6cfb98f6b4ee732f0 (patch) | |
tree | cf52ab711b7d53c71e783d2ba5e06dda8efe35b7 /perl | |
parent | 4dcb183af31d5cb33b6ef8e581e77d1c892a58b9 (diff) |
Return signatures in Perl path info
Diffstat (limited to 'perl')
-rw-r--r-- | perl/lib/Nix/Store.xs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/perl/lib/Nix/Store.xs b/perl/lib/Nix/Store.xs index 599921151..9e3b7d389 100644 --- a/perl/lib/Nix/Store.xs +++ b/perl/lib/Nix/Store.xs @@ -110,10 +110,14 @@ SV * queryPathInfo(char * path, int base32) XPUSHs(sv_2mortal(newSVpv(s.c_str(), 0))); mXPUSHi(info->registrationTime); mXPUSHi(info->narSize); - AV * arr = newAV(); + AV * refs = newAV(); for (auto & i : info->references) - av_push(arr, newSVpv(store()->printStorePath(i).c_str(), 0)); - XPUSHs(sv_2mortal(newRV((SV *) arr))); + av_push(refs, newSVpv(store()->printStorePath(i).c_str(), 0)); + XPUSHs(sv_2mortal(newRV((SV *) refs))); + AV * sigs = newAV(); + for (auto & i : info->sigs) + av_push(sigs, newSVpv(i.c_str(), 0)); + XPUSHs(sv_2mortal(newRV((SV *) sigs))); } catch (Error & e) { croak("%s", e.what()); } |