| 186 | |
| 187 | template <typename LargeObj> |
| 188 | void InitFromStd(std::string&& other, int32_t large_type_index) { |
| 189 | // needs to be reset to none first for exception safety |
| 190 | data_.type_index = TypeIndex::kTVMFFINone; |
| 191 | data_.zero_padding = 0; |
| 192 | TVM_FFI_CLEAR_PTR_PADDING_IN_FFI_ANY(&data_); |
| 193 | ObjectPtr<LargeObj> ptr = make_object<BytesObjStdImpl<LargeObj>>(std::move(other)); |
| 194 | data_.v_obj = details::ObjectUnsafe::MoveObjectPtrToTVMFFIObjectPtr(std::move(ptr)); |
| 195 | data_.type_index = large_type_index; |
| 196 | } |
| 197 | |
| 198 | /*! |
| 199 | * \brief Create a new empty space for a string |
nothing calls this directly
no outgoing calls
no test coverage detected