Closed jsoo1 closed 2 days ago
parseStorePath takes a std::string_view, but the C external api exposes a const * char. Unless I'm missing something this effectively means that the C side has to re-implement a C++ std library type to correctly parse a store path.
parseStorePath
std::string_view
const * char
I don't know what standards we want to have for C->C++ strings but I bet a * char + length encoding would work.
* char
There should be a C-encoded means of passing strings from C->C++.
$ pkg-config --print-provides nix-store-c nix-store-c = 2.24.10
Add :+1: to issues you find important.
Well, must be a me problem :shrug: .
Describe the bug
parseStorePath
takes astd::string_view
, but the C external api exposes aconst * char
. Unless I'm missing something this effectively means that the C side has to re-implement a C++ std library type to correctly parse a store path.I don't know what standards we want to have for C->C++ strings but I bet a
* char
+ length encoding would work.Expected behavior
There should be a C-encoded means of passing strings from C->C++.
Metadata
Checklist
Add :+1: to issues you find important.