[gtksourceviewmm] Fix reference counting in SourceBuffer::create_source_mark().



commit 0db698148b1561ccb27b8faf4d6e0249bb38fbc6
Author: Krzesimir Nowak <qdlacz gmail com>
Date:   Tue Nov 9 00:32:59 2010 +0100

    Fix reference counting in SourceBuffer::create_source_mark().
    
    * gtksourceview/src/sourcebuffer.hg: Added refreturn, because created
    SourceMark is owned by SourceBuffer.

 gtksourceview/src/sourcebuffer.hg |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/gtksourceview/src/sourcebuffer.hg b/gtksourceview/src/sourcebuffer.hg
index 284f1f2..3ef2e1d 100644
--- a/gtksourceview/src/sourcebuffer.hg
+++ b/gtksourceview/src/sourcebuffer.hg
@@ -279,11 +279,9 @@ public:
    * @param category A string defining the mark category.
    * @param where Location to place the mark.
    *
-   * @return A new SourceMark, owned by the buffer.
+   * @return A new SourceMark.
    */
-   // TODO: check if this shouldn't be marked as refreturn - krnowak
-   // TODO: check parameter order to be consistent with SourceMark's constructor order. - krnowak
-  _WRAP_METHOD(Glib::RefPtr<SourceMark> create_source_mark(const Glib::ustring& name, const Glib::ustring& category, const Gtk::TextIter& where), gtk_source_buffer_create_source_mark)
+  _WRAP_METHOD(Glib::RefPtr<SourceMark> create_source_mark(const Glib::ustring& name, const Glib::ustring& category, const Gtk::TextIter& where), gtk_source_buffer_create_source_mark, refreturn)
 
   /** Creates an anonymous source mark in the buffer of category category.
    *
@@ -302,14 +300,12 @@ public:
    * @param category A string defining the mark category.
    * @param where Location to place the mark.
    *
-   * @return A new SourceMark, owned by the buffer.
+   * @return A new SourceMark.
    *
    * @newin{2,10}
    */
-   // TODO: check if this shouldn't be marked as refreturn - krnowak
   Glib::RefPtr<SourceMark> create_source_mark(const Glib::ustring& category, const Gtk::TextIter& where);
 
-   // TODO: check if this RefPtrs should be additionally reffed. - krnowak
 #m4 _CONVERSION(`GSList*',`Glib::SListHandle<Glib::RefPtr<SourceMark> >', `$2($3, Glib::OWNERSHIP_SHALLOW)')
 #m4 _CONVERSION(`GSList*',`Glib::SListHandle<Glib::RefPtr<const SourceMark> >', `$2($3, Glib::OWNERSHIP_SHALLOW)')
 
@@ -328,7 +324,6 @@ public:
    *
    * @return A list of source marks.
    */
-   // TODO: check if this RefPtrs should be additionally reffed. - krnowak
   Glib::SListHandle<Glib::RefPtr<SourceMark> > get_source_marks_at_line(int line) const;
 
   /** Returns the list of marks of the given @a category at @a iter.
@@ -338,7 +333,6 @@ public:
    *
    * @return A list of source marks.
    */
-   // TODO: check if this RefPtrs should be additionally reffed. - krnowak
   _WRAP_METHOD(Glib::SListHandle<Glib::RefPtr<SourceMark> > get_source_marks_at_iter(Gtk::TextIter& iter, const Glib::ustring& category) const, gtk_source_buffer_get_source_marks_at_iter)
 
   /** Returns the list of marks of any category at @a iter.
@@ -347,7 +341,6 @@ public:
    *
    * @return A list of source marks.
    */
-   // TODO: check if this RefPtrs should be additionally reffed. - krnowak
   Glib::SListHandle<Glib::RefPtr<SourceMark> > get_source_marks_at_iter(Gtk::TextIter& iter) const;
 
   /** Remove all marks of @a category between start and end from the buffer.



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