docs: let go of *
[platform/upstream/glib.git] / gio / gmemoryoutputstream.c
index 82747a3..740088f 100644 (file)
@@ -13,9 +13,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
  *
  * Authors:
  *   Christian Kellner <gicmo@gnome.org>
@@ -369,14 +367,14 @@ g_memory_output_stream_init (GMemoryOutputStream *stream)
  * @size as 0 (allowing #GMemoryOutputStream to do the initial
  * allocation for itself).
  *
- * |[
- * /&ast; a stream that can grow &ast;/
+ * |[<!-- language="C" -->
+ * // a stream that can grow
  * stream = g_memory_output_stream_new (NULL, 0, realloc, free);
  *
- * /&ast; another stream that can grow &ast;/
+ * // another stream that can grow
  * stream2 = g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
  *
- * /&ast; a fixed-size stream &ast;/
+ * // a fixed-size stream
  * data = malloc (200);
  * stream3 = g_memory_output_stream_new (data, 200, NULL, free);
  * ]|
@@ -828,6 +826,8 @@ g_memory_output_stream_truncate (GSeekable     *seekable,
   if (!array_resize (ostream, offset, FALSE, error))
     return FALSE;
 
+  ostream->priv->valid_len = offset;
+
   return TRUE;
 }