lix/src/libutil/rust-ffi.cc

13 lines
248 B
C++
Raw Normal View History

#include "logging.hh"
2019-09-11 11:10:46 +00:00
#include "rust-ffi.hh"
namespace nix {
extern "C" std::exception_ptr * make_error(rust::StringSlice s)
{
// FIXME: leak
return new std::exception_ptr(std::make_exception_ptr(Error(std::string(s.ptr, s.size))));
}
}