- _arr_descr *dp = _ARR_DESCR (elts);
- int n;
-
- assert ((dp->magic == ARR_F_MAGIC) && (nelts >= 0));
- ARR_VRFY (elts);
- assert (dp->eltsize ? dp->eltsize == eltsize : (dp->eltsize = eltsize, 1));
-
- /* @@@ lots of resizes for small nelts */
- n = MAX (1, dp->u.allocated);
- while (nelts > n) n <<= 1;
- while (3*nelts < n) n >>= 1;
- assert (n >= nelts);
-
- if (n != dp->u.allocated) {
- dp = xrealloc (dp, _ARR_ELTS_OFFS+eltsize*n);
- dp->u.allocated = n;
-#if defined(DEBUG) && defined(HAVE_GNU_MALLOC)
- } else {
- tmalloc_tag = NULL;
-#endif
- }
- dp->nelts = nelts;
+ ir_arr_descr *dp = ARR_DESCR(elts);
+ size_t n;
+
+ assert(dp->magic == ARR_F_MAGIC);
+ ARR_VRFY(elts);
+
+ /* @@@ lots of resizes for small nelts */
+ n = MAX(1, dp->allocated);
+ while (nelts > n) n <<= 1;
+ while (3*nelts < n) n >>= 1;
+ assert(n >= nelts);