diff --git a/src/rlang/vec.h b/src/rlang/vec.h index 46db7b02a..78f104028 100644 --- a/src/rlang/vec.h +++ b/src/rlang/vec.h @@ -47,12 +47,12 @@ const void* r_raw_cbegin(r_obj* x) { } static inline r_obj* const * r_chr_cbegin(r_obj* x) { - return (r_obj* const *) STRING_PTR(x); + return STRING_PTR_RO(x); } static inline r_obj* const * r_list_cbegin(r_obj* x) { #if (R_VERSION < R_Version(3, 5, 0)) - return ((r_obj* const *) STRING_PTR(x)); + return STRING_PTR_RO(x); #else return ((r_obj* const *) DATAPTR_RO(x)); #endif