Open lionel- opened 6 months ago
I think STDVEC_DATAPTR()
can be replaced with DATAPTR()
but I may be wrong
Commenting to follow here. @ben-schwen already linked our corresponding issue.
SET_S4_OBJECT()/UNSET_S4_OBJECT(): Used for proxying / unproxying S4 objects. Can we do better?
Looked at this a little bit. I think we can replace unset_s4()
with asS3()
.
I gave up on r_mark_s4()
, the goal would be to handle that with asS4()
on the R side.
Alternatively, we might be able to use the C routine asS4()
(untested, and not clear we're allowed to use it anyway)?
https://github.com/r-devel/r-svn/blob/main/src/main/objects.c#L1840
I think
STDVEC_DATAPTR()
can be replaced withDATAPTR()
but I may be wrong
@DavisVaughan tested in my package. It passes all unit tests with no NOTE on devel
Easy:
SET_ENCLOS()
: Used to create new environments, should be easy to fix: https://github.com/r-lib/rlang/issues/1707PREXPR()/
R_PromiseExpr()`: https://github.com/r-lib/rlang/issues/1708Unknown:
SET_S4_OBJECT()
/UNSET_S4_OBJECT()
: Used for proxying / unproxying S4 objects. Can we do better?Problematic:
SETLENGTH()
/SET_TRUELENGTH()
: Used in various algorithms for expansible vectors. Also used in data.table for the same purpose. Would be nice to find a solution with R core.STDVEC_DATAPTR()
: Part of the ALTREP API. Can we get this part of the experimental API that can be used in packages?