From 0d4afc137a4071e03590095238de24cdaad3d89e Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Fri, 4 Dec 2020 14:19:05 +0000 Subject: [PATCH] updated moo-xma.h --- moo/lib/moo-xma.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/moo/lib/moo-xma.h b/moo/lib/moo-xma.h index 63c0b88..8d6b843 100644 --- a/moo/lib/moo-xma.h +++ b/moo/lib/moo-xma.h @@ -37,8 +37,16 @@ * See the example below. Note it omits error handling. * * @code - * #include - * #include + * #include + * #include + * #include + * void dumper (void* ctx, const char* fmt, ...) + * { + * va_list ap; + * va_start (ap, fmt); + * vfprintf (fmt, ap); + * va_end (ap); + * } * int main () * { * moo_xma_t* xma; @@ -52,7 +60,7 @@ * ptr2 = moo_xma_alloc(xma, 1000); // allocate a 1K block from the zone * ptr1 = moo_xma_realloc(xma, ptr1, 6000); // resize the 5K block to 6K. * - * moo_xma_dump (xma, moo_fprintf, MOO_STDOUT); // dump memory blocks + * moo_xma_dump (xma, dumper, MOO_NULL); // dump memory blocks * * // the following two lines are not actually needed as the allocator * // is closed after them.