The R Project SVN R

Rev

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

Rev 59039 Rev 62114
Line 57... Line 57...
57
    result = VECTOR_ELT(PrimCache, offset);
57
    result = VECTOR_ELT(PrimCache, offset);
58
 
58
 
59
    if (result == R_NilValue) {
59
    if (result == R_NilValue) {
60
	result = allocSExp(type);
60
	result = allocSExp(type);
61
	SET_PRIMOFFSET(result, offset);
61
	SET_PRIMOFFSET(result, offset);
-
 
62
	SET_VECTOR_ELT(PrimCache, offset, result);
62
    }
63
    }
63
    else if (TYPEOF(result) != type)
64
    else if (TYPEOF(result) != type)
64
	error("requested primitive type is not consistent with cached value");
65
	error("requested primitive type is not consistent with cached value");
65
 
66
 
66
    return result;
67
    return result;