mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-04 00:58:46 +00:00
21 lines
683 B
C++
21 lines
683 B
C++
#include <memory>
|
|
|
|
#include "wutil.h"
|
|
|
|
extern "C" {
|
|
void fishffi$unique_ptr$wcstring$null(std::unique_ptr<wcstring> *ptr) noexcept {
|
|
new (ptr) std::unique_ptr<wcstring>();
|
|
}
|
|
void fishffi$unique_ptr$wcstring$raw(std::unique_ptr<wcstring> *ptr, wcstring *raw) noexcept {
|
|
new (ptr) std::unique_ptr<wcstring>(raw);
|
|
}
|
|
const wcstring *fishffi$unique_ptr$wcstring$get(const std::unique_ptr<wcstring> &ptr) noexcept {
|
|
return ptr.get();
|
|
}
|
|
wcstring *fishffi$unique_ptr$wcstring$release(std::unique_ptr<wcstring> &ptr) noexcept {
|
|
return ptr.release();
|
|
}
|
|
void fishffi$unique_ptr$wcstring$drop(std::unique_ptr<wcstring> *ptr) noexcept {
|
|
ptr->~unique_ptr();
|
|
}
|
|
} // extern "C"
|