Skip to content

Commit

Permalink
make aio error object consistent with interface
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Nov 18, 2023
1 parent d9f67c0 commit 218faa2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ typedef struct nano_cv_duo_s {

static SEXP mk_error_data(const int xc) {

const char *names[] = {xc < 0 ? "result" : "data", ""};
const char *names[] = {xc < 0 ? "result" : "data", "value", ""};
SEXP out = PROTECT(Rf_mkNamed(VECSXP, names));
SEXP err = Rf_ScalarInteger(abs(xc));
SET_ATTRIB(err, nano_error);
SET_OBJECT(err, 1);
SET_VECTOR_ELT(out, 0, err);
SET_VECTOR_ELT(out, 1, err);
UNPROTECT(1);
return out;

Expand Down

0 comments on commit 218faa2

Please sign in to comment.