Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions r/src/altrep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,8 @@ struct AltrepVectorString : public AltrepVectorBase<AltrepVectorString<Type>> {

// Helper class to convert to R strings. We declare one of these for the
// class to avoid having to stack-allocate one for every STRING_ELT call.
// This class does not own a reference to any arrays: it is the caller's
// responsibility to ensure the Array lifetime exeeds that of the viewer.
struct RStringViewer {
RStringViewer() : strip_out_nuls_(false), nul_was_stripped_(false) {}

Expand Down Expand Up @@ -821,11 +823,11 @@ struct AltrepVectorString : public AltrepVectorBase<AltrepVectorString<Type>> {
}

void SetArray(const std::shared_ptr<Array>& array) {
array_ = array;
array_ = array.get();
string_array_ = internal::checked_cast<const StringArrayType*>(array.get());
}

std::shared_ptr<Array> array_;
const Array* array_;
const StringArrayType* string_array_;
std::string stripped_string_;
bool strip_out_nuls_;
Expand Down