The R Project SVN R

Rev

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

Rev 73190 Rev 74117
Line 480... Line 480...
480
    return(xlength(x));
480
    return(xlength(x));
481
}
481
}
482
 
482
 
483
// auxiliary for do_lengths_*(), i.e., R's lengths()
483
// auxiliary for do_lengths_*(), i.e., R's lengths()
484
static R_xlen_t getElementLength(SEXP x, R_xlen_t i, SEXP call, SEXP rho) {
484
static R_xlen_t getElementLength(SEXP x, R_xlen_t i, SEXP call, SEXP rho) {
-
 
485
    SEXP x_elt;
-
 
486
    R_xlen_t ans;
-
 
487
 
485
    SEXP x_elt = dispatch_subset2(x, i, call, rho);
488
    PROTECT(x_elt = dispatch_subset2(x, i, call, rho));
486
    return(dispatch_xlength(x_elt, call, rho));
489
    ans = dispatch_xlength(x_elt, call, rho);
-
 
490
    UNPROTECT(1); /* x_elt */
-
 
491
    return ans;
487
}
492
}
488
 
493
 
489
#ifdef LONG_VECTOR_SUPPORT
494
#ifdef LONG_VECTOR_SUPPORT
490
static SEXP do_lengths_long(SEXP x, SEXP call, SEXP rho)
495
static SEXP do_lengths_long(SEXP x, SEXP call, SEXP rho)
491
{
496
{