[rygel] core: Make @null static in Database class



commit 55082db20378adb3c8e7f45997d217d2e0118f34
Author: Jens Georg <mail jensge org>
Date:   Tue Oct 20 19:02:12 2009 +0200

    core: Make @null static in Database class
    
    There is no need for an instance of Database to generate a null pointer

 src/rygel/rygel-database.vala |    2 +-
 src/rygel/rygel-media-db.vala |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/rygel/rygel-database.vala b/src/rygel/rygel-database.vala
index e54270d..a53ece8 100644
--- a/src/rygel/rygel-database.vala
+++ b/src/rygel/rygel-database.vala
@@ -119,7 +119,7 @@ internal class Rygel.Database : Object {
         this.db.exec ("ANALYZE");
     }
 
-    public GLib.Value get_null () {
+    public static GLib.Value @null () {
         GLib.Value v = GLib.Value (typeof (void *));
         v.set_pointer (null);
         return v;
diff --git a/src/rygel/rygel-media-db.vala b/src/rygel/rygel-media-db.vala
index 9316629..c005a0a 100644
--- a/src/rygel/rygel-media-db.vala
+++ b/src/rygel/rygel-media-db.vala
@@ -486,7 +486,7 @@ public class Rygel.MediaDB : Object {
                                 (item is MediaItem)
                                            ? (int) MediaDBObjectType.ITEM
                                            : (int) MediaDBObjectType.CONTAINER,
-                                item.parent == null ? this.db.get_null () :
+                                item.parent == null ? Database.null () :
                                                       item.parent.id,
                                 (int64) item.modified };
         this.db.exec (INSERT_OBJECT_STRING, values);



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