Skip to content

Commit

Permalink
xlengthgets
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Nov 21, 2023
1 parent 16211d6 commit 8e9e093
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1264,11 +1264,11 @@ SEXP rnng_aio_http(SEXP env, SEXP response, SEXP type) {
const R_xlen_t rlen = Rf_xlength(response);
switch (TYPEOF(response)) {
case STRSXP:
PROTECT(response = Rf_lengthgets(response, rlen + 1));
PROTECT(response = Rf_xlengthgets(response, rlen + 1));
SET_STRING_ELT(response, rlen, Rf_mkChar("Location"));
break;
case VECSXP:
PROTECT(response = Rf_lengthgets(response, rlen + 1));
PROTECT(response = Rf_xlengthgets(response, rlen + 1));
SET_VECTOR_ELT(response, rlen, Rf_mkString("Location"));
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion src/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static SEXP nano_inHook(SEXP x, SEXP fun) {
SET_VECTOR_ELT(list, xlen, x);
} else {
xlen = Rf_xlength(nano_refList);
PROTECT(list = Rf_lengthgets(nano_refList, xlen + 1));
PROTECT(list = Rf_xlengthgets(nano_refList, xlen + 1));
SET_VECTOR_ELT(list, xlen, x);
}
char idx[NANONEXT_INT_STRLEN];
Expand Down
4 changes: 2 additions & 2 deletions src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,11 @@ SEXP rnng_ncurl(SEXP http, SEXP convert, SEXP follow, SEXP method, SEXP headers,
const R_xlen_t rlen = Rf_xlength(response);
switch (TYPEOF(response)) {
case STRSXP:
PROTECT(response = Rf_lengthgets(response, rlen + 1));
PROTECT(response = Rf_xlengthgets(response, rlen + 1));
SET_STRING_ELT(response, rlen, Rf_mkChar("Location"));
break;
case VECSXP:
PROTECT(response = Rf_lengthgets(response, rlen + 1));
PROTECT(response = Rf_xlengthgets(response, rlen + 1));
SET_VECTOR_ELT(response, rlen, Rf_mkString("Location"));
break;
default:
Expand Down

0 comments on commit 8e9e093

Please sign in to comment.