[gnome-contacts] Contact: mark result of from_individual as unowned.



commit b7ebbedd5eeaaa6d1caed77a51e7bf51fbfc34ff
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Sun Apr 8 16:59:43 2018 +0200

    Contact: mark result of from_individual as unowned.
    
    This saves us a g_object_ref/_unref which shouldn't be necessary, since
    a Contact shouldn't exist without a corresponding Individual.

 src/contacts-contact.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/contacts-contact.vala b/src/contacts-contact.vala
index e038b60..9d63c60 100644
--- a/src/contacts-contact.vala
+++ b/src/contacts-contact.vala
@@ -75,7 +75,7 @@ public class Contacts.Contact : GLib.Object  {
     this.is_main = calc_is_main ();
   }
 
-  public static Contact from_individual (Individual i) {
+  public static unowned Contact from_individual (Individual i) {
     return i.get_data ("contact");
   }
 


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