Open
Description
To convert from std::vector<std::string>
to cpp11::strings
you might do cpp11::strings(as_sexp(x))
. That goes through as_sexp_strings()
which looks like it could be a little more efficient. Rather than calling safe[Rf_mkCharCE]
on each iteration, I think we could wrap the whole loop in a single unwind_protect()
.
cpp11/inst/include/cpp11/as.hpp
Lines 287 to 306 in 05c888b
Something like
Lines 499 to 503 in 05c888b
Be careful to avoid all the pitfalls of calling unwind_protect()
manually that are mentioned in that vignette
Metadata
Metadata
Assignees
Labels
No labels