summaryrefslogtreecommitdiff
path: root/gtk/gtktextbuffer.c
diff options
context:
space:
mode:
authorJoshua N Pritikin <vishnu@src.gnome.org>2001-09-21 00:48:04 +0000
committerJoshua N Pritikin <vishnu@src.gnome.org>2001-09-21 00:48:04 +0000
commitbd30ca18847e96b3b1d51f91b905eb6540e5969b (patch)
treeadf1a628452bdf33ebf8ad3562ad1fc5f3abfa79 /gtk/gtktextbuffer.c
parent405c3b090f5bf6ba0007327b50e20439095568fd (diff)
downloadgdk-pixbuf-bd30ca18847e96b3b1d51f91b905eb6540e5969b.tar.gz
Fix ref count on new tag to be 1. Update doc. (#60836)
* gtk/gtktextbuffer.c (gtk_text_buffer_create_tag): Fix ref count on new tag to be 1. Update doc. (#60836)
Diffstat (limited to 'gtk/gtktextbuffer.c')
-rw-r--r--gtk/gtktextbuffer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c
index 4195610e4..48fe36572 100644
--- a/gtk/gtktextbuffer.c
+++ b/gtk/gtktextbuffer.c
@@ -1912,8 +1912,8 @@ gtk_text_buffer_place_cursor (GtkTextBuffer *buffer,
*
* Creates a tag and adds it to the tag table for @buffer.
* Equivalent to calling gtk_text_tag_new () and then adding the
- * tag to the buffer's tag table. The returned tag has its refcount
- * incremented, as if you'd called gtk_text_tag_new ().
+ * tag to the buffer's tag table. The returned tag is owned by
+ * the buffer's tag table, so the ref count will be equal to one.
*
* If @tag_name is %NULL, the tag is anonymous.
*
@@ -1947,6 +1947,8 @@ gtk_text_buffer_create_tag (GtkTextBuffer *buffer,
va_end (list);
}
+ g_object_unref (tag);
+
return tag;
}