WS_DLL_PUBLIC
void *
-wmem_alloc(wmem_allocator_t *allocator, const size_t size);
+wmem_alloc(wmem_allocator_t *allocator, const size_t size)
+G_GNUC_MALLOC;
+
#define wmem_new(allocator, type) \
((type*)wmem_alloc((allocator), sizeof(type)))
WS_DLL_PUBLIC
void *
-wmem_alloc0(wmem_allocator_t *allocator, const size_t size);
+wmem_alloc0(wmem_allocator_t *allocator, const size_t size)
+G_GNUC_MALLOC;
+
#define wmem_new0(allocator, type) \
((type*)wmem_alloc0((allocator), sizeof(type)))
WS_DLL_PUBLIC
void *
-wmem_realloc(wmem_allocator_t *allocator, void *ptr, const size_t size);
+wmem_realloc(wmem_allocator_t *allocator, void *ptr, const size_t size)
+G_GNUC_MALLOC;
WS_DLL_PUBLIC
void
WS_DLL_PUBLIC
wmem_slist_t *
-wmem_slist_new(wmem_allocator_t *allocator);
+wmem_slist_new(wmem_allocator_t *allocator)
+G_GNUC_MALLOC;
#ifdef __cplusplus
}
WS_DLL_PUBLIC
wmem_strbuf_t *
wmem_strbuf_sized_new(wmem_allocator_t *allocator,
- gsize alloc_len, gsize max_len);
+ gsize alloc_len, gsize max_len)
+G_GNUC_MALLOC;
WS_DLL_PUBLIC
wmem_strbuf_t *
-wmem_strbuf_new(wmem_allocator_t *allocator, const gchar *str);
+wmem_strbuf_new(wmem_allocator_t *allocator, const gchar *str)
+G_GNUC_MALLOC;
WS_DLL_PUBLIC
void
WS_DLL_PUBLIC
void
-wmem_strbuf_append_printf(wmem_strbuf_t *strbuf, const gchar *format, ...);
+wmem_strbuf_append_printf(wmem_strbuf_t *strbuf, const gchar *format, ...)
+G_GNUC_PRINTF(2, 3);
WS_DLL_PUBLIC
void
WS_DLL_PUBLIC
gchar *
-wmem_strdup(wmem_allocator_t *allocator, const gchar *src);
+wmem_strdup(wmem_allocator_t *allocator, const gchar *src)
+G_GNUC_MALLOC;
WS_DLL_PUBLIC
gchar *
-wmem_strndup(wmem_allocator_t *allocator, const gchar *src, const size_t len);
+wmem_strndup(wmem_allocator_t *allocator, const gchar *src, const size_t len)
+G_GNUC_MALLOC;
WS_DLL_PUBLIC
gchar *
-wmem_strdup_printf(wmem_allocator_t *allocator, const gchar *fmt, ...);
+wmem_strdup_printf(wmem_allocator_t *allocator, const gchar *fmt, ...)
+G_GNUC_MALLOC G_GNUC_PRINTF(2, 3);
WS_DLL_PUBLIC
gchar *
-wmem_strdup_vprintf(wmem_allocator_t *allocator, const gchar *fmt, va_list ap);
+wmem_strdup_vprintf(wmem_allocator_t *allocator, const gchar *fmt, va_list ap)
+G_GNUC_MALLOC;
#ifdef __cplusplus
}