2020-06-16 12:16:39 +00:00
|
|
|
#if 0
|
2019-09-10 23:15:20 +00:00
|
|
|
#include "logging.hh"
|
2019-09-11 11:10:46 +00:00
|
|
|
#include "rust-ffi.hh"
|
2019-09-10 23:15:20 +00:00
|
|
|
|
|
|
|
extern "C" std::exception_ptr * make_error(rust::StringSlice s)
|
|
|
|
{
|
2019-12-05 18:11:09 +00:00
|
|
|
return new std::exception_ptr(std::make_exception_ptr(nix::Error(std::string(s.ptr, s.size))));
|
|
|
|
}
|
|
|
|
|
2019-12-13 18:05:09 +00:00
|
|
|
extern "C" void destroy_error(std::exception_ptr * ex)
|
|
|
|
{
|
|
|
|
free(ex);
|
|
|
|
}
|
|
|
|
|
2019-12-05 18:11:09 +00:00
|
|
|
namespace rust {
|
|
|
|
|
|
|
|
std::ostream & operator << (std::ostream & str, const String & s)
|
|
|
|
{
|
|
|
|
str << (std::string_view) s;
|
|
|
|
return str;
|
2019-09-10 23:15:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2020-06-16 12:16:39 +00:00
|
|
|
#endif
|