You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Likely going to use R_existsVarInFrame() in exists() on R >=4.2.0
And then likely going to use the new R_getVarEx() on >=R-devel, although it has different semantics than Rf_findVarInFrame3(env, sym, TRUE) in edge cases, i.e.:
For R_MissingArg values in the env, R_getVarEx() errors
For promises in the env, R_getVarEx() will evaluate them before returning them
I don't think there is anything we can do about this unless we get an iterator API for environments that doesn't add special behavior like this
And then for the fallback for older R versions we call Rf_findVarInFrame3() but then add 3 checks to reimplement the 3 bullets from above, so the behavior is consistent on all R versions.
After the enum / iterator API for environments is released, people will have more options if they want to manually implement more advanced behaviors than this "safe" way.
cpp11/inst/include/cpp11/environment.hpp
Lines 37 to 51 in 1c9dbb6
The text was updated successfully, but these errors were encountered: