nealrichardson commented on code in PR #43351:
URL: https://github.com/apache/arrow/pull/43351#discussion_r1688055189
##########
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:
I'm pretty sure this isn't right, doesn't the `UNPROTECT` need to go after
you're done using the thing you `PROTECT`ed?
I'm also not sure how the C-level PROTECT stuff interacts with
unwind_protect.
--
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]