The R Project SVN R

Rev

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

Rev 77425 Rev 77449
Line 1065... Line 1065...
1065
#ifdef LONG_VECTOR_SUPPORT
1065
#ifdef LONG_VECTOR_SUPPORT
1066
	if (offset > R_SHORT_LEN_MAX)
1066
	if (offset > R_SHORT_LEN_MAX)
1067
	    error("invalid subscript for pairlist");
1067
	    error("invalid subscript for pairlist");
1068
#endif
1068
#endif
1069
	ans = CAR(nthcdr(x, (int) offset));
1069
	ans = CAR(nthcdr(x, (int) offset));
-
 
1070
#ifndef SWITCH_TO_REFCNT
1070
	RAISE_NAMED(ans, named_x);
1071
	RAISE_NAMED(ans, named_x);
-
 
1072
#endif
1071
    } else if(isVectorList(x)) {
1073
    } else if(isVectorList(x)) {
1072
	/* did unconditional duplication before 2.4.0 */
1074
	/* did unconditional duplication before 2.4.0 */
1073
	ans = VECTOR_ELT(x, offset);
1075
	ans = VECTOR_ELT(x, offset);
-
 
1076
#ifndef SWITCH_TO_REFCNT
1074
	RAISE_NAMED(ans, named_x);
1077
	RAISE_NAMED(ans, named_x);
-
 
1078
#endif
1075
    } else {
1079
    } else {
1076
	ans = allocVector(TYPEOF(x), 1);
1080
	ans = allocVector(TYPEOF(x), 1);
1077
	switch (TYPEOF(x)) {
1081
	switch (TYPEOF(x)) {
1078
	case LGLSXP:
1082
	case LGLSXP:
1079
	    LOGICAL0(ans)[0] = LOGICAL_ELT(x, offset);
1083
	    LOGICAL0(ans)[0] = LOGICAL_ELT(x, offset);