The R Project SVN R

Rev

Rev 84057 | Rev 85003 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 84057 Rev 84154
Line 1236... Line 1236...
1236
    int ldx, ldy, nrx, ncx, nry, ncy, mode;
1236
    int ldx, ldy, nrx, ncx, nry, ncy, mode;
1237
    SEXP x = CAR(args), y = CADR(args), xdims, ydims, ans;
1237
    SEXP x = CAR(args), y = CADR(args), xdims, ydims, ans;
1238
    Rboolean sym;
1238
    Rboolean sym;
1239
 
1239
 
1240
    if (PRIMVAL(op) == 0 && /* %*% is primitive, the others are .Internal() */
1240
    if (PRIMVAL(op) == 0 && /* %*% is primitive, the others are .Internal() */
1241
       (IS_S4_OBJECT(x) || IS_S4_OBJECT(y))
1241
	(OBJECT(x) || OBJECT(y))) {
1242
       && R_has_methods(op)) {
-
 
1243
	SEXP s, value;
1242
	SEXP s, value;
1244
	/* Remove argument names to ensure positional matching */
1243
	/* Remove argument names to ensure positional matching */
1245
	for(s = args; s != R_NilValue; s = CDR(s)) SET_TAG(s, R_NilValue);
1244
	for(s = args; s != R_NilValue; s = CDR(s)) SET_TAG(s, R_NilValue);
-
 
1245
 
-
 
1246
	if ((IS_S4_OBJECT(x) || IS_S4_OBJECT(y)) && R_has_methods(op)){
1246
	value = R_possible_dispatch(call, op, args, rho, FALSE);
1247
	    value = R_possible_dispatch(call, op, args, rho, FALSE);
1247
	if (value) return value;
1248
	    if (value) return value;
-
 
1249
	}
-
 
1250
	else if (DispatchGroup("matrixOps", call, op, args, rho, &ans))
-
 
1251
	    return ans;
1248
    }
1252
    }
1249
 
1253
 
1250
    checkArity(op, args);
1254
    checkArity(op, args);
1251
    sym = isNull(y);
1255
    sym = isNull(y);
1252
    if (sym && (PRIMVAL(op) > 0)) y = x;
1256
    if (sym && (PRIMVAL(op) > 0)) y = x;