diff options
author | root <root> | 2007-11-27 19:41:52 +0000 |
---|---|---|
committer | root <root> | 2007-11-27 19:41:52 +0000 |
commit | 40ea26d7fa3e9214a7da4bb1280515948e1a1568 (patch) | |
tree | 8a8eb247a9f5f13698028693da7822f1855911c4 /ev.c | |
parent | 6800c1e86d28e4bc573747e6d327c770b2e00df4 (diff) |
I ❤ µ-opts
Diffstat (limited to 'ev.c')
-rw-r--r-- | ev.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -255,22 +255,22 @@ syserr (const char *msg) } } -static void *(*alloc)(void *ptr, long size); +static void *(*alloc)(void *ptr, size_t size) = realloc; void -ev_set_allocator (void *(*cb)(void *ptr, long size)) +ev_set_allocator (void *(*cb)(void *ptr, size_t size)) { alloc = cb; } -static void * -ev_realloc (void *ptr, long size) +inline_speed void * +ev_realloc (void *ptr, size_t size) { - ptr = alloc ? alloc (ptr, size) : realloc (ptr, size); + ptr = alloc (ptr, size); if (!ptr && size) { - fprintf (stderr, "libev: cannot allocate %ld bytes, aborting.", size); + fprintf (stderr, "libev: cannot allocate %ld bytes, aborting.", (long)size); abort (); } |