View | Details | Raw Unified | Return to bug 16932 | Differences between
and this patch

Collapse All | Expand All

(-)seq.c (-6 / +6 lines)
Lines 193-220 Link Here
193
    case INTSXP: \
193
    case INTSXP: \
194
	for (i = 0; i < nc; i++) { \
194
	for (i = 0; i < nc; i++) { \
195
/*	    if ((i+1) % ni == 0) R_CheckUserInterrupt();*/ \
195
/*	    if ((i+1) % ni == 0) R_CheckUserInterrupt();*/ \
196
	    for (j = 0; j < (R_xlen_t) it[i]; j++) \
196
	    for (j = (R_xlen_t) it[i]; j > 0; j--) \
197
		INTEGER(a)[n++] = INTEGER(s)[i]; \
197
		INTEGER(a)[n++] = INTEGER(s)[i]; \
198
	} \
198
	} \
199
	break; \
199
	break; \
200
    case REALSXP: \
200
    case REALSXP: \
201
	for (i = 0; i < nc; i++) { \
201
	for (i = 0; i < nc; i++) { \
202
/*	    if ((i+1) % ni == 0) R_CheckUserInterrupt();*/ \
202
/*	    if ((i+1) % ni == 0) R_CheckUserInterrupt();*/ \
203
	    for (j = 0; j < (R_xlen_t) it[i]; j++) \
203
	    for (j = (R_xlen_t) it[i]; j > 0; j--) \
204
		REAL(a)[n++] = REAL(s)[i]; \
204
		REAL(a)[n++] = REAL(s)[i]; \
205
	} \
205
	} \
206
	break; \
206
	break; \
207
    case CPLXSXP: \
207
    case CPLXSXP: \
208
	for (i = 0; i < nc; i++) { \
208
	for (i = 0; i < nc; i++) { \
209
/*	    if ((i+1) % ni == 0) R_CheckUserInterrupt();*/ \
209
/*	    if ((i+1) % ni == 0) R_CheckUserInterrupt();*/ \
210
	    for (j = 0; j < (R_xlen_t) it[i]; j++) \
210
	    for (j = (R_xlen_t) it[i]; j > 0; j--) \
211
		COMPLEX(a)[n++] = COMPLEX(s)[i]; \
211
		COMPLEX(a)[n++] = COMPLEX(s)[i]; \
212
	} \
212
	} \
213
	break; \
213
	break; \
214
    case STRSXP: \
214
    case STRSXP: \
215
	for (i = 0; i < nc; i++) { \
215
	for (i = 0; i < nc; i++) { \
216
/*	    if ((i+1) % ni == 0) R_CheckUserInterrupt();*/ \
216
/*	    if ((i+1) % ni == 0) R_CheckUserInterrupt();*/ \
217
	    for (j = 0; j < (R_xlen_t) it[i]; j++) \
217
	    for (j = (R_xlen_t) it[i]; j > 0; j--) \
218
		SET_STRING_ELT(a, n++, STRING_ELT(s, i)); \
218
		SET_STRING_ELT(a, n++, STRING_ELT(s, i)); \
219
	} \
219
	} \
220
	break; \
220
	break; \
Lines 223-229 Link Here
223
	for (i = 0; i < nc; i++) { \
223
	for (i = 0; i < nc; i++) { \
224
/*	    if ((i+1) % ni == 0) R_CheckUserInterrupt();*/ \
224
/*	    if ((i+1) % ni == 0) R_CheckUserInterrupt();*/ \
225
	    SEXP elt = lazy_duplicate(VECTOR_ELT(s, i)); \
225
	    SEXP elt = lazy_duplicate(VECTOR_ELT(s, i)); \
226
	    for (j = 0; j < (R_xlen_t) it[i]; j++) \
226
	    for (j = (R_xlen_t) it[i]; j > 0; j--) \
227
		SET_VECTOR_ELT(a, n++, elt); \
227
		SET_VECTOR_ELT(a, n++, elt); \
228
	    if (j > 1) SET_NAMED(elt, 2); \
228
	    if (j > 1) SET_NAMED(elt, 2); \
229
	} \
229
	} \
Lines 231-237 Link Here
231
    case RAWSXP: \
231
    case RAWSXP: \
232
	for (i = 0; i < nc; i++) { \
232
	for (i = 0; i < nc; i++) { \
233
/*	    if ((i+1) % ni == 0) R_CheckUserInterrupt();*/ \
233
/*	    if ((i+1) % ni == 0) R_CheckUserInterrupt();*/ \
234
	    for (j = 0; j < (R_xlen_t) it[i]; j++) \
234
	    for (j = (R_xlen_t) it[i]; j > 0; j--) \
235
		RAW(a)[n++] = RAW(s)[i]; \
235
		RAW(a)[n++] = RAW(s)[i]; \
236
	} \
236
	} \
237
	break; \
237
	break; \

Return to bug 16932