The R Project SVN R

Rev

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

Rev 63630 Rev 63635
Line 25... Line 25...
25
 
25
 
26
 *  mat2indsub()      -- for "mat[i]"     "    "            "
26
 *  mat2indsub()      -- for "mat[i]"     "    "            "
27
 
27
 
28
 *  makeSubscript()   -- for "[" and "[<-" in ./subset.c and ./subassign.c,
28
 *  makeSubscript()   -- for "[" and "[<-" in ./subset.c and ./subassign.c,
29
 *			 and "[[<-" with a scalar in ./subassign.c
29
 *			 and "[[<-" with a scalar in ./subassign.c
30
 *  vectorSubscript() -- for makeSubscript()   {currently unused externally}
-
 
31
 *  arraySubscript()  -- for "[i,j,..." and "[<-..." in ./subset.c, ./subassign.c
30
 *  arraySubscript()  -- for "[i,j,..." and "[<-..." in ./subset.c, ./subassign.c
32
 */
31
 */
33
 
32
 
34
#ifdef HAVE_CONFIG_H
33
#ifdef HAVE_CONFIG_H
35
#include <config.h>
34
#include <config.h>
Line 869... Line 868...
869
	    if (0 < i && i <= nx) {
868
	    if (0 < i && i <= nx) {
870
		*stretch = 0;
869
		*stretch = 0;
871
		return s;
870
		return s;
872
	    }
871
	    }
873
	}
872
	}
-
 
873
#ifdef FAST_REAL_SUBSCRIPTS
874
	else if (TYPEOF(s) == REALSXP) {
874
	else if (TYPEOF(s) == REALSXP) {
875
	    double di = REAL(s)[0];
875
	    double di = REAL(s)[0];
876
	    if (1 <= di && di <= nx) {
876
	    if (1 <= di && di <= nx) {
877
		*stretch = 0;
877
		*stretch = 0;
878
		/* We could only return a REALSXP if the value is too
878
		/* We could only return a REALSXP if the value is too
Line 880... Line 880...
880
		   handle REALSXP indices, returning the REALSXP
880
		   handle REALSXP indices, returning the REALSXP
881
		   avoids and allocation. */
881
		   avoids and allocation. */
882
		return s;
882
		return s;
883
	    }
883
	    }
884
	}
884
	}
-
 
885
#endif
885
    }
886
    }
886
 
887
 
887
    PROTECT(s = duplicate(s));
888
    PROTECT(s = duplicate(s));
888
    SET_ATTRIB(s, R_NilValue);
889
    SET_ATTRIB(s, R_NilValue);
889
    SET_OBJECT(s, 0);
890
    SET_OBJECT(s, 0);