Mercurial > ~dholland > hg > tradcpp > index.cgi
comparison array.h @ 39:337110e7240a
Pass the size to free; it makes debug checking easier.
author | David A. Holland |
---|---|
date | Sat, 30 Mar 2013 21:17:47 -0400 (2013-03-31) |
parents | b156910b59b2 |
children | 2e25e55dba6b |
comparison
equal
deleted
inserted
replaced
38:b156910b59b2 | 39:337110e7240a |
---|---|
177 \ | 177 \ |
178 INLINE void \ | 178 INLINE void \ |
179 ARRAY##_destroy(struct ARRAY *a) \ | 179 ARRAY##_destroy(struct ARRAY *a) \ |
180 { \ | 180 { \ |
181 ARRAY##_cleanup(a); \ | 181 ARRAY##_cleanup(a); \ |
182 dofree(a); \ | 182 dofree(a, sizeof(*a)); \ |
183 } \ | 183 } \ |
184 \ | 184 \ |
185 INLINE unsigned \ | 185 INLINE unsigned \ |
186 ARRAY##_num(const struct ARRAY *a) \ | 186 ARRAY##_num(const struct ARRAY *a) \ |
187 { \ | 187 { \ |