X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-common%2Fmalloc.h;h=d911a3a35d64306cd39edeb97cc2fa2c7b988d7b;hb=e3f2e517162b80d256c966fa925c8e76e5691d6d;hp=d0e620a3fd2e4102ec98aeac8c6c3efa5582ffcb;hpb=deb6bcac8d1e1ecec4aafaee2d27dbe467e4f461;p=catta diff --git a/avahi-common/malloc.h b/avahi-common/malloc.h index d0e620a..d911a3a 100644 --- a/avahi-common/malloc.h +++ b/avahi-common/malloc.h @@ -60,15 +60,12 @@ char *avahi_strndup(const char *s, size_t l); void *avahi_memdup(const void *s, size_t l); /** Wraps allocator functions */ -typedef struct AvahiAllocator AvahiAllocator; - -/** Wraps allocator functions */ -struct AvahiAllocator { +typedef struct AvahiAllocator { void* (*malloc)(size_t size); void (*free)(void *p); void* (*realloc)(void *p, size_t size); void* (*calloc)(size_t nmemb, size_t size); /**< May be NULL */ -}; +} AvahiAllocator; /** Change the allocator. May be NULL to return to default (libc) * allocators. The structure is not copied! */