[glib] Minor doc clarification



commit 0a51b58e0776f2d5a82a5346ab81fb50ee75f9f4
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Mar 8 00:12:33 2010 -0500

    Minor doc clarification
    
    Mention g_realloc() as a possible function to use with
    g_memory_output_stream_new(). Bug 612041.

 gio/gmemoryoutputstream.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/gio/gmemoryoutputstream.c b/gio/gmemoryoutputstream.c
index 3cafa26..6b20c0a 100644
--- a/gio/gmemoryoutputstream.c
+++ b/gio/gmemoryoutputstream.c
@@ -332,8 +332,8 @@ g_memory_output_stream_init (GMemoryOutputStream *stream)
  * g_memory_output_stream_new:
  * @data: pointer to a chunk of memory to use, or %NULL
  * @size: the size of @data
- * @realloc_function: a function with realloc() semantics to be called when
- *     @data needs to be grown, or %NULL
+ * @realloc_function: a function with realloc() semantics (like g_realloc())
+ *     to be called when @data needs to be grown, or %NULL
  * @destroy_function: a function to be called on @data when the stream is
  *     finalized, or %NULL
  *
@@ -343,13 +343,17 @@ g_memory_output_stream_init (GMemoryOutputStream *stream)
  * If @realloc_fn is non-%NULL, it will be used for resizing the internal
  * storage when necessary. To construct a fixed-size output stream,
  * pass %NULL as @realloc_fn.
+ *
  * |[
  * /&ast; a stream that can grow &ast;/
  * stream = g_memory_output_stream_new (NULL, 0, realloc, free);
  *
+ * /&ast; another stream that can grow &ast;/
+ * stream2 = g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
+ *
  * /&ast; a fixed-size stream &ast;/
  * data = malloc (200);
- * stream2 = g_memory_output_stream_new (data, 200, NULL, free);
+ * stream3 = g_memory_output_stream_new (data, 200, NULL, free);
  * ]|
  *
  * Return value: A newly created #GMemoryOutputStream object.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]