Skip to content

Commit

Permalink
catch one
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Nov 29, 2024
1 parent 26fed53 commit 43414cd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,11 @@ SEXP rnng_aio_get_msg(SEXP env) {

break;
default:
break;
res = 0;
return mk_error_aio(res, env);
}

SEXP out, result;
SEXP out, pipe;
unsigned char *buf;
size_t sz;

Expand All @@ -215,9 +216,9 @@ SEXP rnng_aio_get_msg(SEXP env) {
}

PROTECT(out = nano_decode(buf, sz, raio->mode, NANO_PROT(aio)));
PROTECT(result = Rf_ScalarInteger(-res));
PROTECT(pipe = Rf_ScalarInteger(-res));
Rf_defineVar(nano_ValueSymbol, out, env);
Rf_defineVar(nano_AioSymbol, result, env);
Rf_defineVar(nano_AioSymbol, pipe, env);

UNPROTECT(2);
return out;
Expand Down

0 comments on commit 43414cd

Please sign in to comment.