The R Project SVN R

Rev

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

Rev 87891 Rev 87901
Line 978... Line 978...
978
    entry points R_data_class() and R_data_class2(). The semantics of
978
    entry points R_data_class() and R_data_class2(). The semantics of
979
    inherits2() are identical to that of the R-level inherits(),
979
    inherits2() are identical to that of the R-level inherits(),
980
    except there is no translation.
980
    except there is no translation.
981
*/
981
*/
982
 
982
 
983
Rboolean attribute_hidden inherits2(SEXP x, const char *what) {
983
attribute_hidden Rboolean inherits2(SEXP x, const char *what) {
984
    if (OBJECT(x)) {
984
    if (OBJECT(x)) {
985
	SEXP klass;
985
	SEXP klass;
986
 
986
 
987
	if(IS_S4_OBJECT(x))
987
	if(IS_S4_OBJECT(x))
988
	    PROTECT(klass = R_data_class2(x));
988
	    PROTECT(klass = R_data_class2(x));
Line 1793... Line 1793...
1793
    UNPROTECT(2); /* value, e */
1793
    UNPROTECT(2); /* value, e */
1794
    vmaxset(vmax);
1794
    vmaxset(vmax);
1795
    return value;
1795
    return value;
1796
}
1796
}
1797
 
1797
 
1798
Rboolean attribute_hidden R_seemsOldStyleS4Object(SEXP object)
1798
attribute_hidden Rboolean R_seemsOldStyleS4Object(SEXP object)
1799
{
1799
{
1800
    SEXP klass;
1800
    SEXP klass;
1801
    if(!isObject(object) || IS_S4_OBJECT(object)) return FALSE;
1801
    if(!isObject(object) || IS_S4_OBJECT(object)) return FALSE;
1802
    /* We want to know about S4SXPs with no S4 bit */
1802
    /* We want to know about S4SXPs with no S4 bit */
1803
    /* if(TYPEOF(object) == S4SXP) return FALSE; */
1803
    /* if(TYPEOF(object) == S4SXP) return FALSE; */