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