Commit 6f6b9b32 authored by Radford Neal's avatar Radford Neal

bug fix

parent 60fcf097
......@@ -665,12 +665,16 @@ SEXP attribute_hidden Rf_builtin_op (SEXP op, SEXP e, SEXP rho, int variant)
PROTECT(arg1 = EVALV (arg1, rho,
PRIMFUN_ARG1VAR(op) | VARIANT_PENDING_OK));
if (isObject(arg1) && PRIMFUN_DSPTCH1(op) &&
! (VARIANT_KIND(PRIMFUN_ARG1VAR(op)) == VARIANT_UNCLASS
&& R_variant_result)) {
UNPROTECT(1);
PROTECT(args = CONS(arg1,R_NilValue));
goto not_fast;
if (isObject(arg1) && PRIMFUN_DSPTCH1(op)) {
if (VARIANT_KIND (PRIMFUN_ARG1VAR (op)) == VARIANT_UNCLASS
&& R_variant_result) {
R_variant_result = 0;
}
else {
UNPROTECT(1);
PROTECT(args = CONS(arg1,R_NilValue));
goto not_fast;
}
}
beginbuiltincontext (&cntxt, e);
......@@ -730,12 +734,16 @@ static SEXP Rf_builtin_op_no_cntxt (SEXP op, SEXP e, SEXP rho, int variant)
PROTECT(arg1 = EVALV (arg1, rho, PRIMFUN_ARG1VAR(op)));
if (isObject(arg1) && PRIMFUN_DSPTCH1(op) &&
! (VARIANT_KIND(PRIMFUN_ARG1VAR(op)) == VARIANT_UNCLASS
&& R_variant_result)) {
UNPROTECT(1);
PROTECT(args = CONS(arg1,R_NilValue));
goto not_fast;
if (isObject(arg1) && PRIMFUN_DSPTCH1(op)) {
if (VARIANT_KIND (PRIMFUN_ARG1VAR (op)) == VARIANT_UNCLASS
&& R_variant_result) {
R_variant_result = 0;
}
else {
UNPROTECT(1);
PROTECT(args = CONS(arg1,R_NilValue));
goto not_fast;
}
}
res = ((SEXP(*)(SEXP,SEXP,SEXP,SEXP,int)) PRIMFUN_FAST(op))
......
......@@ -618,3 +618,4 @@ RPROFMEM: 128 (double 11):"print"
[1] 123
> print(length(unclass(o)))
[1] 11
>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment