jonkeane commented on code in PR #43351:
URL: https://github.com/apache/arrow/pull/43351#discussion_r1688800254
##########
r/src/arrow_cpp11.h:
##########
@@ -138,6 +138,11 @@ inline R_xlen_t r_string_size(SEXP s) {
} // namespace unsafe
inline SEXP utf8_strings(SEXP x) {
+ // ensure that x is not actually altrep first
+ if (ALTREP(x)) {
+ x = PROTECT(Rf_duplicate(x));
+ UNPROTECT(1);
Review Comment:
Hmmm, I'm surprised I don't get any stack imbalance issues with it. I _do_
get them if I don't have `UNPROTECT` or I call it unconditionally. But anyway I
have a slightly different version incoming.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]