aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/rust-ffi.cc
blob: 931d29542ee275b676dadc18d7cb8cc14cb0fd54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include "logging.hh"
#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))));
}

}