40 : data_(nullptr), length_in_bytes_(0), dart_handle_(nullptr) {}
52 ::memcpy(data_,
data, length_in_bytes_);
58 : data_(nullptr), length_in_bytes_(0), dart_handle_(list) {
71 length_in_bytes_(other.length_in_bytes_),
72 dart_handle_(other.dart_handle_) {
73 other.data_ =
nullptr;
74 other.dart_handle_ =
nullptr;
82 const char* ptr =
static_cast<const char*
>(data_);
83 return std::vector<char>(ptr, ptr + length_in_bytes_);
Dart_Handle dart_handle() const
static const size_t kExternalSizeThreshold
static Dart_Handle Create(const void *data, size_t length)
const void * data() const
std::vector< char > Copy() const
struct _Dart_Handle * Dart_Handle
DART_EXPORT Dart_Handle Dart_TypedDataReleaseData(Dart_Handle object)
DART_EXPORT Dart_Handle Dart_GetNativeArgument(Dart_NativeArguments args, int index)
DART_EXPORT Dart_Handle Dart_TypedDataAcquireData(Dart_Handle object, Dart_TypedData_Type *type, void **data, intptr_t *len)
DART_EXPORT Dart_Handle Dart_ThrowException(Dart_Handle exception)
DART_EXPORT Dart_Handle Dart_NewExternalTypedDataWithFinalizer(Dart_TypedData_Type type, void *data, intptr_t length, void *peer, intptr_t external_allocation_size, Dart_HandleFinalizer callback)
struct _Dart_NativeArguments * Dart_NativeArguments
@ Dart_TypedData_kByteData
DART_EXPORT Dart_Handle Dart_NewTypedData(Dart_TypedData_Type type, intptr_t length)
DART_EXPORT void Dart_SetReturnValue(Dart_NativeArguments args, Dart_Handle retval)
DART_EXPORT bool Dart_IsNull(Dart_Handle object)
DART_EXPORT bool Dart_IsError(Dart_Handle handle)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
void * malloc(size_t size)
DART_EXPORT void FreeFinalizer(void *, void *value)
Dart_Handle ToDart(const T &object)
bool CheckAndHandleError(Dart_Handle handle)
std::shared_ptr< const fml::Mapping > data