Skip to content

Commit f2f9358

Browse files
committed
Remove old is_sweep_pthread_p check in darray.h
1 parent ba09ff9 commit f2f9358

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

darray.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,6 @@ rb_darray_realloc_mul_add(void *orig_ptr, size_t capa, size_t element_size, size
233233
return ptr;
234234
}
235235

236-
bool is_sweep_thread_p(void);
237-
238236
/* Internal function. Like rb_xrealloc_mul_add but does not trigger GC. */
239237
static inline void *
240238
rb_darray_realloc_mul_add_without_gc(void *orig_ptr, size_t x, size_t y, size_t z)
@@ -243,12 +241,7 @@ rb_darray_realloc_mul_add_without_gc(void *orig_ptr, size_t x, size_t y, size_t
243241

244242
void *ptr = realloc(orig_ptr, size);
245243
if (ptr == NULL) {
246-
if (!is_sweep_thread_p()) {
247-
rb_bug("rb_darray_realloc_mul_add_without_gc: failed");
248-
}
249-
else {
250-
fprintf(stderr, "darray: realloc failed (from sweep thread)\n");
251-
}
244+
rb_bug("rb_darray_realloc_mul_add_without_gc: failed");
252245
}
253246

254247
return ptr;

0 commit comments

Comments
 (0)