Skip to content

Commit 5f033eb

Browse files
committed
Use STRING_PTR_RO(), STRING_PTR() is not part of the API
1 parent 5572ed6 commit 5f033eb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/diff.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ static int _diff(const void *a, int aoff, int n,
6363
int *buf, int bufsize);
6464

6565
struct _chr_data {
66-
SEXP* aptr;
67-
SEXP* bptr;
66+
const SEXP* aptr;
67+
const SEXP* bptr;
6868
};
6969

7070
static int _cmp_chr(int a, int b, void *context) {
@@ -85,8 +85,8 @@ SEXP clic_diff_chr(SEXP old, SEXP new, SEXP max) {
8585
int sn;
8686

8787
struct _chr_data data;
88-
data.aptr = STRING_PTR(old);
89-
data.bptr = STRING_PTR(new);
88+
data.aptr = STRING_PTR_RO(old);
89+
data.bptr = STRING_PTR_RO(new);
9090

9191
int out = _diff(old, 0, l_old, new, 0, l_new, _cmp_chr, &data,
9292
dmax, ses, &sn, buf, bufsize);

0 commit comments

Comments
 (0)