Skip to content

Commit fde5943

Browse files
committed
removed dereference to make function pointer syntax more readable
1 parent 774ecab commit fde5943

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/fwriteR.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,15 @@ static int32_t whichWriter(SEXP);
7575

7676
void writeList(const void *col, int64_t row, char **pch) {
7777
SEXP v = ((const SEXP *)col)[row];
78-
int32_t wf = whichWriter(v);
78+
const int32_t wf = whichWriter(v);
7979
if (TYPEOF(v)==VECSXP || wf==INT32_MIN || isFactor(v)) {
8080
internal_error(__func__, "TYPEOF(v)!=VECSXP && wf!=INT32_MIN && !isFactor(v); getMaxListItem should have caught this up front"); // # nocov
8181
}
8282
char *ch = *pch;
8383
write_chars(sep2start, &ch);
8484
const void *data = DATAPTR_RO(v);
85-
writer_fun_t *fun = funs[wf];
8685
for (int j=0; j<LENGTH(v); j++) {
87-
(*fun)(data, j, &ch);
86+
funs[wf](data, j, &ch);
8887
*ch++ = sep2;
8988
}
9089
if (LENGTH(v)) ch--; // backup over the last sep2 after the last item

0 commit comments

Comments
 (0)