The R Project SVN R

Rev

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

Rev 31908 Rev 32014
Line 743... Line 743...
743
}
743
}
744
 
744
 
745
SEXP do_unclass(SEXP call, SEXP op, SEXP args, SEXP env)
745
SEXP do_unclass(SEXP call, SEXP op, SEXP args, SEXP env)
746
{
746
{
747
    checkArity(op, args);
747
    checkArity(op, args);
-
 
748
    switch(TYPEOF(CAR(args))) {
-
 
749
    case ENVSXP:
-
 
750
	errorcall(call, "cannot unclass an environment");
-
 
751
	break;
-
 
752
    case EXTPTRSXP:
-
 
753
	errorcall(call, "cannot unclass an external pointer");
-
 
754
	break;
-
 
755
    default:
-
 
756
	break;
-
 
757
    }
748
    if (isObject(CAR(args))) {
758
    if (isObject(CAR(args))) {
749
	SETCAR(args, duplicate(CAR(args)));
759
	SETCAR(args, duplicate(CAR(args)));
750
	setAttrib(CAR(args), R_ClassSymbol, R_NilValue);
760
	setAttrib(CAR(args), R_ClassSymbol, R_NilValue);
751
    }
761
    }
752
    return CAR(args);
762
    return CAR(args);