paleolimbot commented on code in PR #14530:
URL: https://github.com/apache/arrow/pull/14530#discussion_r1009409907


##########
r/src/altrep.cpp:
##########
@@ -1098,9 +1098,9 @@ void test_arrow_altrep_set_string_elt(sexp x, int i, 
std::string value) {
 }
 
 // [[arrow::export]]
-logicals test_arrow_altrep_is_materialized(sexp x) {
+sexp test_arrow_altrep_is_materialized(sexp x) {

Review Comment:
   Yes...pretty much always use `sexp` because it's safer. `SEXP` gets used a 
lot in our code base too...it can be safe to use that in C++ as well but you 
have to make sure the object is not going to get garbage collected (either by 
using `PROTECT()` or by making absolutely sure that it's something that's 
already protected by virtue of its container). The problem is, whenever you 
write `SEXP`, put it on the reader of your code to figure that out.



-- 
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]

Reply via email to