glibmm r646 - in trunk: . gio/src



Author: murrayc
Date: Sat Mar 29 12:12:08 2008
New Revision: 646
URL: http://svn.gnome.org/viewvc/glibmm?rev=646&view=rev

Log:
2008-03-29  Murray Cumming  <murrayc murrayc com>

* gio/src/file.hg:
* gio/src/file.ccg: query_default_handler(), set_display_name(), 
query_info(), query_filesystem_info(): Do not take an extre reference, 
because the C functions all provide new objects with an initial 
reference. I checked.

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

Modified: trunk/gio/src/file.ccg
==============================================================================
--- trunk/gio/src/file.ccg	(original)
+++ trunk/gio/src/file.ccg	Sat Mar 29 12:12:08 2008
@@ -286,8 +286,6 @@
     error = ::Glib::Error::throw_exception(gerror);
 #endif //GLIBMM_EXCEPTIONS_ENABLED
 
-  if(retvalue)
-    retvalue->reference(); //The function does not do a ref for us. //TODO: Or maybe it's a new instance. murrayc.
   return retvalue;
 }
 
@@ -307,8 +305,6 @@
     error = ::Glib::Error::throw_exception(gerror);
 #endif //GLIBMM_EXCEPTIONS_ENABLED
 
-  if(retvalue)
-    retvalue->reference(); //The function does not do a ref for us. //TODO: Or maybe it's a new instance. murrayc.
   return retvalue;
 }
 
@@ -369,8 +365,6 @@
     error = ::Glib::Error::throw_exception(gerror);
 #endif //GLIBMM_EXCEPTIONS_ENABLED
 
-  if(retvalue)
-    retvalue->reference(); //The function does not do a ref for us. //TODO: Or maybe it's a new instance. murrayc.
   return retvalue;
 }
 
@@ -390,8 +384,6 @@
     error = ::Glib::Error::throw_exception(gerror);
 #endif //GLIBMM_EXCEPTIONS_ENABLED
 
-  if(retvalue)
-    retvalue->reference(); //The function does not do a ref for us. //TODO: Or maybe it's a new instance. murrayc.
   return retvalue;
 }
 
@@ -515,8 +507,6 @@
     error = ::Glib::Error::throw_exception(gerror);
 #endif //GLIBMM_EXCEPTIONS_ENABLED
 
-  if(retvalue)
-    retvalue->reference(); //The function does not do a ref for us. //TODO: Or maybe it returns a new instance. It's not clear. murrayc.
   return retvalue;
 
 }
@@ -1997,8 +1987,6 @@
     error = ::Glib::Error::throw_exception(gerror);
 #endif //GLIBMM_EXCEPTIONS_ENABLED
 
-  if(retvalue)
-    retvalue->reference(); //The function does not do a ref for us. //TODO: Or maybe it's a new instance. murrayc.
   return retvalue;
 }
 

Modified: trunk/gio/src/file.hg
==============================================================================
--- trunk/gio/src/file.hg	(original)
+++ trunk/gio/src/file.hg	Sat Mar 29 12:12:08 2008
@@ -1623,7 +1623,7 @@
 
   _WRAP_METHOD(Glib::RefPtr<AppInfo> query_default_handler(const Glib::RefPtr<Cancellable>& cancellable),
                g_file_query_default_handler,
-               refreturn, errthrow)
+               errthrow)
 
 /** Returns the AppInfo that is registered as the default
  * application to handle the file specified by the file.



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