glibmm r739 - in trunk: . gio/src



Author: arminb
Date: Wed Oct 15 12:23:13 2008
New Revision: 739
URL: http://svn.gnome.org/viewvc/glibmm?rev=739&view=rev

Log:
2008-10-15  Armin Burgmeier  <armin openismus com>

	* gio/src/fileenumerator.hg:
	* gio/src/fileenumerator.ccg: Made FileEnumerator::next_file not add
	an additional reference to the return value, because the C version
	creates a new object. Also, changed ownership of the list returned by
	FileEnumerator::next_files_finish to be deep instead of shallow. Bug
	#556387.


Modified:
   trunk/ChangeLog
   trunk/gio/src/fileenumerator.ccg
   trunk/gio/src/fileenumerator.hg

Modified: trunk/gio/src/fileenumerator.ccg
==============================================================================
--- trunk/gio/src/fileenumerator.ccg	(original)
+++ trunk/gio/src/fileenumerator.ccg	Wed Oct 15 12:23:13 2008
@@ -107,8 +107,6 @@
     error = ::Glib::Error::throw_exception(gerror);
 #endif //GLIBMM_EXCEPTIONS_ENABLED
 
-  if(retvalue)
-    retvalue->reference(); //The function does not do a ref for us.
   return retvalue;
 }
 

Modified: trunk/gio/src/fileenumerator.hg
==============================================================================
--- trunk/gio/src/fileenumerator.hg	(original)
+++ trunk/gio/src/fileenumerator.hg	Wed Oct 15 12:23:13 2008
@@ -55,7 +55,7 @@
 public:
   _WRAP_METHOD(Glib::RefPtr<FileInfo> next_file(const Glib::RefPtr<Cancellable>& cancellable),
                g_file_enumerator_next_file,
-               refreturn, errthrow)
+               errthrow)
 
   /** 
    * @return A FileInfo or an empty RefPtr on error or end of enumerator.
@@ -121,7 +121,7 @@
   void next_files_async(const SlotAsyncReady& slot, int num_files = 1, int io_priority = Glib::PRIORITY_DEFAULT);
   _IGNORE(g_file_enumerator_next_files_async)
 
-#m4 _CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr<FileInfo> >',__FL2H_SHALLOW)
+#m4 _CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr<FileInfo> >', `$2(($3), Glib::OWNERSHIP_DEEP)')
   _WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<FileInfo> > next_files_finish(const Glib::RefPtr<AsyncResult>& result),
                g_file_enumerator_next_files_finish,
                errthrow)



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