paleolimbot commented on PR #1205:
URL: https://github.com/apache/arrow-adbc/pull/1205#issuecomment-1765487166

   Thank you for reviewing!
   
   >  I wish there was a better mechanism for PROTECT/UNPROTECT
   
   In case you're curious, the code here can't use any classes that have 
non-trivial destructors because any call to `R_` or `Rf_` functions could 
`longjmp` (`Rf_error()` is guaranteed to, and this his how other functions in 
the R API do error handling). We could use cpp11 ( 
https://github.com/r-lib/cpp11 ) or Rcpp ( https://github.com/RcppCore/Rcpp ) 
which both let you write normal C++ with destructors that interacts with the R 
API. There's a few reasons why I didn't use them when I first wrote this, but 
one huge downside is that it makes these PRs difficult to review from a general 
C++ standpoint 😬 .


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