-typedef struct AvahiAllocator AvahiAllocator;
-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 */
-};
-
-/* Change the allocator. May be NULL to return to default (libc)
+typedef struct AvahiAllocator {
+ void* (*malloc)(size_t size) AVAHI_GCC_ALLOC_SIZE(1);
+ void (*free)(void *p);
+ void* (*realloc)(void *p, size_t size) AVAHI_GCC_ALLOC_SIZE(2);
+ void* (*calloc)(size_t nmemb, size_t size) AVAHI_GCC_ALLOC_SIZE2(1,2); /**< May be NULL */
+} AvahiAllocator;
+
+/** Change the allocator. May be NULL to return to default (libc)