Skip to content

Commit a71d45c

Browse files
committed
avoid using STRING_PTR and VECTOR_PTR
1 parent 634496b commit a71d45c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/convert.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2280,9 +2280,9 @@ void* VOIDPTR(SEXP x) {
22802280
case RAWSXP:
22812281
return((void *) RAW(x));
22822282
case STRSXP:
2283-
return((void *) STRING_PTR(x));
2283+
return((void *) STRING_PTR_RO(x));
22842284
case VECSXP:
2285-
return((void *) VECTOR_PTR(x));
2285+
error("Cannot convert VECSXP to voidptr\n");
22862286
default:
22872287
error("Type cannot be converted to voidptr\n");
22882288
}

0 commit comments

Comments
 (0)