-
Notifications
You must be signed in to change notification settings - Fork 24
Description
I'm interested in accessing some reference counting functionality in R, but I noticed that e.g. MAYBE_SHARED, NO_REFERENCES have no bindings generated. This is of course because of the fact that bindgen can't (yet) generate macros for function-like macros: rust-lang/rust-bindgen#753.
Therefore I'm thinking it might be nice to slowly add some manual implementations of these macros. The simple ones like #define CHAR(x) R_CHAR(x) are of lower priority to me since they don't represent missing functionality, but stuff like # define MAYBE_SHARED(x) (NAMED(x) > 1) seems useful to me, as are more complex ones like KNOWN_SORTED.
The only question is whether we want these to live in libR-sys as opposed to extendr, since they're not generated and would be the first manual functions in the crate. Opinions are welcome.