24 lines
404 B
C++
24 lines
404 B
C++
#include "interop.h"
|
|
|
|
Interop::Interop()
|
|
{
|
|
|
|
}
|
|
|
|
QString Interop::GetError(GoInterface err) {
|
|
if (err.v == nullptr) {
|
|
return ""; // no error
|
|
}
|
|
|
|
GoString gs = Error_Error(err);
|
|
return QString::fromUtf8(gs.p, gs.n);
|
|
}
|
|
|
|
GoString Interop::toGoString_WeakRef(QByteArray *qba) {
|
|
return GoString{qba->data(), qba->length()};
|
|
}
|
|
|
|
int64_t Interop::GetMagic() {
|
|
return ::GetMagic();
|
|
}
|