ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.c
(Generate patch)

Comparing libev/ev.c (file contents):
Revision 1.14 by root, Wed Oct 31 11:52:12 2007 UTC vs.
Revision 1.15 by root, Wed Oct 31 11:56:34 2007 UTC

83 83
84#define array_needsize(base,cur,cnt,init) \ 84#define array_needsize(base,cur,cnt,init) \
85 if ((cnt) > cur) \ 85 if ((cnt) > cur) \
86 { \ 86 { \
87 int newcnt = cur ? cur << 1 : 16; \ 87 int newcnt = cur ? cur << 1 : 16; \
88 fprintf (stderr, "resize(" # base ") from %d to %d\n", cur, newcnt);\
89 base = realloc (base, sizeof (*base) * (newcnt)); \ 88 base = realloc (base, sizeof (*base) * (newcnt)); \
90 init (base + cur, newcnt - cur); \ 89 init (base + cur, newcnt - cur); \
91 cur = newcnt; \ 90 cur = newcnt; \
92 } 91 }
93 92

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines